Browse files

[IMP]base: Added loyalty point if contacts are merged.

Before this commit -
Loyalty points were not merging, if we merge two contacts.

After this,
New contact will have sum of all loyalty points of customes which are getting merged.

This commit is related to task #1869488.
  • Loading branch information...
pgu-odoo committed Jan 11, 2019
1 parent 80f3eb2 commit 38c3bcae6c668e3010771f0049b0937c1afaa2e6
Showing with 4 additions and 1 deletion.
  1. +4 −1 odoo/addons/base/wizard/
@@ -239,7 +239,10 @@ def write_serializer(item):
if field.type not in ('many2many', 'one2many') and field.compute is None:
for item in itertools.chain(src_partners, [dst_partner]):
if item[column]:
values[column] = write_serializer(item[column])
if column == 'loyalty_points' and values.get(column):
values[column] += write_serializer(item[column])
values[column] = write_serializer(item[column])
# remove fields that can not be updated (id and parent_id)
values.pop('id', None)
parent_id = values.pop('parent_id', None)

0 comments on commit 38c3bca

Please sign in to comment.