Skip to content

[10.0][FIX] base: Merge records through SQL - #3000

Merged
pedrobaeza merged 1 commit into
OCA:10.0from
Tecnativa:10.0-base-fix-merge_by_sql
Dec 13, 2021
Merged

[10.0][FIX] base: Merge records through SQL#3000
pedrobaeza merged 1 commit into
OCA:10.0from
Tecnativa:10.0-base-fix-merge_by_sql

Conversation

@pedrobaeza

Copy link
Copy Markdown
Member

On this phase of the upgrade, ORM operations are very limited, as most models are not yet loaded, so we need to perform the merge by SQL for avoiding for example missing m2o replacements if the target model is not yet loaded.

Specific problem where I have found the issue is on product_instrastat module that adds a country m2o in account.invoice, and this one is not changed and when removing the record, the fk constraint is triggered.

@Tecnativa TT30237

On this phase of the upgrade, ORM operations are very limited, as most
models are not yet loaded, so we need to perform the merge by SQL for
avoiding for example missing m2o replacements if the target model is not
yet loaded.

Specific problem where I have found the issue is on `product_instrastat`
module that adds a country m2o in `account.invoice`, and this one is
not changed and when removing the record, the fk constraint is
triggered.

TT30237
@pedrobaeza pedrobaeza added this to the 10.0 milestone Dec 7, 2021
@pedrobaeza

Copy link
Copy Markdown
Member Author

Tested and working on the problematic DB.

@pedrobaeza
pedrobaeza merged commit 0939524 into OCA:10.0 Dec 13, 2021
@pedrobaeza
pedrobaeza deleted the 10.0-base-fix-merge_by_sql branch December 13, 2021 13:15
@pedrobaeza

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants