mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-23 01:31:59 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -38,6 +38,12 @@ class ResPartner(models.Model):
|
|||
@api.model
|
||||
def _get_address_format(self):
|
||||
# When sending a letter, the fields 'street' and 'street2' should be on a single line to fit in the address area
|
||||
if self.env.context.get('snailmail_layout') and self.country_id.code == 'DE':
|
||||
# Germany requires specific address formatting for Pingen
|
||||
result = "%(street)s"
|
||||
if self.street2:
|
||||
result += " // %(street2)s"
|
||||
return result + "\n%(zip)s %(city)s\n%(country_name)s"
|
||||
if self.env.context.get('snailmail_layout') and self.street2:
|
||||
return "%(street)s, %(street2)s\n%(city)s %(state_code)s %(zip)s\n%(country_name)s"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue