Skip to content
Snippets Groups Projects
Commit aed2f6a6 authored by Josse Colpaert's avatar Josse Colpaert Committed by Mehdi Bendali Hacine
Browse files

[FIX] l10n_sa_edi: tests


closes odoo/odoo#124901

Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
parent e5dd9dd2
No related branches found
No related tags found
No related merge requests found
......@@ -90,11 +90,9 @@ class AccountEdiXmlUBL21Zatca(models.AbstractModel):
def _get_delivery_vals_list(self, invoice):
""" Override to include/update values specific to ZATCA's UBL 2.1 specs """
res = super()._get_delivery_vals_list(invoice)
if 'partner_shipping_id' in invoice._fields:
for vals in res:
vals['actual_delivery_date'] = invoice.l10n_sa_delivery_date
return res
shipping_address = invoice.partner_shipping_id
return [{'actual_delivery_date': invoice.l10n_sa_delivery_date,
'delivery_address_vals': self._get_partner_address_vals(shipping_address) if shipping_address else {},}]
def _get_partner_party_identification_vals_list(self, partner):
""" Override to include/update values specific to ZATCA's UBL 2.1 specs """
......
......@@ -200,11 +200,11 @@ class TestSaEdiCommon(AccountEdiTestCommon):
vals = {
'name': kwargs['name'],
'move_type': 'out_invoice',
'company_id': self.company,
'partner_id': kwargs['partner_id'],
'company_id': self.company.id,
'partner_id': kwargs['partner_id'].id,
'invoice_date': kwargs['date'],
'invoice_date_due': kwargs['date_due'],
'currency_id': self.company.currency_id,
'currency_id': self.company.currency_id.id,
'invoice_line_ids': [Command.create({
'product_id': kwargs['product_id'].id,
'price_unit': kwargs['price'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment