1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/l10n_br_edi/models/account_external_tax_mixin.py
2024-12-10 09:04:09 +07:00

14 lines
588 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class L10nBrEDIAccountExternalTaxMixin(models.AbstractModel):
_inherit = "account.external.tax.mixin"
def _l10n_br_build_avatax_line(self, product, qty, unit_price, total, discount, line_id):
""" Override. Include required fields for EDI. """
res = super()._l10n_br_build_avatax_line(product, qty, unit_price, total, discount, line_id)
res["itemCode"] = product.default_code
res["itemDescriptor"]["description"] = product.name
return res