From 7b36357001d797c2869032f561690ccd47e8475a Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Thu, 3 Jan 2013 11:39:35 +0100 Subject: [PATCH] [FIX] Lunch name changed to have the good breadcrumb lp bug: https://launchpad.net/bugs/1095566 fixed bzr revid: api@openerp.com-20130103103935-i1vdmukol420r62p --- addons/lunch/lunch.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py index f61ecc8eb7d..1c78633ccac 100644 --- a/addons/lunch/lunch.py +++ b/addons/lunch/lunch.py @@ -35,6 +35,16 @@ class lunch_order(osv.Model): _description = 'Lunch Order' _order = 'date desc' + def name_get(self, cr, uid, ids, context=None): + if not ids: + return [] + res = [] + for elmt in self.browse(cr, uid, ids, context=context): + name = _("Lunch Order") + name = name + ' ' + str(elmt.id) + res.append((elmt.id, name)) + return res + def _price_get(self, cr, uid, ids, name, arg, context=None): """ get and sum the order lines' price