odoo/enterprise#83818

Created by Anton Romanova (roan)

Blocked

label
odoo-dev:master-safe-eval-refactor-globals-roan
head
0ebc6460d941ce0a04fd1dd5baaca163fb21946d
odoo/odoo odoo/enterprise odoo/upgrade-util
master #206846 missing statuses missing r+ #83818 missing statuses missing r+ #265 missing r+

[IMP] safe_eval: simplify API

This PR simplifies safe_eval which, up until now, allowed passing global and local namespaces. There is no usecase for this anymore. We want safe_eval exec mode to begave like a top-level module scope.

nocopy is not needed anymore either. It's a relic of when the context could be dynamic (e.g. for already deleted RecordDictWrapper or QWebContext).

Passed in context is always a dict. It will always be mutated with the local eval namespace dict after evaluation.

This all makes safe_eval API less confusing.

See: odoo/odoo#206846
See: odoo/upgrade-util#265

task-4378806