Skip to content

Conversation

@wouitmil
Copy link

No description provided.

# pylint: disable=W8120
raise ValidationError(
self.env._("Duplicated partners found in event {0}: {1}.").format(
_("Duplicated partners found in event {0}: {1}.").format(
Copy link
Member

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):
Copy link
Member

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">
Copy link
Member

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
Copy link
Member

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"],
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants