Skip to Content

Contributors

Re: Want tax move line with zero balance, possible? (odoo 13)

I understand and share Kitti needs. For me it would be better to have this line as aml. I understand that normally you don't need aml of 0. But on odo an aml is not just an aml, is an invoice line / tax line somehow.
If I understand correctly what Pedro suggest, that helps on financial reports. Or there is some generic method to get tax amounts and tax base amounts from aml's?
In our case, we need this information also in two cases:
* to build txt files related to invoices
* to build the xml for electronic invoice

Actually we get the amounts from aml for any tax not zero but then we need to get the base amounts "manually" for zero taxes.
For me it would be much clearer and easier if we just have an aml of 0 for zero taxes also. But I've lose this fight two many times :p
Actually we would need this line not only if the tax rate is 0, but also if the computed tax is zero (for example a line of 0,01 with VAT 21%, the rounded vat amount is zero and no line is created)

Also oidoo is "simulating" this zero lines on the new tax widget, I haven't analyze it yet, but I believe that code would be easier if an aml of zero would be there



Ing. Juan José Scarafía

(+54 9 341) 3 278039

twitter: @jjscarafia

github: @jjscarafia



On Wed, Jun 17, 2020 at 1:52 PM Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:
The field tax_line_ids in account.move.line is filled with the 0-tax ID for the journal item that represents the base amount for the tax.


Regards.

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe


by Juan José Scarafía - 07:35 - 17 Jun 2020

Reference

  • Want tax move line with zero balance, possible? (odoo 13)
    Dear community,

    With Tax Exemption we need to set tax with zero percent. On invoice line, use will need to choose this Tax. And expect that it will also declared on tax report.

    Normally, as I see in this core code, Odoo just don't create move line if tax amount is zero. This oppose our need.

    def _recompute_tax_lines(self, recompute_tax_base_amount=False):
                .......
                # Don't create tax lines with zero balance.
                if self.currency_id.is_zero(taxes_map_entry['balance']) and self.currency_id.is_zero(taxes_map_entry['amount_currency']):
                    taxes_map_entry['grouping_dict'] = False

    Any OCA module that do by pass this? Does this make sense to you if I will create one, or there is better way ??

    Many thanks,
    Kitti


    by Kitti Upariphutthiphong - 05:55 - 17 Jun 2020