You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement proper fixing and/or removal of ir.exports and
ir.exports.line records on model/fields renames/removal:
- renamed fields: update affected ir.exports.line records
- removed fields: remove affected ir.exports.line records
- renamed models: update affected ir.exports records `resource`
- removed models: remove affected ir.exports.line / ir.exports records
Some of these cases were already handled but have been improved.
Specifically:
- for renamed fields, previously was done by doing a simple string
replacement, which is not good enough because export lines can
reference fields paths, and these in turn *might* contain paths to
multiple fields with the same name on different models, only some of
which are affected. Now the fields path get properly resolved for
renaming, only the affected fields path parts are updated.
- for removed fields, previously no action was taken, leaving a broken
export template and UI traceback. Now the affected export lines are
removed, using fields paths resolution.
- for renamed and removed models, this was already handled by the
indirect_references mechanism, but now export lines for the removed
models are checked with the same mechanism for fields above.
Additionally, unit tests have been added to make sure these cases are
properly handled by the code.
closes#84
Signed-off-by: Christophe Simonis (chs) <[email protected]>
Co-authored-by: Alvaro Fuentes <[email protected]>
0 commit comments