[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user