miad-odoo 7bc89a1c34 [FIX] base: fix traceback install demo data
This commit fixes a traceback when trying to install demo data from the UI.

Steps to reproduce:
	- create a database with website_event_track_live installed and without demo data
	- load demo data from the UI (settings)
	- odoo.exceptions.AccessError: You are not allowed to create 'Website Visitor'
(website.visitor) records.

There is a traceback because the installer can't create `website_visitor`
records because there are no groups that have create access rights for that
model.

This is because xml_import used to get an environment with root privileges, that
can bypass access rights, but now the environment is a parameter passed to the
function and doesn't necessarily have sudo

This change was introduced in
5bf1207#diff-8e4705d5ab335a8dfc2c70eeedc502a92695989f97c4f19184b49634c2c4ad55L583-R583
; with this commit, the environment used by xml_import doesn't necessarily have
sudo, so we simply make sure `load_demo` loads data with sudo.

Task-3202914

closes odoo/odoo#129946

X-original-commit: 85834371e0eede05858cb2dc33412396c6e5c5bf
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
2023-08-01 07:04:53 +02:00
…
2023-07-29 12:42:45 +02:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%