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

[16.0][FIX] product_pack: Ignore pack_component_price for non_detailed pack #147

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion product_pack/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ def _is_pack_to_be_handled(self):
)
is_pack |= self.pack_ok and (
(self.pack_type == "detailed" and self.pack_component_price == "totalized")
or self.pack_type == "non_detailed"
or (
self.pack_type == "non_detailed"
and
self.pack_component_price != "ignored"
)
)
return is_pack

Expand Down
2 changes: 1 addition & 1 deletion product_pack/views/product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/>
<field
name="pack_component_price"
attrs="{'required':[('pack_type', '=', 'detailed')], 'invisible':[('pack_type', '!=', 'detailed')]}"
attrs="{'required':[('pack_type', '=', 'detailed')]}"
/>
<field
name="pack_modifiable"
Expand Down
Loading