Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
try name_get override
_columns = {
'name': fields.function(_combine, type='char',arg=('model1_id.name','model2_id.name'), method=True ,string=" "),
'model1_id':fields.many2one('model1.model1',' '),
'model2_id':fields.many2one('model2.model2',' '),
}
def _combine(self, cr, uid, ids, field_name, args, context=None):
values = {}
for id in ids:
rec = self.browse(cr, uid, [id], context=context)[0]
values[id] = {}
values[id] = '%s -- %s' % (rec.model1_id.name, rec.model2_id.name)
return values
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up