| 1 | from odoo import models |
| 2 | |
| 3 | |
| 4 | class AccountEdiXmlUBL21Zatca(models.AbstractModel): |
| 5 | _inherit = "account.edi.xml.ubl_21.zatca" |
| 6 | |
| 7 | def _l10n_sa_get_payment_means_code(self, invoice): |
| 8 | """ |
| 9 | Return payment means code to be used to set the value on the XML file |
| 10 | """ |
| 11 | res = super()._l10n_sa_get_payment_means_code(invoice) |
| 12 | if invoice._l10n_sa_is_simplified() and invoice.pos_order_ids.payment_ids: |
| 13 | res = invoice.pos_order_ids.payment_ids[0].payment_method_id.type |
| 14 | return res |