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

[15.0][ADD] product_variant_template_reassign: New module #373

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from

Conversation

chienandalu
Copy link
Member

@chienandalu chienandalu commented Nov 5, 2024

cc @Tecnativa TT51495

ready for review @carlosdauden @pedrobaeza

@chienandalu chienandalu force-pushed the 15.0-add-product_variant_template_reassign branch 3 times, most recently from b333364 to 5ceb0cb Compare November 5, 2024 16:20
@pedrobaeza pedrobaeza added this to the 15.0 milestone Nov 5, 2024
if not new_variant:
raise UserError(
_(
"The attributes selected didn't generate a variant in the target template"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"The attributes selected didn't generate a variant in the target template"
"The selected attributes didn't generate a variant in the target template"

"product.template",
self.origin_product_template_id.ids,
self.target_product_template_id.id,
method="sql",
Copy link
Member

Choose a reason for hiding this comment

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

With method="sql", the possible default_code in the unique variant is lost, as well as other data. One possibility is to specify the merge options.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, done. Although with products with operations like done stock moves normally isn't possible

Copy link
Member

Choose a reason for hiding this comment

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

Well, I was not talking about changing the merge method, but adding the extra parameters to indicate the field merge options.

self.target_product_template_id.id,
method="sql",
)
return {
Copy link
Member

Choose a reason for hiding this comment

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

Please drop a comment in the thread saying that it has been merged for tracking purposes.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@chienandalu chienandalu force-pushed the 15.0-add-product_variant_template_reassign branch from 5ceb0cb to b1d5b3e Compare November 5, 2024 17:39
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