THese are rarely intended for all users but often intended only for
employees.
account:
account.incoterms: only used within internal business models
account.journal.group: same as account.journal, add sudo in computed field
account_edi: need access to accounting objects
base_address_extended:
res.city: only employees should access address data
board: only employees uses this (old) module
crm:
crm.stage: internal users business object
hr_recruitment: employees can read
im_livechat: apply same as for the steps
l10n_ar: used on partner, not only invoices
l10n_ec: accessed only through account.move
l10n_latam: accessed on res.partner
mail:
publisher.warrenty.contract: no data, only static models
mail.channel: group_user has already his own rule
mail.group: group_user has already his own rule
mail.message.subtype: group_user has already his own rule
mail.message.all: remove, already has a portal and employee rule
partner_autocomplete: no interaction with public
project:
project.tags: only needed for project sharing
sale_management:
sale.order.option: same as sale.order
utm: employee already has write access
web_editor: test models that have nothing to do here
web_tour: only employees uses tours
website_sale:
product.ribbon: add sudo for access
base:
ir.default: only employees uses set (could probably be converted to group_system)
ir.ui.view.custom: same as ir.ui.view, add sudo when needed
report.*: portal users don't configure reports
res.users.log: create in sudo, no access needed (adapt test to use another model)
res.lang: still needed for public
closesodoo/odoo#118701
Related: odoo/enterprise#41285
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Traceback generated when trying to pass a datetime object into a function tag
in xml.
<function name="action_name" model="model_name" eval="datetime.date.today"/>
Used to fail.
With this commit now one can pass time, datetime, timedelta, relativedelta,
version, ref, pytz in function tag in xml
Task-id: 1772614
Closesodoo/odoo#29212
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Dhaval Limbuwala <dli@odoo.com>
* add tests for uid/context on record & function & root nodes (odoo,
data, openerp) "inherited" by record & function
* add rng validation to the test cases to ensure technical
capabilities are matched by validation capabilities (which was not
the case as we could validate nonsense and import stuff which didn't
pass validation or something)
* extact uid/context into its own rng pattern
- add uid support to record validation
- add uid support to root nodes validation
- fix uid support on function validation: was typoed to @id, which
is not used anywhere in function tags loading & makes no sense
as far as I can tell
* replace get_uid/get_context by get_env & reimplement the whole mess:
build a stack of environments from the root nodes (each root node =
one env in the stack, though the exact same env can be present
multiple times if none of the root nodes has a @uid or @context) and
leaves can build upon this "ready made" environment for their own
uses or use it as-is.
As a result, all uid/context should now properly transfer from the
root nodes to the leaves needing them
* fix support for context on functions: was not actually implemented
as the context was not propagated into the old-style API call
* add uid support to record & context is now inherited from env