Skip to content
Permalink
Browse files

[IMP] event, website_event: sequence ordering added on event categories

Reorganise the categories of the events. Same behavior as "eCommerce Product
categories"

For the changes made in "main.py" I didn't manage to sort the types with
read_group (line 104). I decided to  use sort on the types list while browsing
EventType for the sequences i couldn't retrieve with read_group.

Related to task #1917687
  • Loading branch information...
fja-odoo committed Mar 21, 2019
1 parent 3cbb8d5 commit dba6a588dfd2a8a756c9de3800a4d100650a8893
Showing with 4 additions and 0 deletions.
  1. +2 −0 addons/event/models/event.py
  2. +1 −0 addons/event/views/event_views.xml
  3. +1 −0 addons/website_event/controllers/main.py
@@ -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>
@@ -4,6 +4,7 @@
import re
import werkzeug
import json
import sys

from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta

0 comments on commit dba6a58

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