[REF] account: Sum rank for merge partner

* Sum rank fields if the partner is merged

It will help to increase the rank of both records and have a better ranking

closes odoo/odoo#141690

X-original-commit: afb5c915c5bc566628ed5283a6e434e123caaaf1
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: Moisés Lopéz <moylop260@vauxoo.com>
This commit is contained in:
Fernanda Hernández
2023-11-10 12:33:39 +00:00
co-authored by Moisés Lopéz
parent 0a8f326397
commit 4af024de5b
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -12,3 +12,4 @@ from . import base_document_layout
from . import account_payment_register
from . import account_tour_upload_bill
from . import accrued_orders
from . import base_partner_merge
@@ -0,0 +1,11 @@
from odoo import models
class MergePartnerAutomatic(models.TransientModel):
_inherit = 'base.partner.merge.automatic.wizard'
def _get_summable_fields(self):
"""Add to summable fields list, fields created in this module.
- customer_rank and supplier_rank will have a better ranking for the merged partner
"""
return super()._get_summable_fields() + ['customer_rank', 'supplier_rank']