-
-
Notifications
You must be signed in to change notification settings - Fork 334
[ADD] account_edi_ubl_cii_retrieve_tax_by_unece_code #1270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 16.0
Are you sure you want to change the base?
[ADD] account_edi_ubl_cii_retrieve_tax_by_unece_code #1270
Conversation
Match taxes on UBL import using UNECE tax codes
| tax = self.env["account.tax"].search( | ||
| self._get_tax_by_amount_and_unece_code_domain( | ||
| journal, amount, tax_unece_code | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a unicity constraint
| ) | |
| ), | |
| limit=1 |
jbaudoux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be safer, I would also parse the tax Scheme
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">VAT</cbc:ID>
</cac:TaxScheme>
in order to search taxes that are VAT taxes
| ("amount_type", "=", "percent"), | ||
| ("type_tax_use", "=", journal.type), | ||
| ("amount", "=", amount), | ||
| ("unece_categ_id.code", "=", tax_unece_code), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ("unece_categ_id.code", "=", tax_unece_code), | |
| ("unece_categ_id.code", "=", tax_unece_code), | |
| ("unece_type_id.code", "=", tax_type_code), |
phschmidt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionnal tests
Match taxes on UBL import using UNECE tax codes