[FIX] l10n_sa_edi: B2C QRCode IssueTime Warning
Have an Invoice partner with type Individual
Create an invoice with said customer confirm.
ZATCA invoice has warning "invoiceTimeStamp_QRCODE_INVALID".
```
{"type":"WARNING",
"code":"invoiceTimeStamp_QRCODE_INVALID",
"category":"QRCODE_VALIDATION",
"message":"Time on QR Code does not match with Invoice Issue Time (KSA-25).
If ZATCA's SDK was used to generate QR Code, kindly use the
latest version of SDK",
"status":"WARNING"}
```
This occurs because when the Invoice partner is an Individual
the validation requires an additional QR code enclosing invoice information
that needs to match the xml content.
In this case the IssueTime of the invoice was not matching because the
QR is manually formatted with a wrong 'Z' at the end, while its timezone
is, correctly, Asia/Riyadh
opw-3586326
closes odoo/odoo#143697
X-original-commit: da50d78ee73661cb2af599e0f4276f3d9a891e16
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit is contained in:
@@ -101,7 +101,7 @@ class AccountMove(models.Model):
|
||||
seller_name_enc = self._l10n_sa_get_qr_code_encoding(1, journal_id.company_id.display_name.encode())
|
||||
seller_vat_enc = self._l10n_sa_get_qr_code_encoding(2, journal_id.company_id.vat.encode())
|
||||
timestamp_enc = self._l10n_sa_get_qr_code_encoding(3,
|
||||
invoice_datetime.strftime("%Y-%m-%dT%H:%M:%SZ").encode())
|
||||
invoice_datetime.strftime("%Y-%m-%dT%H:%M:%S").encode())
|
||||
amount_total_enc = self._l10n_sa_get_qr_code_encoding(4, float_repr(abs(amount_total), 2).encode())
|
||||
amount_tax_enc = self._l10n_sa_get_qr_code_encoding(5, float_repr(abs(amount_tax), 2).encode())
|
||||
invoice_hash_enc = self._l10n_sa_get_qr_code_encoding(6, invoice_hash)
|
||||
|
||||
Reference in New Issue
Block a user