Open rousseldenis opened 9 months ago
This PR has the approved
label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
Seeing @pedrobaeza comment, what do you think of doing this instead this?
def rename_fields(env_or_cr, field_spec, no_deep=False):
if not no_deep:
env = env_or_cr
cr = env.cr
else:
cr = env_or_cr
(...code using cr here...)
if not no_deep:
(...code using env here...)
maybe we could rename no_deep
to no_env
or is_cr
... @pedrobaeza what do you think?
OK about the renaming. It has this name for also not doing all the stuff we have in #319
In some cases, we want to use the rename_fields() method without using a full environment but with a cursor instead.