Use tax record as key in tax_template_ref dict because in odoo/account/models/chart_template.py line 959, the given key on dict reading is a tax record and not a simple id.
todo_dict["account_dict"]["account.tax"].keys() are already records, not just ID, so we can use them directly. Trying to browse causes an error : `psycopg2.ProgrammingError: can't adapt type 'account.tax'`.
1) In tax groups repartition lines are not used, however when creating
tax groups from templates the default repartition lines are created.
If you run the chart update again, it will detect those "useless"
default repartition lines and mark them to removal, raising an
error when trying to do so as a minial of 2 repartition lines are
needed (on base and one tax).
2) When matching taxes, if not match, do not add `False` to the list.
* Ignore changes in mail thread fields
* account.tax.template._generate_tax return dict of objects
and wizard fails
* Load generic coa localization module to improve the test
When updating a tax with several repartition lines, the same existing
candidates were considered in all iteration which could lead the wizard
to match the same repartition line with different lines of the template
and not detecting any change to do.
Previously, only a check on an existing XML-ID which is not coming from exportation
was done, but now we check that the XML-ID is the exact one. With this, we avoid
that the same record changed their XML-ID and thus, there's no more link between
them.
With this, we gain some performance, but also prevent an error if there are template
taxes that have children taxes, as Odoo standard method forces that in the same call
all of them are created simultaneously, or it will enter in an infinite loop.
With this option, you can select which fields do you want to compare for updating.
Use case: you have specific accounts in taxes, and you don't want to lose them,
but you want to update their groups through the wizard. Before this, the update
was all or nothing. Now, you have total control!
* Compare all fields from template
Not all fields were properly compared with previous code. This means also
to exclude some of them, but now we have a full and extensible system.
* Optimize cached method
* Generate accounts and fiscal positions using Odoo methods (tax already did)
* README by fragments
* Add tests up to full coverage
When marking methods as ormcache, you can't return recordsets, as they keep
the cursor information, and that cursor can be closed (worker spawn for example)
when you need to access again data.
This is fixed returning IDs instead, and browsing when needed
- New-style license headers.
- Remove .pot file.
- Remove tax codes stuff, now removed from v9.
- Refactor methods for search, create, update, delete. Now they are smaller, fitter, happier, more productive.
- Only update fields that have any kind of change on any updated record.
- Place the wizard in the configuration page, instead of its own menu item.
- Display amount of disabled taxes at ending page.
As there's a constraint that forbids to write the code of the account
if it has moves, we delete the corresponding entry on update only,
because the method that prepares the values is the same for new and
existing accounts.
* Fix calculated field when showing inactives + add field to view
* Migrated to new API.
* Provided hooks for detecting changes and for adding update/create values.
* Purge dead error detection code (not applying).
* Use global mapping dictionaries stored on class instead of passing arguments down to top and viceversa.
* Number fields computed by a function field instead of being computed by hand.
* Use recordsets as indexes instead of ids to avoid repetitive browses.
* Re-enable local cache variables
* README + authors