diff options
| author | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2013-08-04 02:43:03 +0200 |
|---|---|---|
| committer | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2013-08-04 02:43:03 +0200 |
| commit | dc62d65efab276497d6021cdb5f7a333ea7efe6c (patch) | |
| tree | 1a2b4f6fd86b382b9f632ae84cc8fd160887b18d | |
| parent | 8310ef808c63b32c65315675d64236196bdec028 (diff) | |
[IMP] stock: name_Get of stock.production.lot now also shows the partner (if any)
bzr revid: qdp-launchpad@openerp.com-20130804004303-h6jcpka0xvqplov3
| -rw-r--r-- | addons/stock/stock.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d66c318cb81..a6cd65d8666 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -813,6 +813,15 @@ class stock_production_lot(osv.osv): _sql_constraints = [ ('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 + # ---------------------------------------------------- |
