Skip to content

Commit

Permalink
[IMP] sale_commission_product_criteria_discount: correct commission t…
Browse files Browse the repository at this point in the history
…ype check
  • Loading branch information
ilyasProgrammer committed Aug 22, 2023
1 parent 2fe4eec commit 641c2c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sale_commission_product_criteria_discount/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _get_single_commission_amount(self, commission, subtotal, product, quantity)
self.ensure_one()
if product.commission_free or not commission:
return 0.0
if commission.commission_type != "product":
if commission.commission_type in ["percentage", "fixed"]:
return self._get_commission_amount(commission, subtotal, product, quantity)
item_ids = self._get_commission_items(commission, product)
if not item_ids:
Expand Down
6 changes: 6 additions & 0 deletions setup/sale_commission_product_criteria_domain/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 641c2c4

Please sign in to comment.