[FIX] website_quote: onchange for product with sale.quote.option
The on_change_product_id defined for sale.quote.option has been removed in the form view. opw:673285
This commit is contained in:
@@ -328,6 +328,18 @@ class sale_quote_option(osv.osv):
|
||||
'quantity': 1,
|
||||
}
|
||||
|
||||
@api.onchange('product_id')
|
||||
def _onchange_product_id(self):
|
||||
if not self.product_id:
|
||||
return
|
||||
product = self.product_id
|
||||
self.price_unit = product.list_price
|
||||
self.website_description = product.product_tmpl_id.quote_description
|
||||
self.name = product.name
|
||||
self.uom_id = product.uom_id
|
||||
domain = {'uom_id': [('category_id', '=', self.product_id.uom_id.category_id.id)]}
|
||||
return {'domain': domain}
|
||||
|
||||
def on_change_product_id(self, cr, uid, ids, product, uom_id=None, context=None):
|
||||
vals, domain = {}, []
|
||||
product_obj = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||
|
||||
Reference in New Issue
Block a user