Open arielbarreiros96 opened 3 months ago
Hello @ilyasProgrammer I have created a PR to solve this issue with sale_commission_product_criteria in 16.0 I´ve seen that you are using basically the same __computeamount method in your _sale_commission_product_criteriadomain, maybe this fix can help to you as well. It basically takes into account the credit notes as well, since at the moment credit notes are creating positive commissions.
Module
sale_commission_product_criteria
Describe the bug
When Product Criteria is used as commission type, the settlement of credit notes may create commissions with positive amount.
To Reproduce
Affected versions: at least 14.0 and 16.0
Steps to reproduce the behavior:
Expected behavior The settlement should contain a line of commission with a positive amount, related to the invoice. The settlement should contain another line with the same amount, but in this case, as a negative amount, related to the credit note. In reality, there are 2 positive lines with the same amount.
Additional context Tested on v14 CE and v16 CE