[IMP] calendar: save filters of the calendar view for the user
- We now save the status of each filters to avoid the user to do the same operations, if he go elsewhere in the meantime. Task ID 2196775 COM PR: odoo/odoo#55190 ENT PR: odoo/enterprise#12196 UPG PR: odoo/upgrade#1532 Co-authored-by: Simon Genin (ges) <ges@odoo.com> Co-authored-by: jeh-odoo <jeh@odoo.com>
This commit is contained in:
co-authored by
Simon Genin
parent
a901d65550
commit
f8b6d2f17d
@@ -11,6 +11,8 @@ class Contacts(models.Model):
|
||||
user_id = fields.Many2one('res.users', 'Me', required=True, default=lambda self: self.env.user)
|
||||
partner_id = fields.Many2one('res.partner', 'Employee', required=True)
|
||||
active = fields.Boolean('Active', default=True)
|
||||
partner_checked = fields.Boolean('Checked', default=True,
|
||||
help="This field is used to know if the partner is checked in the filter of the calendar view for the user_id.")
|
||||
|
||||
_sql_constraints = [
|
||||
('user_id_partner_id_unique', 'UNIQUE(user_id, partner_id)', 'A user cannot have the same contact twice.')
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
<field name="videocall_location" string="Join Video Call" widget="CopyClipboardURL" />
|
||||
<field name="attendee_status" invisible="1"/>
|
||||
<field name="partner_id" string="Organizer"/>
|
||||
<field name="partner_ids" widget="many2manyattendee" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_128"/>
|
||||
<field name="partner_ids" widget="many2manyattendee" write_model="calendar.contacts" write_field="partner_id" filter_field="partner_checked" avatar_field="image_128"/>
|
||||
<field name="is_highlighted" invisible="1"/>
|
||||
<field name="description" attrs="{'invisible': [('description', '=', False)]}"/>
|
||||
<field name="privacy"/>
|
||||
|
||||
Reference in New Issue
Block a user