Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] base: allow exclude tables to update in merging partners #577

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion odoo/addons/base/wizard/base_partner_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ def _update_foreign_keys(self, src_partners, dst_partner):
# this guarantees cache consistency
self.env.invalidate_all()

ignore_tables = dst_partner._context.get('ignore_tables_fk', False)
for table, column in relations:
if 'base_partner_merge_' in table: # ignore two tables
if 'base_partner_merge_' in table or (ignore_tables and table in ignore_tables): # ignore two tables
continue

# get list of columns of current table (exept the current fk column)
Expand Down