[FIX] event_type: allow to select typeless event
The requirement for somebody to choose a ticket product should be that it is an event, not that it has an event type attached, mostly when `event_type_id` is not a required field. The event has been improved in upper version but as this field is only informative, relaxing a bit the domain. Closes #12475
This commit is contained in:
parent
4227082869
commit
23ed2805b8
|
@ -205,7 +205,8 @@ class event_ticket(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Name', required=True, translate=True),
|
||||
'event_id': fields.many2one('event.event', "Event", required=True, ondelete='cascade'),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[("event_type_id", "!=", False)]),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True,
|
||||
domain=["|", ("event_type_id", "!=", False), ("event_ok", "=", True)]),
|
||||
'registration_ids': fields.one2many('event.registration', 'event_ticket_id', 'Registrations'),
|
||||
'deadline': fields.date("Sales End"),
|
||||
'is_expired': fields.function(_is_expired, type='boolean', string='Is Expired'),
|
||||
|
|
Loading…
Reference in New Issue