From 9ebf7ca395ffb0b413090793e7901fa1545dd1b4 Mon Sep 17 00:00:00 2001 From: jbeficent Date: Fri, 5 Dec 2014 19:11:34 +0100 Subject: [PATCH] Method '_address_fields' should super and then add 'street3'. --- partner_address_street3/model/partner.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/partner_address_street3/model/partner.py b/partner_address_street3/model/partner.py index 25667e337..2a444be02 100644 --- a/partner_address_street3/model/partner.py +++ b/partner_address_street3/model/partner.py @@ -21,9 +21,6 @@ from openerp.osv import orm, fields from openerp.addons.base.res import res_partner -ADDRESS_FIELDS = ('street', 'street2', 'street3', 'zip', 'city', - 'state_id', 'country_id') - class res_partner(orm.Model): """Add third field in address""" @@ -36,7 +33,11 @@ class res_partner(orm.Model): def _address_fields(self, cr, uid, context=None): """ Returns the list of address fields that are synced from the parent when the `use_parent_address` flag is set. """ - return list(ADDRESS_FIELDS) + res = super(res_partner, self + )._address_fields(cr, uid, context=context) + res.append('street3') + return res + def _commercial_fields(self, cr, uid, context=None): fields = super(res_partner, self