'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description',
'product_tmpl_id'],
domain: function(self){ return [['sale_ok','=',true],['available_in_pos','=',true]]; },
- context: function(self){ return { pricelist: self.pricelist.id }; },
+ context: function(self){ return { pricelist: self.pricelist.id, display_default_code: false }; },
loaded: function(self, products){
self.db.add_products(products);
},
unit_name: this.get_unit().name,
price: this.get_unit_price(),
discount: this.get_discount(),
- product_name: this.get_product().name,
+ product_name: this.get_product().display_name,
price_display : this.get_display_price(),
price_with_tax : this.get_price_with_tax(),
price_without_tax: this.get_price_without_tax(),
def _name_get(d):
name = d.get('name','')
- code = d.get('default_code',False)
+ code = context.get('display_default_code', True) and d.get('default_code',False) or False
if code:
name = '[%s] %s' % (code,name)
return (d['id'], name)