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

[FEATURE] pack_line_ids on product.template use as default if none are set on product.product #178

Open
tarteo opened this issue Aug 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tarteo
Copy link
Member

tarteo commented Aug 29, 2024

Is your feature request related to a problem?
Currently if you have a product.template with variants (product.product). You will have to set the pack lines for every product even if they're all the same for all variants.

pack_line_ids = fields.One2many(
related="product_variant_ids.pack_line_ids",
)

<page name="page_pack" position="attributes">
<attribute
name="attrs"
>{'invisible': ['|', ('product_variant_count', '>', 1), ('pack_ok', '=', False)]}</attribute>
</page>

Describe the solution you'd like
Add a field product_tmpl_id to product.pack.line and make it work kinda like product.supplierinfo. Where it falls back to product.template or make product.pack.line linked to a product.product override the ones on product.template.

Additional context
We have a product which has many variants but always is packed with let say four bolts and screws (just an theoretical example).

@tarteo tarteo added the enhancement New feature or request label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant