Browse Source

Fix override of customer address fields to use function

pull/42/head
Nicolas Bessi 10 years ago
parent
commit
0216fa8828
  1. 7
      partner_address_street3/model/partner.py

7
partner_address_street3/model/partner.py

@ -20,7 +20,6 @@
############################################################################## ##############################################################################
from openerp.osv import orm, fields from openerp.osv import orm, fields
from openerp.addons.base.res import res_partner from openerp.addons.base.res import res_partner
res_partner.ADDRESS_FIELDS = res_partner.ADDRESS_FIELDS + ('street3',)
class res_partner(orm.Model): class res_partner(orm.Model):
@ -31,6 +30,12 @@ class res_partner(orm.Model):
'street3': fields.char('Street 3'), '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): class res_country(orm.Model):
"""Override default adresses formatting of coutries""" """Override default adresses formatting of coutries"""

Loading…
Cancel
Save