0a0dac150e917a03edca92652f2a73388c414229
How to reproduce: - install a new DB without demo data and crm: -i crm --without-demo=1 - go to settings and click on "Load demo data" at the end of the page - the demo data will not be installed and the following error will appear in the logs "Assigned user Marc Demo has no access to the document and is not able to handle this activity." - and "Marc Demo" has no access to the CRM app If the "crm" module is installed with the demo data at the module installation, it works and "Marc Demo" has access to the CRM app. The cause of the problem is that in the first case "Marc Demo" doesn't belong to group_sale_salesman while in the second case well. By reverting partially the change that remove the group_sale_salesman by removing group_sale_salesman_all_leads (see odoo/odoo#139731), the problem is solved. Technical note: the load of the demo data as a second step fails when creating an activity on a record for which "Marc Demo" has no access to because in the create method of mail_activity, we check that the user has access to the underlying record (_check_access_assignation). It works when installing the demo data while installing the module because in that case "Marc Demo" belongs to "group_sale_salesman" which give him the read access to the record. The solution here is to just re-add that group where it is removed indirectly by removing the group group_sale_salesman_all_leads from "Marc Demo". Another solution would have been to remove this check (_check_access_assignation) as we don't need it anymore (see odoo/odoo#139917 where we display activities for which the user has no access to the underlying record from the menu in the systray). But it won't solve the consistency between installing the demo data while installing the module vs installing the demo data afterward. That's why this solution has been chosen, but we plan also to remove the check (_check_access_assignation) as it is no longer needed. Note that planning activities from the interface even if the assigned user has no access to the underlying record works because the flag "automated" is set to true in that case (that flag will probably also be removed). Task-3600535 closes odoo/odoo#142806 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%