purchase-workflow icon indicating copy to clipboard operation
purchase-workflow copied to clipboard

[16.0] purchase_triple_discount: missing function

Open greciosd opened this issue 7 months ago • 0 comments

Hello.

I have noticed that when migrating the "purchase_triple_discount" module to version 16, the "_get_discounted_price_unit" function has been removed from "models/purchase_order.py". This implies that when the delivery note is created, the "price_unit" field of the "stock.move" model does not have the correct calculation, since it only takes into account the first discount, and not discounts 2 and 3. One of the consequences is that if the "purchase_landed_cost" module is installed, when importing a delivery note into a purchase landed cost distribution, the unit price is wrong, since it is retrieved from the "price_unit" field of "stock.move".

Is there any specific reason to have removed the "_get_discounted_price_unit" function from "purchase_triple_discount" module?

Thanks in advance.

greciosd avatar Jul 25 '24 13:07 greciosd