From 2e5b58a3dabedf6ff452ae170829362a60d6e1aa Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 18 Jan 2017 10:33:29 +0100 Subject: [PATCH 1/3] [FIX] project_issue: traceback when group by 'Date of Closing' Oversight of commit f57787e Fixes #15110 --- addons/project_issue/report/project_issue_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py index bd0bdf4346b..1566f2e6692 100644 --- a/addons/project_issue/report/project_issue_report.py +++ b/addons/project_issue/report/project_issue_report.py @@ -49,7 +49,7 @@ class project_issue_report(osv.osv): c.working_hours_close, c.team_id, c.stage_id, - date(c.date_closed) as date_closed, + c.date_closed as date_closed, c.company_id as company_id, c.priority as priority, c.project_id as project_id, From e4f6bde41412a40da4bd07582dde32991e05fd7f Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 18 Jan 2017 11:45:25 +0100 Subject: [PATCH 2/3] [FIX] stock: correct typo `strinsg -> string` --- addons/stock/views/stock_warehouse_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/views/stock_warehouse_views.xml b/addons/stock/views/stock_warehouse_views.xml index c13e4455c20..f453fb004da 100644 --- a/addons/stock/views/stock_warehouse_views.xml +++ b/addons/stock/views/stock_warehouse_views.xml @@ -45,7 +45,7 @@ - + From 7c5291ff5c320f08502518402b0a8c4365584e0c Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 18 Jan 2017 11:17:56 +0100 Subject: [PATCH 3/3] [FIX] models: avoid creating XML ids for models that have not been extended Assume module M extends model `base`. Upon installing M, all models in the registry are impacted by the extension, so their `_auto_init` method is invoked. This currently creates an XML id `M.model_X` for every model X, including the custom models created before installing M. Now, if we deinstall module M, all those custom models will be removed, as they have only one XML id, namely the one introduced by M. Prevent the creation of XML ids for the children of an extended model to avoid this bug. Note that if the model extension adds a field, every instance of that field in children models will have an XML id associated to module M. --- openerp/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openerp/models.py b/openerp/models.py index 2aac55edefe..657ef4b5f03 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -396,7 +396,9 @@ class BaseModel(object): RETURNING id """, params) model_id = cr.fetchone()[0] - if 'module' in context: + + if self._module == context.get('module'): + # self._module is the name of the module that last extended self name_id = 'model_'+self._name.replace('.', '_') cr.execute('select * from ir_model_data where name=%s and module=%s', (name_id, context['module'])) if not cr.rowcount: