-
-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][MIG] account_chart_update: Migration to 16.0 #1555
[16.0][MIG] account_chart_update: Migration to 16.0 #1555
Conversation
[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.
…ing. [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.
* 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
* 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
* 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
* Set updated taxes as active * Check parent_id field in '_is_different_tax' method * PEP8 * Spanish translation
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.
* Process price_include field * Detect change in price_include field
- 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.
…tions + clean authors As this module has been written from scratch with a totally different technique, I clean the list and update copyrights.
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
* 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
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.
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!
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
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]: https://github.com/odoo/odoo/blob/5ef647d5d452a1b334ad6f987d9bf0722b4b8ae7/addons/account/models/partner.py#L32 [2]: https://github.com/odoo/odoo/blob/5ef647d5d452a1b334ad6f987d9bf0722b4b8ae7/addons/account/models/chart_template.py#L1470
Only managers will be able to execute the chart of account wizard. This reflects [the requirement hardcoded upstream][1]. @moduon MT-1923 [1]: https://github.com/odoo/odoo/blob/4ac5ec6a2c4b3e2707446acb1cd693808f0d3c8a/addons/account/models/chart_template.py#L234
/ocabot migration account_chart_update |
Thank you @ljsalvatierra-factorlibre ! 😄 We can review in @moduon MT-2085 |
b4dc075
to
3c2734a
Compare
Thank you! I've updated the wizard view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review looks good.
Functional review: it seems there are a few glitches:
Regarding horizontal scroll, it was fixed for v15 in #1552, so it's better to keep it working fine!
The other details are not blocking, but it would be nice if you can fix them.
3c2734a
to
e515102
Compare
Fixed button design, but can't fix the horizontal scroll |
OK! Not an extremely big problem anyway. @rafaelbn this is ready to merge IMHO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
/ocabot merge patch
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at ec53b2e. Thanks a lot for contributing to OCA. ❤️ |
#1472