Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
[FIX] access bug on sale order if user doesn't belong to CRM Manager …
Browse files Browse the repository at this point in the history
…group;
  • Loading branch information
legalsylvain committed Mar 8, 2016
1 parent b3e36f2 commit ed9dc9e
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 48 deletions.
30 changes: 15 additions & 15 deletions grap_change_access/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,29 @@ email_template.access_email_template,email.template,email_template.model_email_t
,,,,,,,
access_ir_config_parameter_reader,grap_change_access__ir_config_parameter_reader,base.model_ir_config_parameter,,1,0,0,0
,,,,,,,
crm.access_crm_lead,crm.access_crm_lead,crm.model_crm_lead,,0,0,0,0
crm.access_crm_lead_manager,crm.access_crm_lead_manager,crm.model_crm_lead,,0,0,0,0
crm.access_crm_lead_partner_manager,crm.access_crm_lead_partner_manager,crm.model_crm_lead,,0,0,0,0
crm.access_crm_lead,crm.access_crm_lead,crm.model_crm_lead,,1,0,0,0
crm.access_crm_lead_manager,crm.access_crm_lead_manager,crm.model_crm_lead,,1,0,0,0
crm.access_crm_lead_partner_manager,crm.access_crm_lead_partner_manager,crm.model_crm_lead,,1,0,0,0
crm_lead_manager,crm_lead_manager,crm.model_crm_lead,grap_change_access.group_crm_manager,1,1,1,1
,,,,,,,
crm.access_crm_phonecall,crm.access_crm_phonecall,crm.model_crm_phonecall,,0,0,0,0
crm.access_crm_phonecall_manager,crm.access_crm_phonecall_manager,crm.model_crm_phonecall,,0,0,0,0
crm.access_crm_phonecall_partner_manager,crm.access_crm_phonecall_partner_manager,crm.model_crm_phonecall,,0,0,0,0
crm.access_crm_phonecall,crm.access_crm_phonecall,crm.model_crm_phonecall,,1,0,0,0
crm.access_crm_phonecall_manager,crm.access_crm_phonecall_manager,crm.model_crm_phonecall,,1,0,0,0
crm.access_crm_phonecall_partner_manager,crm.access_crm_phonecall_partner_manager,crm.model_crm_phonecall,,1,0,0,0
crm_phonecall_manager,crm_phonecall_manager,crm.model_crm_phonecall,grap_change_access.group_crm_manager,1,1,1,1
,,,,,,,
crm.access_crm_case_section,crm.access_crm_case_section,crm.model_crm_case_section,,0,0,0,0
crm.access_crm_case_section_user,crm.access_crm_case_section_user,crm.model_crm_case_section,,0,0,0,0
crm.access_crm_case_section_manager,crm.access_crm_case_section_manager,crm.model_crm_case_section,,0,0,0,0
crm.access_crm_case_section,crm.access_crm_case_section,crm.model_crm_case_section,,1,0,0,0
crm.access_crm_case_section_user,crm.access_crm_case_section_user,crm.model_crm_case_section,,1,0,0,0
crm.access_crm_case_section_manager,crm.access_crm_case_section_manager,crm.model_crm_case_section,,1,0,0,0
crm_case_sectionl_manager,crm_case_sectionl_manager,crm.model_crm_case_section,grap_change_access.group_crm_manager,1,1,1,1
,,,,,,,
crm.access_crm_case_categ,crm.access_crm_case_categ,crm.model_crm_case_categ,,0,0,0,0
crm.access_crm_case_categ_manager,crm.access_crm_case_categ_manager,crm.model_crm_case_categ,,0,0,0,0
crm.access_crm_case_categ,crm.access_crm_case_categ,crm.model_crm_case_categ,,1,0,0,0
crm.access_crm_case_categ_manager,crm.access_crm_case_categ_manager,crm.model_crm_case_categ,,1,0,0,0
crm_case_categ,crm_case_categ,crm.model_crm_case_categ,grap_change_access.group_crm_manager,1,1,1,1
,,,,,,,
crm.access_crm_case_stage,crm.access_crm_case_stage,crm.model_crm_case_stage,,0,0,0,0
crm.access_crm_case_stage_manager,crm.access_crm_case_stage_manager,crm.model_crm_case_stage,,0,0,0,0
crm.access_crm_case_stage,crm.access_crm_case_stage,crm.model_crm_case_stage,,1,0,0,0
crm.access_crm_case_stage_manager,crm.access_crm_case_stage_manager,crm.model_crm_case_stage,,1,0,0,0
crm_case_stage,crm_case_stage,crm.model_crm_case_stage,grap_change_access.group_crm_manager,1,1,1,1
,,,,,,,
crm.access_crm_case_channel_user,crm.access_crm_case_channel_user,crm.model_crm_case_channel,,0,0,0,0
crm.access_crm_case_channel_manager,crm.access_crm_case_channel_manager,crm.model_crm_case_channel,,0,0,0,0
crm.access_crm_case_channel_user,crm.access_crm_case_channel_user,crm.model_crm_case_channel,,1,0,0,0
crm.access_crm_case_channel_manager,crm.access_crm_case_channel_manager,crm.model_crm_case_channel,,1,0,0,0
crm_case_channel,crm_case_channel,crm.model_crm_case_channel,grap_change_access.group_crm_manager,1,1,1,1
22 changes: 0 additions & 22 deletions grap_change_access/security/ir_model_access.yml

This file was deleted.

3 changes: 3 additions & 0 deletions grap_change_views/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
'intercompany_trade_base',
'recurring_consignment',
'purchase_compute_order',
'grap_change_access',
'grap_reporting',
'grap_print_product',
],
'data': [
'security/res_groups.yml',
Expand Down
4 changes: 4 additions & 0 deletions grap_change_views/view/account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,9 @@
<field eval="[(6, 0, [ref('base.group_no_one')])]" name="groups_id"/>
</record>

<record model="ir.ui.menu" id="account_voucher.menu_action_sale_receipt_report_all">
<field name="groups_id" eval="[(6, 0, [ref('base.group_no_one')])]"/>
</record>

</data>
</openerp>
45 changes: 41 additions & 4 deletions grap_change_views/view/crm.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ********************************************************************** -->
<!--GRAP - Change Views module for Odoo -->
<!--Copyright (C) 2013 GRAP (http://www.grap.coop) -->
<!--@author Julien WESTE -->
<!--Copyright (C) 2016-Today GRAP (http://www.grap.coop) -->
<!--@author Sylvain LE GAL (https://twitter.com/legalsylvain) -->

<!--This program is free software: you can redistribute it and/or modify -->
Expand All @@ -20,9 +19,47 @@
<!-- ********************************************************************** -->
<openerp><data>

<!-- Sale Menu -->
<record model="ir.ui.menu" id="crm.menu_crm_leads">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_crm_opportunities">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_crm_case_phone">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_crm_case_section_act">
<field name="parent_id" eval="ref('base.menu_crm_config_lead')" />
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="base.menu_crm_config_lead">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_crm_lead_stage_act">
<field name="name">Quotations (Admin)</field>
<field name="groups_id" eval="[(6, 0, [])]"/>
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<!-- Reporting Menu -->
<record model="ir.ui.menu" id="crm.menu_report_crm_leads_tree">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_report_crm_opportunities_tree">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_report_crm_phonecalls_tree">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

<record model="ir.ui.menu" id="crm.menu_board_statistics_dash">
<field name="groups_id" eval="[(6, 0, [ref('grap_change_access.group_crm_manager')])]"/>
</record>

</data>
Expand Down
10 changes: 8 additions & 2 deletions grap_change_views/view/grap_change_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
<field name="sequence">100</field>
</record>



<record model="ir.ui.menu" id="knowledge.menu_document">
<field name="sequence">200</field>
</record>
Expand All @@ -77,6 +75,14 @@
<field name="sequence">201</field>
</record>

<record model="ir.ui.menu" id="grap_reporting.menu_finance_management_reports">
<field name="groups_id" eval="[(6, 0, [ref('base.group_no_one')])]"/>
</record>

<record model="ir.ui.menu" id="grap_reporting.menu_finance_management_reports">
<field name="groups_id" eval="[(6, 0, [ref('base.group_no_one')])]"/>
</record>

</data>
</openerp>

5 changes: 5 additions & 0 deletions grap_change_views/view/sale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@
</record>

<!-- Disable Menu to basic User -->
<record model="ir.ui.menu" id="grap_print_product.menu_print_product">
<field eval="[(6, 0, [ref('base.group_no_one')])]" name="groups_id"/>
</record>


<record model="ir.ui.menu" id="sale.menu_dashboard_sales">
<field eval="[(6, 0, [ref('base.group_no_one')])]" name="groups_id"/>
</record>
Expand Down
16 changes: 11 additions & 5 deletions grap_reporting/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@
'version': '2.5',
'category': 'Accounting & Finance',
'description': """
Correct & Add financial reports.
================================
* Correct of l10n_fr "Balance Sheet" and "Profit & loss" reports;
* provide "IOR" report (Interim Operating Results);
* provide "CF" report (Cash Flow);
Correct & Add financial reports
===============================
* Correct of l10n_fr "Balance Sheet" and "Profit & loss" reports;
* provide "IOR" report (Interim Operating Results);
* provide "CF" report (Cash Flow);
TODO MIGRATION
--------------
* remove obsolete reporting;
Copyright, Author and Licence :
-------------------------------
Expand Down

0 comments on commit ed9dc9e

Please sign in to comment.