[IMP] website_sale_stock: customer_lead field is now compute

no need to compute it manually on e-commerce order creation
This commit is contained in:
Victor Feyens
2021-12-23 15:30:23 +01:00
parent 24fbbb7f83
commit 3295fa4733
@@ -31,12 +31,6 @@ class SaleOrder(models.Model):
values['warning'] = self.warning_stock
return values
def _website_product_id_change(self, order_id, product_id, qty=0, **kwargs):
res = super(SaleOrder, self)._website_product_id_change(order_id, product_id, qty=qty, **kwargs)
product = self.env['product.product'].browse(product_id)
res['customer_lead'] = product.sale_delay
return res
def _get_stock_warning(self, clear=True):
self.ensure_one()
warn = self.warning_stock