-
-
Notifications
You must be signed in to change notification settings - Fork 196
[18.0][MIG]Add forbid_duplicates on event_type #480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
Conversation
| # pylint: disable=W8120 | ||
| raise ValidationError( | ||
| self.env._("Duplicated partners found in event {0}: {1}.").format( | ||
| _("Duplicated partners found in event {0}: {1}.").format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change this.
| ] | ||
|
|
||
|
|
||
| class EventType(models.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this is a new file.
| <field name="inherit_id" ref="event.view_event_form" /> | ||
| <field name="arch" type="xml"> | ||
| <xpath expr="//field[@name='create_partner']" position="after"> | ||
| <xpath expr="//field[@name='badge_image']" position="after"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why changing this.
|
|
||
| @api.depends("event_type_id") | ||
| def _compute_forbid_duplicates(self): | ||
| """Update event configuration from its event type. Depends are set only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a slight behavior change, as previously changing the type doesn't touch the field, but I think it can be acceptable.
| "installable": True, | ||
| "depends": ["partner_event"], | ||
| "data": ["views/event_event_view.xml"], | ||
| "depends": ["event", "partner_event"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add the redundant dependency
No description provided.