upgrade-util icon indicating copy to clipboard operation
upgrade-util copied to clipboard

[REF] util.views: refactor converter code, regroup views helpers

Open andreabak opened this issue 1 year ago • 6 comments

Overview of changes (see commits for details):

  • refactored BootstrapConverter code, separating conversion code and operations from bootstrap-specific code. This way other kind of converters can be implemented, reusing pre-defined ElementOperations into lists (eg. ReplaceClasses/RenameAttributes/etc.)
    • this will also be useful in the (near) future to consolidate into util similar helpers in PS custom-util, commonly used to quickly fix studio and COW views (without all the manual lxml operations boilerplate)
  • generalized helpers and moved from odoo/upgrade base/16.0/pre-90-convert-bootstrap5.py so that they can be reused for other similar kind of operations using converters (ie. apply converter to all html fields / templates, etc.) (upgrade PR: odoo/upgrade#5431 )
  • re-organized views-related helpers into a subpackage util.views (converter, bootstrap, records)
  • misc fixes and tweaks

andreabak avatar Dec 12 '23 10:12 andreabak