Skip to content

Commit

Permalink
[IMP] quality_control_issue: Add security and inherit dashboard.
Browse files Browse the repository at this point in the history
  • Loading branch information
LoisRForgeFlow committed Jul 4, 2017
1 parent b12c1d5 commit 8cbfd43
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
2 changes: 2 additions & 0 deletions quality_control_issue/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"installable": True,
"depends": ["quality_control", "quality_control_team", "stock"],
"data": [
"security/ir.model.access.csv",
"data/qc_issue_sequence.xml",
"data/qc_stage_data.xml",
"views/qc_issue_view.xml",
"views/qc_problem_track_view.xml",
"views/qc_problem_group_view.xml",
"views/qc_team_dashboard_view.xml",
],
}
9 changes: 9 additions & 0 deletions quality_control_issue/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_user_qc_issue,qc.issue.user,quality_control_issue.model_qc_issue,quality_control.group_quality_control_user,1,1,1,0
access_manager_qc_issue,qc.issue.manager,quality_control_issue.model_qc_issue,quality_control.group_quality_control_manager,1,1,1,1
access_user_qc_problem_group,qc.problem.group.user,quality_control_issue.model_qc_problem_group,quality_control.group_quality_control_user,1,0,0,0
access_manager_qc_problem_group,qc.problem.group.manager,quality_control_issue.model_qc_problem_group,quality_control.group_quality_control_manager,1,1,1,1
access_user_qc_problem_track,qc.problem.track.user,quality_control_issue.model_qc_problem_track,quality_control.group_quality_control_user,1,1,1,0
access_manager_qc_team,qc.problem.track.manager,quality_control_issue.model_qc_problem_track,quality_control.group_quality_control_manager,1,1,1,1
access_user_qc_stage,qc.stage.user,quality_control_issue.model_qc_stage,quality_control.group_quality_control_user,1,0,0,0
access_manager_qc_stage,qc.stage.manager,quality_control_issue.model_qc_stage,quality_control.group_quality_control_manager,1,1,1,1
19 changes: 19 additions & 0 deletions quality_control_issue/views/qc_problem_track_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,25 @@
</field>
</record>

<record model="ir.ui.view" id="qc_problem_track_search">
<field name="name">qc.problem.track.serch</field>
<field name="model">qc.problem.track</field>
<field name="arch" type="xml">
<search>
<field name="qc_team_id"/>
<field name="stage_id"/>
<!--<filter name="personal" string="My Teams"-->
<!--domain="['|', ('member_ids', '=', uid), ('user_id', '=', uid)]"/>-->
<group expand="0" string="Group By...">
<filter string="Stage" domain="[]"
context="{'group_by':'stage_id'}"/>
<!--<filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>-->
</group>
</search>
</field>
</record>


<record id="qc_problem_track_action" model="ir.actions.act_window">
<field name="name">Problem Tracking</field>
<field name="type">ir.actions.act_window</field>
Expand Down
39 changes: 39 additions & 0 deletions quality_control_issue/views/qc_team_dashboard_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

<record model="ir.actions.act_window" id="team_qc_problem_track_act">
<field name="name">Problem tracking</field>
<field name="res_model">qc.problem.track</field>
<field name="view_mode">kanban,tree,form,pivot</field>
<!--<field name="domain">[('type','=','opportunity')]</field>-->
<!--<field name="view_id" ref="crm.crm_case_kanban_view_leads"/>-->
<!--<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>-->
<field name="context">{
'search_default_qc_team_id': [active_id],
'default_qc_team_id': active_id,
'default_user_id': uid,
}
</field>
<field name="help" type="html">
<p>Track problems through your team flow.</p>
</field>
</record>

<record id="qc_team_view_kanban" model="ir.ui.view" >
<field name="name">qc.team.dashboard - quality_control_issue</field>
<field name="model">qc.team</field>
<field name="inherit_id" ref="quality_control_team.qc_team_view_kanban"/>
<field name="arch" type="xml">

<xpath expr="//div[contains(@class, 'o_kanban_primary_left')]" position="inside">
<button class="btn btn-primary" type="action"
name="%(team_qc_problem_track_act)d">Problems Pipeline
</button>
</xpath>

</field>
</record>

</odoo>

0 comments on commit 8cbfd43

Please sign in to comment.