Skip to content

Commit

Permalink
[IMP] big fat remake
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Jul 28, 2023
1 parent 0f28f4e commit 5edf8bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _get_single_commission_amount(self, commission, subtotal, product, quantity)
self.ensure_one()

Check warning on line 163 in sale_commission_product_criteria_domain/models/commission.py

View check run for this annotation

Codecov / codecov/patch

sale_commission_product_criteria_domain/models/commission.py#L163

Added line #L163 was not covered by tests
if product.commission_free or not commission:
return 0.0

Check warning on line 165 in sale_commission_product_criteria_domain/models/commission.py

View check run for this annotation

Codecov / codecov/patch

sale_commission_product_criteria_domain/models/commission.py#L165

Added line #L165 was not covered by tests
if commission.commission_type != "product":
if commission.commission_type not in ["product", "product_restricted"]:
return self._get_commission_amount(commission, subtotal, product, quantity)
item_ids = self._get_commission_items(commission, product)
partner = False

Check warning on line 169 in sale_commission_product_criteria_domain/models/commission.py

View check run for this annotation

Codecov / codecov/patch

sale_commission_product_criteria_domain/models/commission.py#L167-L169

Added lines #L167 - L169 were not covered by tests
Expand Down

0 comments on commit 5edf8bf

Please sign in to comment.