From d7d9603f1bc9d7200a7954880dc9c82fd6369be7 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Wed, 15 Nov 2017 15:34:10 +0100 Subject: [PATCH 1/5] [FIX] resource: mixin: copy When copying a record implementing the resource mixin, the linked resource should be copied too and not shared across the records. Fixes #20956 opw-781508 --- addons/resource/models/resource_mixin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/resource/models/resource_mixin.py b/addons/resource/models/resource_mixin.py index bd9fcc2e640..7aad40534e4 100644 --- a/addons/resource/models/resource_mixin.py +++ b/addons/resource/models/resource_mixin.py @@ -31,6 +31,16 @@ class ResourceMixin(models.AbstractModel): values['resource_id'] = resource.id return super(ResourceMixin, self).create(values) + @api.multi + def copy_data(self, default=None): + if default is None: + default = {} + resource = self.resource_id.copy() + default['resource_id'] = resource.id + default['company_id'] = resource.company_id.id + default['resource_calendar_id'] = resource.calendar_id.id + return super(ResourceMixin, self).copy_data(default) + def get_work_days_count(self, from_datetime, to_datetime, calendar=None): """ Return the number of work days for the resource, taking into account leaves. An optional calendar can be given in case multiple calendars can From 83c1ef83cdb5c5df561a3822154508ecd9533d23 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 22 Nov 2017 13:38:35 +0100 Subject: [PATCH 2/5] [FIX] report: boxed layout In the footer of the boxed layout, the font-size used might lead to a wrapping of the phone and VAT numbers. opw-782639 --- addons/report/static/src/less/layout_boxed.less | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/report/static/src/less/layout_boxed.less b/addons/report/static/src/less/layout_boxed.less index a81e09f347b..21fcf66efc5 100644 --- a/addons/report/static/src/less/layout_boxed.less +++ b/addons/report/static/src/less/layout_boxed.less @@ -15,6 +15,7 @@ } } .o_boxed_footer { + white-space: nowrap; border-top: 3px solid @gray; ul { margin: 4px 0; From 534081c92ca9fb179af42974ed188bf2ce971b03 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 23 Nov 2017 10:05:50 +0100 Subject: [PATCH 3/5] [FIX] hr: unprout views Courtesy of @tde-banana-odoo --- addons/hr/i18n/hr.pot | 5 ----- addons/hr/views/hr_config_settings_views.xml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/hr/i18n/hr.pot b/addons/hr/i18n/hr.pot index 6438af674df..f3e09c8a6bd 100644 --- a/addons/hr/i18n/hr.pot +++ b/addons/hr/i18n/hr.pot @@ -610,11 +610,6 @@ msgstr "" msgid "Position" msgstr "" -#. module: hr -#: model:ir.ui.view,arch_db:hr.hr_config_settings_view_form -msgid "Prout prout prout" -msgstr "" - #. module: hr #: model:ir.ui.view,arch_db:hr.view_employee_form msgid "Public Information" diff --git a/addons/hr/views/hr_config_settings_views.xml b/addons/hr/views/hr_config_settings_views.xml index e3071728307..d4244203861 100644 --- a/addons/hr/views/hr_config_settings_views.xml +++ b/addons/hr/views/hr_config_settings_views.xml @@ -12,7 +12,7 @@

Work Organization

-
+