[FIX] website_sale, website_sale_stock: fix deps
Commit d25719cd use in website_sale the field sale_delay defined in stock and
so only available with the module bridge website_sale_stock only.
After this commit, website_sale without stock works again.
This commit closes #26855, closes #24671
This commit is contained in:
@@ -105,7 +105,6 @@ class SaleOrder(models.Model):
|
||||
'order_id': order_id,
|
||||
'product_uom': product.uom_id.id,
|
||||
'price_unit': pu,
|
||||
'customer_lead': product.sale_delay,
|
||||
}
|
||||
|
||||
@api.multi
|
||||
|
||||
@@ -31,6 +31,13 @@ class SaleOrder(models.Model):
|
||||
values['warning'] = self.warning_stock
|
||||
return values
|
||||
|
||||
@api.multi
|
||||
def _website_product_id_change(self, order_id, product_id, qty=0):
|
||||
res = super(SaleOrder, self)._website_product_id_change(order_id, product_id, qty=qty)
|
||||
product = self.env['product.product'].browse(product_id)
|
||||
res['customer_lead'] = product.sale_delay
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
def _get_stock_warning(self, clear=True):
|
||||
self.ensure_one()
|
||||
|
||||
Reference in New Issue
Block a user