Browse Source

Merge pull request #42 from nbessi/partner-contact-street3

Fix override of customer address fields to use function
pull/54/head
Leonardo Pistone 10 years ago
parent
commit
a75c3e6fb1
  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