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] joint_buying_product: fix bug introduced by https://github.com/… #110

Draft
wants to merge 1 commit into
base: 12.0
Choose a base branch
from
Draft
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: 4 additions & 2 deletions joint_buying_product/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ def _compute_joint_buying_grouped_order_qty(self):

@api.constrains("joint_buying_use_category", "joint_buying_frequency_ids")
def _check_joint_buying_use_category(self):
for partner in self.filtered(lambda x: not x.joint_buying_use_category):
if partner.mapped("joint_buying_frequency_ids.category_ids"):
for partner in self.filtered(lambda x: x.is_joint_buying):
if not partner.joint_buying_use_category and partner.mapped(
"joint_buying_frequency_ids.category_ids"
):
raise ValidationError(
_(
"You can not uncheck 'Use Order Categories'"
Expand Down
Loading