CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
In which part of the product.py I need to put your piece of code to be functional?
I try to modify the product_id and name field too to show different elements but I can't do it..
To show only the name without the code in Description field, you can do: (product.py line 1017 +/-)
name = d.get('name','')
code = context.get('display_default_code', True) and d.get('default_code',False) or False
But because of I can't try your code I don't know if this will overwrite your class or not. It means that I understand that your "Product" column is searchable too. With the change that I tell, this column is searchable and it only shows the product name.
I'll try yo add another field to product changing the python code, but I can't do it too. This change will be to add an extra field that only have the default code apart of the fields 'product_id' and 'name'.
Hi everyone, I found how to show in th product column the default_code but for the description I still get the default_code + the name any help about this
This is my code:
def name_get(self, cr, uid, ids, context=None):
return_val = super(snc_product, self).name_get(cr, uid, ids, context=context)
res = 
code = d.get('code','')
code = code + ' - %s' % (d['variants'],)
return (d['id'], code)
for product in self.browse(cr, uid, ids, context=context):
return res or return_val
About This Community
Odoo Training Center
|Asked: 7/16/15, 6:57 AM|
|Seen: 1097 times|
|Last updated: 9/14/15, 7:13 AM|