[FIX] auth_signup, crm, project_timesheet_holidays, sales_team, website_sale: settings access error
The new settings model loads by default all settings. In the case of non-admin user having the 'Settings' access rights this can lead to access errors. This commit deals with the multi-company issues on a standard installation. If the admin is in Company A and the other user in Company B, accessing the settings is pretty much impossible because of records rules. This fixes the master or demo data to avoid setting a company by default. Note that it only fixes a standard installation: if the settings are later customized, there is no guarantee that it will still work. Problematic fields: `auth_signup_template_user_id` `crm_default_team_id` `leave_timesheet_task_id` opw-801210
This commit is contained in:
committed by
Nicolas Martinelli
parent
864ca5075f
commit
aa65a46fc5
@@ -19,11 +19,7 @@
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" required="True"/>
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('auth_signup_uninvited','=','b2b')]}">
|
||||
<div class="mt16" groups="base.group_no_one"
|
||||
attrs="{'invisible': [('auth_signup_template_user_id', '!=', False)]}">
|
||||
Copy access rights from <field name="auth_signup_template_user_id"/>
|
||||
</div>
|
||||
<div class="mt16" attrs="{'invisible': [('auth_signup_template_user_id', '=', False)]}">
|
||||
<div class="mt16">
|
||||
<button type="object" name="open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<field name="use_leads">True</field>
|
||||
<field name="alias_name">sales</field>
|
||||
<field name="dashboard_graph_model">crm.opportunity.report</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!--default alias for leads-->
|
||||
|
||||
@@ -40,6 +40,7 @@ class Company(models.Model):
|
||||
'name': _('Leaves'),
|
||||
'project_id': company.leave_timesheet_project_id.id,
|
||||
'active': False,
|
||||
'company_id': False,
|
||||
})
|
||||
company.write({
|
||||
'leave_timesheet_task_id': task.id,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<record model="crm.team" id="team_sales_department">
|
||||
<field name="name">Europe</field>
|
||||
<field name="dashboard_graph_group">week</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field name="groups_id" eval="[(4,ref('sales_team.group_sale_salesman'))]"/>
|
||||
@@ -17,6 +18,7 @@
|
||||
<record model="crm.team" id="crm_team_1">
|
||||
<field name="name">America</field>
|
||||
<field name="dashboard_graph_group">week</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<field name="active" eval="True"/>
|
||||
<field name="dashboard_graph_model">sale.report</field>
|
||||
<field name="dashboard_graph_period">week</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="website" id="website.default_website">
|
||||
|
||||
Reference in New Issue
Block a user