Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
Description of the issue/feature this PR addresses:
Module account is adding customer_rank and supplier_rank in res.partner for computing the amount of their generated incoming/outgoing account moves but they are copied when a partner is duplicated, IMHO those fields have not to be copied, and also there is a method called _get_summable_fields in base in order to get all fields that should be summed when partners are merged and those fields apply exactly for that.
Also, we set the context in copy method to simulate where was create the original record.
Video of runbot where customer_rank is copied when duplicating a partner
Description of the issue/feature this PR addresses:
Module
account
is addingcustomer_rank
andsupplier_rank
inres.partner
for computing the amount of their generated incoming/outgoing account moves but they are copied when a partner is duplicated, IMHO those fields have not to be copied, and also there is a method called_get_summable_fields
inbase
in order to get all fields that should be summed when partners are merged and those fields apply exactly for that.Also, we set the context in
copy
method to simulate where was create the original record.Video of runbot where
customer_rank
is copied when duplicating a partnerhttps://youtu.be/2EXF6urXcsQ
Current behavior before PR:
Fields
*_rank
are copied when a partner is duplicated and aren't summed when partners are merged.Desired behavior after PR is merged:
Fields
*_rank
are set with1
when the original partner has a rank in any of those fields and 0 when hasn't and they are added in summable fields.-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr