Bank Template
This commit is contained in:
@@ -1585,7 +1585,9 @@
|
|||||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text"><invoice.report_payment_description or ''></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"> </text:span></text:span></text:p>
|
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text"><invoice.report_payment_description or ''></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"> </text:span></text:span></text:p>
|
||||||
<text:p text:style-name="P4"/>
|
<text:p text:style-name="P4"/>
|
||||||
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text"><if test="invoice.report_melya_bank_name"></text:placeholder>Bank: <text:placeholder text:placeholder-type="text"><invoice.report_melya_bank_name></text:placeholder><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text"><if test="invoice.report_melya_bank_name"></text:placeholder>Bank: <text:placeholder text:placeholder-type="text"><invoice.report_melya_bank_name></text:placeholder><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text"><for each="line in invoice.report_melya_bank_address.splitlines()"></text:placeholder><text:placeholder text:placeholder-type="text"><line></text:placeholder><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:span></text:span></text:p>
|
<text:p text:style-name="P8"><text:placeholder text:placeholder-type="text"><for each="line in invoice.report_melya_bank_address.splitlines()"></text:placeholder></text:p>
|
||||||
|
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:span></text:span></text:p>
|
||||||
|
<text:p text:style-name="P8"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||||
<text:p text:style-name="P4"/>
|
<text:p text:style-name="P4"/>
|
||||||
<text:p text:style-name="P22"><text:placeholder text:placeholder-type="text"><if test="invoice.report_melya_bank_iban"></text:placeholder>IBAN : <text:placeholder text:placeholder-type="text"><invoice.report_melya_bank_iban></text:placeholder><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
<text:p text:style-name="P22"><text:placeholder text:placeholder-type="text"><if test="invoice.report_melya_bank_iban"></text:placeholder>IBAN : <text:placeholder text:placeholder-type="text"><invoice.report_melya_bank_iban></text:placeholder><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||||
<text:p text:style-name="P22"><text:placeholder text:placeholder-type="text"><if test="invoice.report_melya_bank_swift"></text:placeholder>SwifT Code: <text:placeholder text:placeholder-type="text"><invoice.report_melya_bank_swift></text:placeholder><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
<text:p text:style-name="P22"><text:placeholder text:placeholder-type="text"><if test="invoice.report_melya_bank_swift"></text:placeholder>SwifT Code: <text:placeholder text:placeholder-type="text"><invoice.report_melya_bank_swift></text:placeholder><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||||
|
|||||||
@@ -668,17 +668,17 @@ class Invoice(metaclass=PoolMeta):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_report_bank_address_lines(account):
|
def _get_report_bank_address_lines(account):
|
||||||
address = Invoice._get_report_bank_address(account)
|
address = Invoice._get_report_bank_address(account)
|
||||||
full_address = getattr(address, 'full_address', None) if address else ''
|
if not address:
|
||||||
if not full_address and address:
|
return ''
|
||||||
city_line = ' '.join(filter(None, [
|
city_line = ' '.join(filter(None, [
|
||||||
getattr(address, 'postal_code', None),
|
getattr(address, 'postal_code', None),
|
||||||
getattr(address, 'city', None),
|
getattr(address, 'city', None),
|
||||||
]))
|
]))
|
||||||
full_address = '\n'.join(filter(None, [
|
full_address = '\n'.join(filter(None, [
|
||||||
getattr(address, 'name', None),
|
getattr(address, 'name', None),
|
||||||
getattr(address, 'street', None),
|
getattr(address, 'street', None),
|
||||||
city_line,
|
city_line,
|
||||||
]))
|
]))
|
||||||
return '\n'.join(
|
return '\n'.join(
|
||||||
line for line in (full_address or '').splitlines()
|
line for line in (full_address or '').splitlines()
|
||||||
if line.strip())
|
if line.strip())
|
||||||
|
|||||||
@@ -3265,7 +3265,12 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
|||||||
|
|
||||||
address = Mock(
|
address = Mock(
|
||||||
party_full_name='UBS SWITZERLAND AG',
|
party_full_name='UBS SWITZERLAND AG',
|
||||||
full_address='Case Postale\nCH-1211 Geneve 2',
|
name='Case Postale',
|
||||||
|
street='',
|
||||||
|
postal_code='CH-1211 Geneve 2',
|
||||||
|
city='',
|
||||||
|
full_address='UBS SWITZERLAND AG\nCase Postale\n'
|
||||||
|
'CH-1211 Geneve 2',
|
||||||
)
|
)
|
||||||
party = Mock(rec_name='UBS')
|
party = Mock(rec_name='UBS')
|
||||||
party.address_get.return_value = address
|
party.address_get.return_value = address
|
||||||
|
|||||||
Reference in New Issue
Block a user