summaryrefslogtreecommitdiff
path: root/addons/base_setup
diff options
context:
space:
mode:
authorRomainLibert <rli@odoo.com>2018-01-22 12:08:56 +0100
committerRomainLibert <rli@odoo.com>2018-02-23 16:13:03 +0100
commit12b580c953a762e40fb4a07a3fe5be3d119fa406 (patch)
treecf0477aa42c68e7149eb6fdbde60a0f37db25a5c /addons/base_setup
parentffbee8882e6b1a4145630253432dccd675233d10 (diff)
[IMP] rating: Parent document name update
For objects inherting from rating.mixin, when their parent model change (e.i.: task from a project to another), the "Parent document name" does not change. The rating is still considered belonging to the old parent object (rating stat of project is not correct). Change the rating API. In rating mixin, instead of having 2 methods returning parent id and parent model (rating_get_parent_id and rating_get_parent_model_name), we should have one method returning the 'parent relation field' (inevitably m2o field). Then we can deduce its parent_res_id/parent_res_model, and check this parent field is in values of write to trigger the recompute of parent_res_name. Also, add "ondelete=cascade" on parent_res_model_id Impacted modules: project, rating, helpdesk, livechat
Diffstat (limited to 'addons/base_setup')
0 files changed, 0 insertions, 0 deletions