Found a bug in Odoo? (An example fix proposal - consumption tax account assignment)

What an Odoo partner ought to do
December 24, 2021 by
Found a bug in Odoo? (An example fix proposal - consumption tax account assignment)
Ryoko Tsuda (QRTL)

Found a bug in Odoo? Report it, or propose a fix


Odoo is open source, so when you find a bug you can also pin down the code that causes it.

Quartile's OSS activities include "reporting and fixing bugs in Odoo itself", and here is a concrete example of that.

Finding the bug


Tax configuration (menu Invoicing > Configuration > Taxes) is where you set, for each tax, the accounts used for the tax journal entries posted automatically. In version 13.0 the wrong account is set for consumption tax paid.

The problem) Four consumption-tax-paid accounts have the wrong account set.

The screen showing a different account set on each of the four consumption-tax-paid accounts

Bad example) Consumption tax paid should have "A118090 Consumption Tax Paid" set, but "A118070 Deposits and Guarantees" is set instead.

The bad example: "A118070 Deposits and Guarantees" set on consumption tax paid

For comparison, a good example) Here it is set correctly, with account "A218090 Consumption Tax Received" properly set against consumption tax received.

The good example: "A218090 Consumption Tax Received" correctly set on consumption tax received

Checking whether it really is a bug


We check the relevant part of the code specifically.

Where it is not a problem in Odoo's standard code but

a problem in an OCA module we are using, we report it to that OCA module, or propose a fix there.

For this bug, the relevant place is around the following line of the following file.

odoo/addons/l10n_jp/data/account_tax_template_data.xml

https://github.com/odoo/odoo/blob/3df563d07d7a96d3f22be48406492ce5cfc61cf4/addons/l10n_jp/data/account_tax_template_data.xml#L243

Checking how far back the bug goes


Odoo generally updates its major version once a year.

We check the commit history on GitHub to see how far back the bug goes, and open a pull request proposing the fix against the version where it first appeared.

※ Once a pull request against the version where the bug first appeared is merged, the fix carries into the later supported versions too.

Working out and verifying the fix


We fix the source code and verify it.

Submitting the fix to Odoo


Odoo's GitHub repository is where we create issues and submit proposed fixes.

The proposed fix for this bug is this pull request on GitHub.

※ An explanation of how to open issues and pull requests is in this document.

※ When opening a pull request against Odoo's repository you need to sign the "Odoo Contributor License Agreement (CLA)". See below for how to sign.

https://github.com/odoo/odoo/blob/15.0/doc/cla/sign-cla.md

Merged into Odoo itself


As of 23 December 2021 it has not been merged yet, but once Odoo reviews it and the pull request is merged, everyone else using Odoo will be able to work with the fixed version.

If you like solving problems

If you want to use open source to move companies' DX forward for real,
why not do it at Quartile?

Found a bug in Odoo? (An example fix proposal - consumption tax account assignment)
Ryoko Tsuda (QRTL) December 24, 2021
Archive