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

[FIX+IMP] _change_generic: Allow to transfer generic stuff between models + fix followers through SQL #272

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

pedrobaeza
Copy link
Member

Adding a new keyword argument allows us to pass a possible new model for using this function in other contexts like transferring the generic stuff from one model to another (e.g. from account.invoice to account.move in the v12 > v13 migration).

When adding this feature, I have discovered as well a bug in current code using the SQL method, where barely no followers where transferred, as the query was not having into account the model, so as soon as the partner is follower of any record of any model with such ID, then it's not transferred.

@Tecnativa

@pedrobaeza pedrobaeza force-pushed the _change_generic-new_model_name branch 2 times, most recently from f451859 to 394286a Compare December 27, 2021 11:59
…dels + fix followers through SQL

Adding a new keyword argument allows us to pass a possible new model for
using this function in other contexts like transferring the generic
stuff from one model to another (e.g. from account.invoice to
account.move in the v12 > v13 migration).

When adding this feature, I have discovered as well a bug in current
code using the SQL method, where barely no followers where transferred,
as the query was not having into account the model, so as soon as the
partner is follower of any record of any model with such ID, then it's
not transferred.
@pedrobaeza pedrobaeza force-pushed the _change_generic-new_model_name branch from 394286a to 66a3517 Compare December 27, 2021 23:34
Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the fix of the followers bug?

@pedrobaeza pedrobaeza merged commit a8e94ce into OCA:master Jan 13, 2022
@pedrobaeza pedrobaeza deleted the _change_generic-new_model_name branch January 13, 2022 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants