Add Payment order template
This commit is contained in:
@@ -227,11 +227,16 @@ class Invoice(metaclass=PoolMeta):
|
||||
@property
|
||||
def report_payment_order_currency_code(self):
|
||||
currency = self.currency
|
||||
return (
|
||||
getattr(currency, 'code', None)
|
||||
or getattr(currency, 'rec_name', None)
|
||||
or getattr(currency, 'symbol', None)
|
||||
or '')
|
||||
code = getattr(currency, 'code', None) or ''
|
||||
rec_name = getattr(currency, 'rec_name', None) or ''
|
||||
symbol = getattr(currency, 'symbol', None) or ''
|
||||
if code and any(ch.isalpha() for ch in code):
|
||||
return code
|
||||
if rec_name and any(ch.isalpha() for ch in rec_name):
|
||||
return rec_name
|
||||
if symbol and any(ch.isalpha() for ch in symbol):
|
||||
return symbol
|
||||
return code or rec_name or symbol or ''
|
||||
|
||||
@property
|
||||
def report_payment_order_amount_text(self):
|
||||
|
||||
Reference in New Issue
Block a user