bzr revid: fp@tinyerp.com-20100512170920-0mgiujrnhkt5t6z7
This commit is contained in:
Fabien Pinckaers
2010-05-12 19:09:20 +02:00
parent f8d2111b2a
commit a15093819a
9 changed files with 123 additions and 127 deletions
@@ -1,26 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="analytic_root" model="account.analytic.account">
<field name="name">Analytic Chart</field>
<field name="code">0</field>
</record>
<record id="analytic_absences" model="account.analytic.account">
<field name="name">Leaves</field>
<field name="code">1</field>
<field name="parent_id" ref="analytic_root"/>
</record>
<record id="analytic_internal" model="account.analytic.account">
<field name="name">Internal</field>
<field name="code">2</field>
<field name="parent_id" ref="analytic_root"/>
</record>
<record id="analytic_our_super_product" model="account.analytic.account">
<field name="name">Our Super Product</field>
<field name="code">100</field>
<field name="state">open</field>
<field name="parent_id" ref="analytic_root"/>
</record>
<record id="analytic_project_1" model="account.analytic.account">
<field name="name">Project 1</field>
<field name="code">101</field>
<field name="parent_id" ref="analytic_root"/>
</record>
<record id="analytic_project_2" model="account.analytic.account">
<field name="name">Project 2</field>
<field name="code">102</field>
<field name="parent_id" ref="analytic_root"/>
</record>
<record id="analytic_journal_trainings" model="account.analytic.account">
<field name="name">Training</field>
@@ -21,7 +21,7 @@
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Sections and Categories" type="bar" orientation="horizontal">
<graph string="Opportunity by Sales Team and Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
</graph>
+73 -73
View File
@@ -1,88 +1,88 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="board.note.type" id="note_crm_type">
<field name="name">CRM Configuration</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
<field name="name">crm.opportunity.user.graph1</field>
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunities by User and Section" type="pie">
<field name="state"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="act_my_leads">
<field name="res_model">crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
<data>
<record model="board.note.type" id="note_crm_type">
<field name="name">CRM Configuration</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
<field name="name">crm.opportunity.user.graph1</field>
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunities by User and Sales Team" type="pie">
<field name="state"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="act_my_leads">
<field name="res_model">crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
<field name="res_model">crm.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<act_window name="My Cases"
domain="[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]"
res_model="crm.case"
view_type="form"
view_mode="tree,form"
id="act_my_cases"/>
<record model="ir.actions.act_window" id="act_my_leads_stage">
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
<field name="res_model">crm.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
</record>
<act_window name="My Cases"
domain="[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]"
res_model="crm.case"
view_type="form"
view_mode="tree,form"
id="act_my_cases"/>
<record model="ir.actions.act_window" id="act_my_leads_stage">
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
<field name="res_model">crm.opportunity.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
<field name="res_model">crm.opportunity.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.ui.view" id="board_crm_form">
<field name="name">CRM - Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Connecting Dashboard">
<hpaned>
<record model="ir.ui.view" id="board_crm_form">
<field name="name">CRM - Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Connecting Dashboard">
<hpaned>
<child1>
<child1>
<action
name="%(act_my_leads)d"
colspan="4"
height="150"
width="510"/>
<action
name="%(act_my_leads)d"
colspan="4"
height="150"
width="510"/>
<action
string="My Meetings"
name="%(act_my_meetings)d"
height="150"
colspan="4"/>
<action
string="My Meetings"
name="%(act_my_meetings)d"
height="150"
colspan="4"/>
<action
string="My Cases"
name="%(act_my_cases)d"
colspan="4"
height="200"/>
<action
string="My Cases"
name="%(act_my_cases)d"
colspan="4"
height="200"/>
</child1>
</child1>
<child2>
<action
<child2>
<action
string="My Leads By Stage"
name="%(act_my_leads_stage)d"
colspan="4"/>
+21 -21
View File
@@ -9,7 +9,7 @@
<field name="model">report.crm.case.section.categ2</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Cases by Section and Type">
<tree string="Cases by Team and Type">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
@@ -31,7 +31,7 @@
<field name="model">report.crm.case.section.categ2</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cases by Section and Category2">
<form string="Cases by Team and Category2">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
@@ -49,11 +49,11 @@
<!-- Cases by section and category2 of case Graph View -->
<record model="ir.ui.view" id="view_crm_case_section_categ_graph">
<field name="name">CRM Report - Sections and Type(Graph)</field>
<field name="name">CRM Report - Teams and Type(Graph)</field>
<field name="model">report.crm.case.section.categ2</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases by Section and Type" type="bar" orientation="horizontal">
<graph string="Cases by Teams and Type" type="bar" orientation="horizontal">
<field name="category2_id"/>
<field name="amount_revenue" operator="+"/>
<field name="section_id" group="True"/>
@@ -64,18 +64,18 @@
<!-- Cases by section and category2 of case Search View -->
<record id="view_crm_case_section_categ_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Type(Select)</field>
<field name="name">CRM Report - Teams and Type(Select)</field>
<field name="model">report.crm.case.section.categ2</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Cases by Section and Type">
<search string="Cases by Team and Type">
<group col="10" colspan="4">
<filter string="This Year" icon="terp-hr"
domain="[('name','=',time.localtime()[0])]"
help="Cases by Section and Type for this year" />
help="Cases by Team and Type for this year" />
<filter string="This Month" icon="terp-hr"
domain="[('month','=',time.localtime()[1])]"
help="Cases by Section and Type for this month" />
help="Cases by Team and Type for this month" />
<separator orientation="vertical"/>
<field name="section_id"
select="1" widget="selection" />
@@ -99,11 +99,11 @@
<!-- Cases by section and stage Tree View -->
<record model="ir.ui.view" id="view_crm_case_section_stage_tree">
<field name="name">CRM Report - Sections and Stage(Tree)</field>
<field name="name">CRM Report - Teams and Stage(Tree)</field>
<field name="model">report.crm.case.section.stage</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Cases by Section and Stage">
<tree string="Cases by Team and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
@@ -120,11 +120,11 @@
<!-- Cases by section and stage Form View -->
<record model="ir.ui.view" id="view_crm_case_section_stage_form">
<field name="name">CRM Report - Sections and Stage(Form)</field>
<field name="name">CRM Report - Teams and Stage(Form)</field>
<field name="model">report.crm.case.section.stage</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cases by Section and Stage">
<form string="Cases by Team and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
@@ -141,11 +141,11 @@
<!-- Cases by section and stage Graph View -->
<record model="ir.ui.view" id="view_crm_case_section_stage_graph">
<field name="name">CRM Report - Sections and Stage(Graph)</field>
<field name="name">CRM Report - Teams and Stage(Graph)</field>
<field name="model">report.crm.case.section.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases by Section and Stage" type="bar" orientation="horizontal">
<graph string="Cases by Team and Stage" type="bar" orientation="horizontal">
<field name="stage_id"/>
<field name="amount_revenue" operator="+"/>
<field name="section_id" group="True"/>
@@ -156,18 +156,18 @@
<!-- Cases by section and stage Search View -->
<record id="view_crm_case_section_stage_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Stage(Select)</field>
<field name="name">CRM Report - Teams and Stage(Select)</field>
<field name="model">report.crm.case.section.stage</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Cases by Section and Stage">
<search string="Cases by Team and Stage">
<group col="8" colspan="4">
<filter string="This Year" icon="terp-hr"
domain="[('name','=',time.localtime()[0])]"
help="Cases by Section and Stage for this year" />
help="Cases by Team and Stage for this year" />
<filter string="This Month" icon="terp-hr"
domain="[('month','=',time.localtime()[1])]"
help="Cases by Section and Stage for this month" />
help="Cases by Team and Stage for this month" />
<separator orientation="vertical"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
@@ -189,11 +189,11 @@
<!-- Cases by section, category and stage Tree View -->
<record model="ir.ui.view" id="view_crm_case_section_categ_stage_tree">
<field name="name">CRM Report - Section, Category and Stage(Tree)</field>
<field name="name">CRM Report - Team, Category and Stage(Tree)</field>
<field name="model">report.crm.case.section.categ.stage</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Cases by Section, Category and Stage">
<tree string="Cases by Team, Category and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
@@ -210,7 +210,7 @@
<!-- Cases by section, category and stage Form View -->
<record model="ir.ui.view" id="view_crm_case_section_categ_stage_form">
<field name="name">CRM Report - Section, Category and Stage(Form)</field>
<field name="name">CRM Report - Team, Category and Stage(Form)</field>
<field name="model">report.crm.case.section.categ.stage</field>
<field name="type">form</field>
<field name="arch" type="xml">
+13 -13
View File
@@ -2,20 +2,20 @@
<openerp>
<data>
#
# Sequences for crm.case.section
#
#
# Sequences for crm.case.section
#
<record model="ir.sequence.type" id="seq_section_code">
<field name="name">Section Code</field>
<field name="code">event.event</field>
</record>
<record model="ir.sequence" id="seq_section_code1">
<field name="name">Section Code</field>
<field name="code">event.event</field>
<field name="prefix">C/</field>
<field name="padding">3</field>
</record>
<record model="ir.sequence.type" id="seq_section_code">
<field name="name">Section Code</field>
<field name="code">event.event</field>
</record>
<record model="ir.sequence" id="seq_section_code1">
<field name="name">Section Code</field>
<field name="code">event.event</field>
<field name="prefix">C/</field>
<field name="padding">3</field>
</record>
</data>
</openerp>
+2 -2
View File
@@ -73,7 +73,7 @@ class hr_holidays_status(osv.osv):
'name' : fields.char('Name', size=64, required=True, translate=True),
'categ_id': fields.many2one('crm.case.categ', 'Meeting Category', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you link this type of leave with a category in the CRM, it will synchronize each leave asked with a case in this category, to display it in the company shared calendar for example.'),
'color_name' : fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
'limit' : fields.boolean('Allow to Override Limit', help='If you thick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'limit' : fields.boolean('Allow to Override Limit', help='If you thick this checkbox, the system will allow, for this team, the employees to take more leaves than the available ones.'),
'active' : fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves' : fields.function(_user_left_days, method=True, string='Maximum Leaves Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken' : fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
@@ -200,7 +200,7 @@ class hr_holidays(osv.osv):
if brows_obj.categ_id and brows_obj.categ_id.section_id and not brows_obj.categ_id.section_id.allow_unlink:
warning = {
'title': "Warning for ",
'message': "You won\'t be able to cancel this leave request because the CRM Section of the leave type disallows."
'message': "You won\'t be able to cancel this leave request because the CRM Sales Team of the leave type disallows."
}
return {'warning': warning}
+2 -15
View File
@@ -4,7 +4,6 @@
<!--
Process Node
-->
<record id="process_node_crmquotation0" model="process.node">
<field name="menu_id" ref="sale.menu_sale_order"/>
@@ -17,17 +16,6 @@
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_crmopportunity0" model="process.node">
<field name="model_id" ref="crm.model_crm_case"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;CRM Opportunity&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The CRM Opportunity can lead to a quotation.&quot;&quot;&quot;" name="note"/>
<field name="subflow_id" ref="crm.process_process_contractprocess0"/>
<field name="process_id" ref="sale.process_process_salesprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_contractanalytic0" model="process.node">
<field name="menu_id" ref="account.account_analytic_def_account"/>
<field name="model_id" ref="analytic.model_account_analytic_account"/>
@@ -49,9 +37,6 @@
</record>
<!--
Process Transition
-->
<record id="process_transition_crmopportunityquotation" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
@@ -90,5 +75,7 @@
<field model="process.node" name="source_node_id" ref="crm.process_node_opportunities0"/>
</record>
-->
</data>
</openerp>
+1 -1
View File
@@ -25,7 +25,7 @@ class sale_order(osv.osv):
_inherit = 'sale.order'
_description = 'Sale orders'
_columns = {
'section_id': fields.many2one('crm.case.section', 'Section'),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def _get_section(self, cr, uid, context):
+1 -1
View File
@@ -38,7 +38,7 @@
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
groups="base.group_extended"
help="My section"/>
help="My Sales Team"/>
</field>
</field>
</field>