From ab2f5f157db6176739497ed8809bc834eb3be4d9 Mon Sep 17 00:00:00 2001 From: Sylvain Van Hoof Date: Thu, 29 Jan 2015 14:52:23 +0100 Subject: [PATCH] [FIX] partner_firstname: Change _id by id in the method copy_data to avoid problem with the new API --- partner_firstname/partner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/partner_firstname/partner.py b/partner_firstname/partner.py index 4be5cca8d..938709490 100644 --- a/partner_firstname/partner.py +++ b/partner_firstname/partner.py @@ -91,7 +91,7 @@ class ResPartner(orm.Model): return self.write(cursor, uid, partner_id, vals, context=context) - def copy_data(self, cr, uid, _id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): """ Avoid to replicate the firstname into the name when duplicating a partner @@ -101,13 +101,13 @@ class ResPartner(orm.Model): default = default.copy() default['lastname'] = ( _('%s (copy)') % self.read( - cr, uid, [_id], ['lastname'], context=context + cr, uid, [id], ['lastname'], context=context )[0]['lastname'] ) if default.get('name'): del(default['name']) return super(ResPartner, self).copy_data( - cr, uid, _id, default, context=context) + cr, uid, id, default, context=context) def create(self, cursor, uid, vals, context=None): """