[IMP]:base/res : remove type from display address
bzr revid: sbh@tinyerp.com-20120330045752-m9d9vgt92uro6fle
This commit is contained in:
parent
fe45a9a7de
commit
a61f7ce8d1
|
@ -391,7 +391,7 @@ class res_partner(osv.osv):
|
||||||
('name','=','main_partner')])[0],
|
('name','=','main_partner')])[0],
|
||||||
).res_id
|
).res_id
|
||||||
|
|
||||||
def _display_address(self, cr, uid, address, type='', context=None):
|
def _display_address(self, cr, uid, address, context=None):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
The purpose of this function is to build and return an address formatted accordingly to the
|
The purpose of this function is to build and return an address formatted accordingly to the
|
||||||
|
@ -403,12 +403,6 @@ class res_partner(osv.osv):
|
||||||
:rtype: string
|
:rtype: string
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if type:
|
|
||||||
if address.is_company and address.child_ids:
|
|
||||||
for child_id in address.child_ids:
|
|
||||||
if child_id.type == type:
|
|
||||||
address = child_id
|
|
||||||
|
|
||||||
# get the information that will be injected into the display format
|
# get the information that will be injected into the display format
|
||||||
# get the address format
|
# get the address format
|
||||||
address_format = address.country_id and address.country_id.address_format or \
|
address_format = address.country_id and address.country_id.address_format or \
|
||||||
|
|
|
@ -299,7 +299,7 @@ class rml_parse(object):
|
||||||
parse_format = DEFAULT_SERVER_DATETIME_FORMAT
|
parse_format = DEFAULT_SERVER_DATETIME_FORMAT
|
||||||
if isinstance(value, basestring):
|
if isinstance(value, basestring):
|
||||||
# FIXME: the trimming is probably unreliable if format includes day/month names
|
# FIXME: the trimming is probably unreliable if format includes day/month names
|
||||||
# and those would need to be translated anyway.
|
# and those would need to be translated anyway.
|
||||||
date = datetime.strptime(value[:get_date_length(parse_format)], parse_format)
|
date = datetime.strptime(value[:get_date_length(parse_format)], parse_format)
|
||||||
elif isinstance(value, time.struct_time):
|
elif isinstance(value, time.struct_time):
|
||||||
date = datetime(*value[:6])
|
date = datetime(*value[:6])
|
||||||
|
@ -320,8 +320,8 @@ class rml_parse(object):
|
||||||
res='%s %s'%(currency_obj.symbol, res)
|
res='%s %s'%(currency_obj.symbol, res)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def display_address(self, address_browse_record, type=''):
|
def display_address(self, address_browse_record):
|
||||||
return self.pool.get('res.partner')._display_address(self.cr, self.uid, address_browse_record, type)
|
return self.pool.get('res.partner')._display_address(self.cr, self.uid, address_browse_record)
|
||||||
|
|
||||||
def repeatIn(self, lst, name,nodes_parent=False):
|
def repeatIn(self, lst, name,nodes_parent=False):
|
||||||
ret_lst = []
|
ret_lst = []
|
||||||
|
|
Loading…
Reference in New Issue