@@ -1,3 +1,4 @@
|
||||
* Add support for payment reference of invoice
|
||||
|
||||
Version 7.8.0 - 2025-12-15
|
||||
--------------------------
|
||||
|
||||
@@ -124,6 +124,9 @@ class IncomingSupplierInvoice(metaclass=PoolMeta):
|
||||
"Cannot parse payment term date "
|
||||
f"'{payment_term_date}'")
|
||||
|
||||
if payment_reference := invoice_data.get('payment_reference'):
|
||||
invoice.supplier_payment_reference = payment_reference
|
||||
|
||||
lines = []
|
||||
for parsed_line in invoice_data.get('lines', []):
|
||||
line = self._process_supplier_invoice_line(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
* Add support for payment reference of invoice
|
||||
|
||||
Version 7.8.0 - 2025-12-15
|
||||
--------------------------
|
||||
|
||||
@@ -56,6 +56,8 @@ with :guilabel:`Supplier Invoice` type, you may add the metadata fields:
|
||||
|
||||
- ``payment_term_date``: ``Date`` (optional)
|
||||
|
||||
- ``payment_reference``: ``String`` (optional)
|
||||
|
||||
- ``total_amount``: ``Number``
|
||||
|
||||
- ``untaxed_amount``: ``Number`` (optional)
|
||||
|
||||
@@ -115,8 +115,8 @@ class IncomingOCRService(metaclass=PoolMeta):
|
||||
for name in [
|
||||
'company_name', 'company_tax_identifier', 'supplier_name',
|
||||
'tax_identifier', 'currency', 'number', 'description',
|
||||
'invoice_date', 'payment_term_date', 'total_amount',
|
||||
'purchase_orders']:
|
||||
'invoice_date', 'payment_term_date', 'payment_reference',
|
||||
'total_amount', 'purchase_orders']:
|
||||
value = get_best_value(fields, name)
|
||||
if value is not None:
|
||||
if name == 'total_amount':
|
||||
@@ -270,6 +270,8 @@ class IncomingOCRService(metaclass=PoolMeta):
|
||||
return invoice.payment_term_date.isoformat()
|
||||
else:
|
||||
return ''
|
||||
elif name == 'payment_reference':
|
||||
return invoice.supplier_payment_reference
|
||||
elif name == 'untaxed_amount':
|
||||
return str(invoice.untaxed_amount)
|
||||
elif name == 'tax_amount':
|
||||
|
||||
Reference in New Issue
Block a user