The tax 19% in Chile is posting in XML file like "19.00%" and a few days before was posted like "19.00", so its been added a new symbol % and this its making all the invoices were rejected. I did not make this change. How can reversed that??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
This is Experimental (Theoretically It Should Be) I Have Not Tried It Myself Add It to Your Server in a Controlled Way I Do Not Accept Responsibility
We can perhaps fix the error by overriding the data in l10n_cl_edi.models.account_move
ir.ui.view patch
<record id="override_l10n_cl_no_percent" model="ir.ui.view">
<field name="name">l10n_cl_edi.no_percent_override</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="l10n_cl_edi.template_id_goes_here"/>
<field name="arch" type="xml">
<xpath expr="//t[contains(.,'%')]" position="replace">
<t t-esc="(tax.amount * 100)|format('%.2f')"/>
</xpath>
</field>
</record>
How To add this override
create special module
basic doc struct
custom_l10n_cl_no_percent/
├── __init__.py
├── __manifest__.py
└── views/
└── no_percent_override_view.xml
manifest.py
{
'name': 'CL EDI percent Override',
'version': '16.0.1.0.0',
'category': 'Localization/Chile',
'summary': 'Remove % from tax rate in Chile edi xml',
'depends': ['l10n_cl_edi'],
'data': [
'views/no_percent_override_view.xml',
],
'installable': True,
'auto_install': False,
}
views/override.xml
<odoo>
<data>
<record id="override_l10n_cl_no_percent" model="ir.ui.view">
<field name="name">l10n_cl_edi.no_percent_override</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="l10n_cl_edi.view_l10n_cl_edi_traslado_template"/>
<field name="arch" type="xml">
<xpath expr="//t[contains(.,'%')]" position="replace">
<t t-esc="(tax.amount * 100)|format('%.2f')"/>
</xpath>
</field>
</record>
</data>
</odoo>
inherit_id: Qweb external id
how to find external id in server terminal
grep -R "TasaOCuota" addons/l10n_cl_edi
This is Experimental (Theoretically It Should Be) I Have Not Tried It Myself Add It to Your Server in a Controlled Way I Do Not Accept Responsibility
We solved getting back the database,
regards
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up