summaryrefslogtreecommitdiff
path: root/addons/sms/models
diff options
context:
space:
mode:
authorLucas Lefèvre <lul@odoo.com>2019-10-25 07:09:10 +0000
committerLucas Lefèvre <lul@odoo.com>2019-10-25 14:22:36 +0000
commit2dccf4d6cd076ed768f5ec7acbf3c41ef3e06c2e (patch)
tree6ae6bc0cf6dedd2f2bd3c9a86b57019eddda78b7 /addons/sms/models
parent32f14b9118127655c55faa523268c080b7ea7f59 (diff)
[IMP] project: Use stored computed fields for parent to children task
Purpose ======= When you create a task independently and link it to a Parent task later on, several changes are applied: the person assigned on the sub-task switches to the one set on the parent task, same for the customer, and so on. This creates frustration because the user most likely set specific data on the sub task for a reason. In addition, the changes are made implicitely, so the user might not notice it or get confused as to what changed from the original task. Specification ============= Values for fields `partner_id`, `email_from`, `project_id`, `sale_line_id` should be transfered from parent task to children task, only if the value is not already set on the child. This was already partially implemented by 749810a and 45396f7. But to achieve it, similar code was duplicated in several methods: default_get, onchanges, write, create. Since the new ORM, the same behavior can be achieved with only computed fields with store=True and readonly=False. This commit changes the previous implementation to take advantage of this which greatly improves code readability and maintainability. Tests by Maximilen Larue Business code by Lucas Lefèvre closes odoo/odoo#39369 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by: MaxLarue <mla@odoo.com>
Diffstat (limited to 'addons/sms/models')
0 files changed, 0 insertions, 0 deletions