Skip to content
Permalink
Browse files

[IMP] event: add sequence on event categories

Reorganise the categories of the events sorting them by sequence.
Same behavior as "eCommerce Product categories".

Related to task-1917687
  • Loading branch information...
fja-odoo committed Mar 21, 2019
1 parent 3cbb8d5 commit eadee82f606e28320fb75dd682570b10849aea0f
Showing with 3 additions and 0 deletions.
  1. +2 −0 addons/event/models/event.py
  2. +1 −0 addons/event/views/event_views.xml
@@ -22,6 +22,7 @@
class EventType(models.Model):
_name = 'event.type'
_description = 'Event Category'
_order = 'sequence, id'

@api.model
def _get_default_event_type_mail_ids(self):
@@ -42,6 +43,7 @@ def _get_default_event_type_mail_ids(self):
})]

name = fields.Char('Event Category', required=True, translate=True)
sequence = fields.Integer('sequence')
# registration
has_seats_limitation = fields.Boolean(
'Limited Seats', default=False)
@@ -135,6 +135,7 @@
<field name="model">event.type</field>
<field name="arch" type="xml">
<tree string="Event Category">
<field name="sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>

0 comments on commit eadee82

Please sign in to comment.
You can’t perform that action at this time.