From 0216fa8828d3e00ca1bf1c059128a198120ef5b1 Mon Sep 17 00:00:00 2001 From: Nicolas Bessi Date: Mon, 3 Nov 2014 12:30:02 +0100 Subject: [PATCH] Fix override of customer address fields to use function --- partner_address_street3/model/partner.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/partner_address_street3/model/partner.py b/partner_address_street3/model/partner.py index c4ebd6442..832e6d9cb 100644 --- a/partner_address_street3/model/partner.py +++ b/partner_address_street3/model/partner.py @@ -20,7 +20,6 @@ ############################################################################## from openerp.osv import orm, fields from openerp.addons.base.res import res_partner -res_partner.ADDRESS_FIELDS = res_partner.ADDRESS_FIELDS + ('street3',) class res_partner(orm.Model): @@ -31,6 +30,12 @@ class res_partner(orm.Model): 'street3': fields.char('Street 3'), } + def _commercial_fields(self, cr, uid, context=None): + fields = super(res_partner, self + )._commercial_fields(cr, uid, context=context) + fields.append('street3') + return fields + class res_country(orm.Model): """Override default adresses formatting of coutries"""