From 7b29f410a53f9c2296117f621c146e9172597ed2 Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Thu, 22 Feb 2018 16:56:33 +0100 Subject: [PATCH 1/3] [CLA] Add Monica to Merchise's CLA --- doc/cla/corporate/merchise.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/cla/corporate/merchise.md b/doc/cla/corporate/merchise.md index d8d5e75f830..e4cbd3c3f95 100644 --- a/doc/cla/corporate/merchise.md +++ b/doc/cla/corporate/merchise.md @@ -20,3 +20,4 @@ Sergio Valdés sergiov@merchise.org Medardo Rodríguez med@merchise.org https://github.com/med-merchise Abel Firvida firvida@merchise.org Abel Firvida abel@merchise.org +Mónica Díaz Pena monicadp@merchise.org https://github.com/mdpena From 088d00f2a7968c58ec9bafea0cd90685a5bd2933 Mon Sep 17 00:00:00 2001 From: Monica Diaz Pena Date: Thu, 22 Feb 2018 16:57:17 +0100 Subject: [PATCH 2/3] [FIX] mail: Don't duplicate uuid of mail channels. If you duplicate a channel the UUID should not be copied, otherwise it might introduce security issues and the method 'channel_minimize' will fail with an "expected singleton error". Closes #23102 --- addons/mail/models/mail_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index 06a272948ea..fb33fbf1323 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -49,7 +49,7 @@ class Channel(models.Model): ('channel', 'Channel')], 'Channel Type', default='channel') description = fields.Text('Description') - uuid = fields.Char('UUID', size=50, index=True, default=lambda self: '%s' % uuid.uuid4()) + uuid = fields.Char('UUID', size=50, index=True, default=lambda self: '%s' % uuid.uuid4(), copy=False) email_send = fields.Boolean('Send messages by email', default=False) # multi users channel channel_last_seen_partner_ids = fields.One2many('mail.channel.partner', 'channel_id', string='Last Seen') From ab60d773eb84a527b3167d7efaf169f70c5c9786 Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Thu, 22 Feb 2018 17:01:50 +0100 Subject: [PATCH 3/3] [FIX] hr_timesheet_sheet: set default company on the company instead of department Code is explicit enough ... Closes #23120 --- addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py index 62f4685a84b..d560569d669 100644 --- a/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py @@ -68,9 +68,8 @@ class HrTimesheetSheet(models.Model): '\n* The \'Waiting Approval\' status is used to confirm the timesheet by user. ' '\n* The \'Approved\' status is used when the users timesheet is accepted by his/her senior.') account_ids = fields.One2many('hr_timesheet_sheet.sheet.account', 'sheet_id', string='Analytic accounts', readonly=True) - company_id = fields.Many2one('res.company', string='Company') - department_id = fields.Many2one('hr.department', string='Department', - default=lambda self: self.env['res.company']._company_default_get()) + company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env['res.company']._company_default_get()) + department_id = fields.Many2one('hr.department', string='Department') @api.constrains('date_to', 'date_from', 'employee_id') def _check_sheet_date(self, forced_user_id=False):