diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-09-14 14:56:51 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-09-14 14:56:51 +0200 |
| commit | 6c103589c15dcf97603f3e2909871cb1fefd6484 (patch) | |
| tree | 51b91f486a999e5002eae283ba3668b08fa9c79f | |
| parent | b8cb25d052ece62ab7f34f690d97023b65b58fdf (diff) | |
| parent | ea0b3d600d3e7361758e83210b907c5dd5f2f7fe (diff) | |
[MERGE] forward port branch saas-11.3 up to ea0b3d600d3
| -rw-r--r-- | addons/mail/static/tests/chatter_tests.js | 1 | ||||
| -rw-r--r-- | addons/project/models/project.py | 1 | ||||
| -rw-r--r-- | addons/rating/models/rating.py | 8 |
3 files changed, 7 insertions, 3 deletions
diff --git a/addons/mail/static/tests/chatter_tests.js b/addons/mail/static/tests/chatter_tests.js index f98cd1382a8..a2b6566f4d0 100644 --- a/addons/mail/static/tests/chatter_tests.js +++ b/addons/mail/static/tests/chatter_tests.js @@ -168,6 +168,7 @@ QUnit.test('Activity Done keep feedback on blur', function (assert) { View: FormView, model: 'partner', data: this.data, + services: this.services, res_id: 2, arch:'<form string="Partners">' + '<div class="oe_chatter">' + diff --git a/addons/project/models/project.py b/addons/project/models/project.py index cf2e2f62d55..1e88f940a4b 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -399,6 +399,7 @@ class Project(models.Model): action_context = safe_eval(action['context']) if action['context'] else {} action_context.update(self._context) action_context['search_default_parent_res_name'] = self.name + action_context.pop('group_by', None) return dict(action, context=action_context) # --------------------------------------------------- diff --git a/addons/rating/models/rating.py b/addons/rating/models/rating.py index 9d2f56b82f8..3aea681b0fb 100644 --- a/addons/rating/models/rating.py +++ b/addons/rating/models/rating.py @@ -106,9 +106,11 @@ class Rating(models.Model): 'parent_res_id': False, } if hasattr(current_record, 'rating_get_parent'): - parent_res_model = getattr(current_record, current_record.rating_get_parent()) - data['parent_res_model_id'] = self.env['ir.model']._get(parent_res_model._name).id - data['parent_res_id'] = parent_res_model.id + current_record_parent = current_record.rating_get_parent() + if current_record_parent: + parent_res_model = getattr(current_record, current_record_parent) + data['parent_res_model_id'] = self.env['ir.model']._get(parent_res_model._name).id + data['parent_res_id'] = parent_res_model.id return data @api.multi |
