Closed R4Alex closed 1 year ago
Hi @hugho-ad Could you take a look at this PR? It is for odoo / odoo, I am working in a deiman task t#45937, point 2.
I need to be available to inherit this method. I would like to have your opinion before sending the PR to odoo.
Regards
It is currently impossible to modify the _cart_update behavoiur from website_sale_stock
The sale.order method _cart_update() updates the lines on the e-commerce shop cart, some modules override the method adding new features, the module website_sale_stock is one of them.
The specific behavior of _cart_update() in the module website_sale_stock allows to delete from the sale order the products whose demand is greater than the stock.
If the specific behavior of the module website_sale_stock is needed to be expanded or totally changed, that is not possible because the method _cart_update() should be always super called, even if the website_sale_stock code for _cart_update will be totally changed.
To allow inheriting just the specific behavior of website_sale_stock without affecting other modules. This commit creates a new method _cart_lines_stock_update() which have the important behavior for this module and will allow to be easier to inherit it..
OPW#2500355
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr