From 14270ec662c561107be79e3cd168d2ecad7ee74c 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 [FIX] partner_firstname : Remove the value checks in tests. With Odoo v8, the value checks in tests raise a Warning "2015-02-05 08:59:44,867 4590 WARNING 00846-develop-v8-9743ea-all openerp.modules.module: Found deprecated fast_suite or checks attribute in test module openerp.addons.partner_firstname.tests. These have no effect in or after version 8.0." With Runbot, we cannot have any Warning. --- partner_firstname/partner.py | 6 +++--- partner_firstname/tests/__init__.py | 4 ---- 2 files changed, 3 insertions(+), 7 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): """ diff --git a/partner_firstname/tests/__init__.py b/partner_firstname/tests/__init__.py index 5c1049505..71518a9dc 100644 --- a/partner_firstname/tests/__init__.py +++ b/partner_firstname/tests/__init__.py @@ -29,7 +29,3 @@ ############################################################################## from . import test_partner_firstname - -checks = [ - test_partner_firstname -]