Skip to content

[19.0][MIG] product_barcode_required: Migration to 19.0#2282

Open
BhaveshHeliconia wants to merge 23 commits into
OCA:19.0from
HeliconiaIO:19.0-mig-product_barcode_required
Open

[19.0][MIG] product_barcode_required: Migration to 19.0#2282
BhaveshHeliconia wants to merge 23 commits into
OCA:19.0from
HeliconiaIO:19.0-mig-product_barcode_required

Conversation

@BhaveshHeliconia
Copy link
Copy Markdown
Contributor

No description provided.

simahawk and others added 22 commits May 5, 2026 16:08
Barcode on product template should not be required
if you have more than 1 variant.

When more than 1 variant is generated the field is hidden
and you cannot populate it anyway.

This, for instance, prevents duplicating products with more than one variant.
When we create a product template and select variant attributes, it
creates variants under the hood. The context key in
`_create_variant_ids` allows to bypass the check on the barcode, which
would be blocking.

If we have a related or computed field triggered by a create/write on a
product.template (`@api.depends('product_tmpl_id.foo')`), the check is
triggered and blocks the creation/write on the template.

We have then to ignore the check on variants on any create/write on
templates.
Currently translated at 100.0% (13 of 13 strings)

Translation: product-attribute-13.0/product-attribute-13.0-product_barcode_required
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_barcode_required/es/
Currently translated at 100.0% (13 of 13 strings)

Translation: product-attribute-13.0/product-attribute-13.0-product_barcode_required
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_barcode_required/ca/
Currently translated at 100.0% (14 of 14 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_barcode_required
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_barcode_required/ca/
Currently translated at 100.0% (14 of 14 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_barcode_required
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_barcode_required/it/
Currently translated at 100.0% (14 of 14 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_barcode_required
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_barcode_required/es/
@OCA-git-bot OCA-git-bot added series:19.0 mod:product_barcode_required Module product_barcode_required labels May 5, 2026
@BhaveshHeliconia BhaveshHeliconia force-pushed the 19.0-mig-product_barcode_required branch from 9c5d534 to f77baf2 Compare May 5, 2026 11:15
@BhaveshHeliconia BhaveshHeliconia mentioned this pull request May 6, 2026
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:product_barcode_required Module product_barcode_required series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants