[IMP] stock: name_Get of stock.production.lot now also shows the partner (if any)
bzr revid: qdp-launchpad@openerp.com-20130804004303-h6jcpka0xvqplov3
This commit is contained in:
parent
8310ef808c
commit
dc62d65efa
|
@ -813,6 +813,15 @@ class stock_production_lot(osv.osv):
|
||||||
_sql_constraints = [
|
_sql_constraints = [
|
||||||
('name_ref_uniq', 'unique (name, ref)', 'The combination of Serial Number and internal reference must be unique !'),
|
('name_ref_uniq', 'unique (name, ref)', 'The combination of Serial Number and internal reference must be unique !'),
|
||||||
]
|
]
|
||||||
|
def name_get(self, cr, uid, ids, context=None):
|
||||||
|
res = []
|
||||||
|
for lot in self.browse(cr, uid, ids, context=context):
|
||||||
|
name = lot.name
|
||||||
|
if lot.partner_id:
|
||||||
|
name += ' (' + lot.partner_id.name + ')'
|
||||||
|
res.append((lot.id, name))
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue