summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent de Labarre <florent.mirieu@gmail.com>2021-04-21 07:18:24 +0000
committerFlorent de Labarre <florent.mirieu@gmail.com>2021-04-21 07:18:24 +0000
commit41d323c5ca665098fe2e54a40bc11a8f26ce463a (patch)
treea0d8f2220ea3f509aa23b8c91258d497b2910fe7
parent7405d2a38728d11a5a96c115d7c0c0320dd5ac8e (diff)
[FIX] account_edi_facturx: wrong ID
To be compliant with the facturx, the name of invoice should be the sequence given by Odoo (ex : INV/2021/04/0001) and not the ref. closes odoo/odoo#68528 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
-rw-r--r--addons/account_edi_facturx/data/facturx_templates.xml2
-rw-r--r--addons/account_edi_facturx/tests/test_facturx.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/account_edi_facturx/data/facturx_templates.xml b/addons/account_edi_facturx/data/facturx_templates.xml
index 719a1caae48..c68389b1e9f 100644
--- a/addons/account_edi_facturx/data/facturx_templates.xml
+++ b/addons/account_edi_facturx/data/facturx_templates.xml
@@ -112,7 +112,7 @@
<!-- Document Headers. -->
<rsm:ExchangedDocument>
- <ram:ID t-esc="record.ref"/>
+ <ram:ID t-esc="record.name"/>
<ram:TypeCode t-esc="'381' if 'refund' in record.move_type else '380'"/>
<ram:IssueDateTime>
<udt:DateTimeString format="102" t-esc="format_date(record.invoice_date)"/>
diff --git a/addons/account_edi_facturx/tests/test_facturx.py b/addons/account_edi_facturx/tests/test_facturx.py
index b1f556adceb..92eb22655d0 100644
--- a/addons/account_edi_facturx/tests/test_facturx.py
+++ b/addons/account_edi_facturx/tests/test_facturx.py
@@ -66,6 +66,7 @@ class TestAccountEdiFacturx(AccountEdiTestCommon):
</GuidelineSpecifiedDocumentContextParameter>
</ExchangedDocumentContext>
<ExchangedDocument>
+ <ID>INV/2017/01/0001</ID>
<TypeCode>380</TypeCode>
<IssueDateTime>
<DateTimeString format="102">20170101</DateTimeString>