2
0
Commit Graph

50 Commits

Author SHA1 Message Date
Luis J. Salvatierra
e5151026a5 [MIG] account_chart_update: Migration to 16.0 2023-01-30 09:26:38 +01:00
Jairo Llopis
79bbd7cdc4 [FIX] account_chart_update: false positive detecting diff on Html fields
When executing the chart updater and selecting the "notes" field from fiscal positions, you were getting differences 100% of the time.

This was because [fiscal position's notes field is Html][1], while [the template field is Text][2].

@moduon MT-1912

[1]: 5ef647d5d4/addons/account/models/partner.py (L32)
[2]: 5ef647d5d4/addons/account/models/chart_template.py (L1470)
2023-01-17 08:54:49 +01:00
Lois Rilo
c630022abf [IMP] account_chart_update: improve extensibility 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
934e2e57f6 [FIX] account_chart_update: Incorrect call in find account method
Clear copy/paste error.
2023-01-17 08:54:49 +01:00
manu
b39b008b11 [15.0][FIX] account_chart_update: do not browse rep_line in _update_taxes_pending_for_accounts 2023-01-17 08:54:49 +01:00
Fernando La Chica
7fa493cf91 Migration and some fixes:
* 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
2023-01-17 08:54:49 +01:00
Lois Rilo
236a764c99 [FIX] account_chart_update: do not match twice the same repartition line
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.
2023-01-17 08:54:49 +01:00
Miquel Raïch
8beac87a40 [FIX] account_loan: post() -> action_post() 2023-01-17 08:54:49 +01:00
Miquel Raïch
320079d543 [FIX] account_chart_update: Warning -> UserError 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
63435fbbed [FIX] account_chart_update: cash_basis_base_account_id no longer exists
This field disappears in this version.
2023-01-17 08:54:49 +01:00
Luc De Meyer
7a7f0f447c [13.0][FIX]account_chart_update refactor tax update 2023-01-17 08:54:49 +01:00
Luc De Meyer
eefe80e215 [FIX] account_chart_update: ignore template fields that do not exist in real 2023-01-17 08:54:49 +01:00
Reyes4711
d4094eff87 [14.0][MIG] account_chart_update: Migration to 14.0 2023-01-17 08:54:49 +01:00
Luc De Meyer
5662dfe483 [13.0][FIX]account_chart_update inactive taxes false positives 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
2ec48c4fea [IMP] account_chart_update: Search for real XML-IDs only
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.
2023-01-17 08:54:49 +01:00
ps-tubtim
ac2034c28b [13.0][FIX] account_chart_update: Remove @api.multi 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
ad1b376b89 [FIX+IMP] account_chart_update: Add consistency method
With this, we prevent lock due to infinite loop if children taxes are matched, but
not the parent one and it's marked to be created.
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
d8644c16a3 [FIX+IMP] account_chart_update: Create taxes in batch
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.
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
7f4622bb9b [FIX] account_chart_update: Clear caches before searching
If not, changes done in for example taxes are not reflected.
2023-01-17 08:54:49 +01:00
ernestotejeda
f20f692994 [MIG] account_chart_update: Migration to 13.0 2023-01-17 08:54:49 +01:00
ernestotejeda
2e7396b485 [IMP] account_chart_update: black, isort 2023-01-17 08:54:49 +01:00
ernesto
4bf18c89b7 [MIG] account_chart_update: Migration to 12.0 2023-01-17 08:54:49 +01:00
ernesto
7c03d64afc account_chart_update: Fix number of updates and insertions in log 2023-01-17 08:54:49 +01:00
ernesto
203c45b253 account_chart_update: allows to set the matching value order
It allows to set the order of matching for Account, Taxes and
Fiscal position.
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
9e63f90527 [IMP] account_chart_update: Include field selection
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!
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
e206a37bdd [FIX] account_chart_update: Handle updated m2m correctly 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
768276e964 [MIG] account_chart_update: Additional needed changes 2023-01-17 08:54:49 +01:00
amcor
c564971dbf [MIG] account_chart_update: Migration to 11.0 2023-01-17 08:54:49 +01:00
Stéphane Bidoul (ACSONE)
4b597e417c account_chart_update: copy inactive tax templates too
In v10, tax templates have an active flag. It is useful to copy them too, letting the user select which one he wants to activate in it's instance.
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
f833ccdf36 [FIX+IMP] account_chart_update: Major refactoring
* 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
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
7c52e09c8d [FIX] account_chart_update: Don't cache recordsets
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
2023-01-17 08:54:49 +01:00
moutio
45e6abae56 [FIX] account_chart_update: Limit fiscal position search with same name (#651) 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
cf714c11f8 [FIX] account_chart_update: Fetch account code digits correctly 2023-01-17 08:54:49 +01:00
Sylvain Van Hoof
7093779041 [MIG] account_chart_update: Migration to 10.0 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
fa34bca71b [FIX+IMP] account_chart_update: Fix fiscal position mapping + translations + clean authors
As this module has been written from scratch with a totally different technique, I clean the list and update copyrights.
2023-01-17 08:54:49 +01:00
Jairo Llopis
88488fd5f1 [MIG][9.0][account_chart_update] Migrate.
- 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.
2023-01-17 08:54:49 +01:00
Stéphane Bidoul
4c5b816db3 [FIX] account_chart_update:
* Process price_include field
* Detect change in price_include field
2023-01-17 08:54:49 +01:00
PabloCM
b09acad132 [FIX] Include acc templates from parent CoA templates 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
a560d62acd [FIX] account_chart_update: Don't write code on account update
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.
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
f98233d55e [FIX] account_chart_update: Call mapping function instead of removed cache. Closes #240 2023-01-17 08:54:49 +01:00
Antonio Espinosa
317bb9f542 [FIX+IMP] account_chart_update: Several things
* Set updated taxes as active
* Check parent_id field in '_is_different_tax' method
* PEP8
* Spanish translation
2023-01-17 08:54:49 +01:00
Pedro M. Baeza
bc483a106f [IMP] account_chart_update: Whole refactoring
* 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
2023-01-17 08:54:49 +01:00
Stéphane Bidoul
ef73f5ad50 [FIX+IMP] account_chart_update: Several things
* search on code first to match tax codes

  The tax code code should be more discriminant that the tax code name.

* compare more fields in tax codes
* deletion of tax codes removed from templates

  For tax codes, it make sense to propose deletion, since tax codes
  are normally defined by the tax authority and the user does not
  customize them.

* update accounts on taxes even if an update of the account was not requested

  Useful when the chart of taxes changes but the chart of account
  need not be updated.

* depth-first search of tax codes

  This helps creating parents before children.

* compare more fields in taxes
* add active field on tax code

  Deactivate tax codes which are not in the template.

* deactivate taxes that are not in the template
* multi-company criteria for taxes
* avoid inserting duplicates in presence of inactive taxes or tax codes
2023-01-17 08:54:49 +01:00
Adrien Peiffer
1f48ac7fd6 [MIG] account_chart_update: Migration to 8.0
* Move out of unported
* Set account_chart_update installable
* value_reference of ir.property is a char
* Use get_by_record method of ir.property
* number digits is returned before assignment in case of property exist but account not
* product_obj isn't used
2023-01-17 08:54:49 +01:00
Nicolas Bessi
35ff8d9671 Set all addons to uninstallable 2023-01-17 08:54:49 +01:00
Pedro M. Baeza
e3de4cbc1d [FIX] account_chart_update: Selection of operations to do now is working.
[FIX] account_chart_update: Adapted to work with inherited account chart templates.
[FIX] account_chart_update: Remove required=True for chart_template_id on DB and put on screen to avoid error when removing chart templates.
[FIX] account_chart_update: Change method to compare taxes of fiscal positions to match with the one comparing taxes.
[FIX] account_chart_update: Change method to compare accounts of fiscal positions to match with the one comparing accounts.
[IMP] account_chart_update: Wizard now shows in tree view modification notes.
[IMP] account_chart_update: For new data to be created, it is marked on notes the reason for the creation (just for clarity).
[IMP] account_chart_update: Tabs for operations that are not going to be performed are hidden.
[IMP] account_chart_update: Some PEP8 here and there.
[IMP] account_chart_update: Enhance a little the mapping searches (there's more room to improve).
[IMP] account_chart_update: Now it takes into account name and description for mapping taxes.
2023-01-17 08:54:49 +01:00
Stéphane Bidoul
3e5d4a173c [IMP] attempt to match tax code on code if no match on name was found 2023-01-17 08:54:49 +01:00
Yann Papouin
f88d415142 FIX: wrong dict passed in _update_accounts 2023-01-17 08:54:49 +01:00
Invitu
83c5c74a7a [IMP] small improvement : calling reopen method in action_init + indentation 2023-01-17 08:54:49 +01:00
Joaquin Gutierrez
e9da8fe0ea [MIG]: account_char_update: Migration to version 7.0
[FIX]: Changed types to orm.Model, orm.TransientModel and orm.AbstractModel.
[FIX]: Fix deletion method for some fields of objects.
[FIX]: Contributions have been written in the standard format of the community.
[FIX]: Changes in the form to work as a real wizard.
[FIX]: Remove 'init_xml' keys, because it's no longer needed in v7.
[FIX]: Rename 'demo_xml' key to the new standard 'demo'.
[FIX]: Change imports calls.
[FIX]: Remove __author__ variables in files, because authors are put on manifest file (__openerp__.py).
[FIX]: Update view definitions to version 7.0
[FIX]: Rename variables to OpenERP standard.
[FIX]: Increased compatibility with standard PEP8.
[IMP]:  User Invitu add the method call _reopen to keep open the wizard.
[MRG]: User Invitu add frech language.
2023-01-17 08:54:49 +01:00