[IMP] crm.case.section,salesteams: add groups multi_salesteams
authorChristophe Matthieu <chm@openerp.com>
Mon, 25 Mar 2013 16:51:25 +0000 (17:51 +0100)
committerChristophe Matthieu <chm@openerp.com>
Mon, 25 Mar 2013 16:51:25 +0000 (17:51 +0100)
bzr revid: chm@openerp.com-20130325165125-a5t5fdbnz9rqw1jp

24 files changed:
addons/crm/crm.py
addons/crm/crm_case_section_view.xml
addons/crm/crm_lead_view.xml
addons/crm/crm_phonecall_view.xml
addons/crm/crm_report_view.xml
addons/crm/crm_view.xml
addons/crm/report/crm_lead_report_view.xml
addons/crm/report/crm_phonecall_report_view.xml
addons/crm/res_partner_view.xml
addons/crm/security/crm_security.xml
addons/crm/wizard/crm_lead_to_opportunity_view.xml
addons/crm/wizard/crm_merge_opportunities_view.xml
addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
addons/crm_claim/crm_claim_view.xml
addons/crm_claim/report/crm_claim_report_view.xml
addons/crm_helpdesk/crm_helpdesk_view.xml
addons/crm_helpdesk/report/crm_helpdesk_report_view.xml
addons/crm_partner_assign/report/crm_lead_report_view.xml
addons/crm_partner_assign/report/crm_partner_report_view.xml
addons/crm_partner_assign/res_partner_view.xml
addons/project_issue/report/project_issue_report_view.xml
addons/sale_crm/report/sale_crm_account_invoice_report_view.xml
addons/sale_crm/sale_crm_view.xml

index 0c103c8..bb2a71f 100644 (file)
@@ -241,7 +241,7 @@ class base_config_settings(osv.osv_memory):
     _inherit = 'base.config.settings'
     _columns = {
         'group_multi_salesteams': fields.boolean("Use mutli sales teams",
-            implied_group='crm.group_multi_salesteams',
+            implied_group='base.group_multi_salesteams',
             help=""" """),
     }
 
index a230f02..73f9970 100644 (file)
             id="crm.menu_crm_case_section_act"
             sequence="1"
             parent="base.menu_sales"
-            groups="crm.group_multi_salesteams"/>
+            groups="base.group_multi_salesteams"/>
   </data>
 </openerp>
\ No newline at end of file
index a1b547c..402116e 100644 (file)
                         <group>
                             <field name="user_id" on_change="onchange_user_id(section_id, user_id)"
                                 context="{'default_groups_ref': ['base.group_user', 'base.group_sale_salesman_all_leads']}"/>
-                            <label for="section_id"/>
-                            <div>
+                            <label for="section_id" groups="base.group_multi_salesteams"/>
+                            <div groups="base.group_multi_salesteams">
                                 <field name="section_id"/>
                                 <button name="case_escalate" string="Escalate" type="object" attrs="{'invisible': ['|', ('section_id','=',False), ('state', 'not in', ['draft','open','pending'])]}"/>
                             </div>
                     <field name="stage_id"/>
                     <field name="user_id" invisible="1"/>
                     <field name="partner_id" invisible="1"/>
-                    <field name="section_id" invisible="context.get('invisible_section', True)"/>
+                    <field name="section_id" invisible="context.get('invisible_section', True)" groups="base.group_multi_salesteams"/>
                     <field name="state" invisible="1"/>
                     <field name="type_id" invisible="1"/>
                     <field name="referred" invisible="1"/>
                     <field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
                     <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]"/>
                     <!-- TODO: uncomment and fix the case: many2one in the default search and used by the create -->
-                    <!--field name="section_id" context="{'invisible_section': False, 'default_section_id': self}"/-->
+                    <!--field name="section_id" context="{'invisible_section': False, 'default_section_id': self}" groups="base.group_multi_salesteams"/-->
                     <field name="user_id"/>
                     <field name="partner_id"/>
                     <field name="create_date"/>
 
                             <group>
                                 <field name="user_id" on_change="onchange_user_id(section_id, user_id)" context="{'default_groups_ref': ['base.group_user', 'base.group_sale_salesman_all_leads']}"/>
-                                <label for="section_id"/>
-                                <div>
+                                <label for="section_id" groups="base.group_multi_salesteams"/>
+                                <div groups="base.group_multi_salesteams">
                                     <field name="section_id" widget="selection"/>
                                     <button name="case_escalate" string="Escalate" type="object" class="oe_link" attrs="{'invisible': ['|', ('section_id','=',False), ('state', 'not in', ['draft','open','pending'])]}"/>
                                 </div>
                     <field name="stage_id"/>
                     <field name="planned_revenue" sum="Expected Revenues"/>
                     <field name="probability" avg="Avg. of Probability"/>
-                    <field name="section_id" invisible="context.get('invisible_section', True)"/>
+                    <field name="section_id" invisible="context.get('invisible_section', True)" groups="base.group_multi_salesteams"/>
                     <field name="user_id"/>
                     <field name="referred" invisible="1"/>
                     <field name="priority" invisible="1"/>
                     <field name="name" string="Opportunity" filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
                     <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]"/>
                     <!-- TODO: uncomment and fix the case: many2one in the default search and used by the create -->
-                    <!--field name="section_id" context="{'invisible_section': False, 'default_section_id': self}"/-->
+                    <!--field name="section_id" context="{'invisible_section': False, 'default_section_id': self}" groups="base.group_multi_salesteams"/-->
                     <field name="user_id"/>
                     <field name="partner_id"/>
                     <separator/>
index 67df85e..d4c8150 100644 (file)
                         <field name="date"/>
                         <field name="user_id"/>
                         <field name="duration" widget="float_time"/>
-                        <field name="section_id" colspan="1" widget="selection"/>
+                        <field name="section_id" colspan="1" widget="selection" groups="base.group_multi_salesteams"/>
                         <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
                         <field name="email_from" invisible="1"/> <!--not needed because of the chatter, thus invisible, but must be in the view as it's returned by onchange_partner_id()-->
                         <field name="categ_id" widget="selection"
                        help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
                <field name="partner_id"/>
                <field name="user_id"/>
-               <field name="section_id" string="Sales Team"/>
+               <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
                <group expand="0" string="Group By...">
                    <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
                    <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
index 355d862..73f3a58 100644 (file)
@@ -12,7 +12,7 @@
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"/>
+                <field name="section_id" groups="base.group_multi_salesteams"/>
                 <field name="category2_id"/>
                 <field name="stage_id"/>
                 <field name="amount_revenue"/>
@@ -33,7 +33,7 @@
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"  widget="selection"/>
+                <field name="section_id"  widget="selection" groups="base.group_multi_salesteams"/>
                 <field name="category2_id" />
                 <field name="stage_id"/>
                 <field name="amount_revenue"/>
@@ -53,7 +53,7 @@
             <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"/>
+                <field name="section_id" group="True" groups="base.group_multi_salesteams"/>
             </graph>
         </field>
     </record>
@@ -69,7 +69,7 @@
                     <field name="month"/>
                     <field name="nbr"/>
                     <field name="state"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                     <field name="category2_id"/>
                </search>
             </field>
@@ -95,7 +95,7 @@
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"/>
+                <field name="section_id" groups="base.group_multi_salesteams"/>
                 <field name="stage_id"/>
                 <field name="amount_revenue"/>
                 <field name="nbr"/>
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"  widget="selection"/>
+                <field name="section_id"  widget="selection" groups="base.group_multi_salesteams"/>
                 <field name="stage_id"/>
                 <field name="amount_revenue"/>
                 <field name="nbr" />
             <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"/>
+                <field name="section_id" group="True" groups="base.group_multi_salesteams"/>
             </graph>
         </field>
     </record>
                     <field name="month"/>
                     <field name="nbr"/>
                     <field name="state"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                </search>
             </field>
         </record>
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"/>
+                <field name="section_id" groups="base.group_multi_salesteams"/>
                 <field name="categ_id"/>
                 <field name="stage_id"/>
                 <field name="nbr"/>
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"  widget="selection"/>
+                <field name="section_id"  widget="selection" groups="base.group_multi_salesteams"/>
                 <field name="categ_id"/>
                 <field name="stage_id"/>
                 <field name="nbr" />
                     <field name="month"/>
                     <field name="nbr"/>
                     <field name="state"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                </search>
             </field>
         </record>
             <graph string="Cases by Section, Category and Stage" type="bar" orientation="horizontal">
                 <field name="categ_id"/>
                 <field name="nbr" operator="+"/>
-                <field name="section_id" group="True"/>
+                <field name="section_id" group="True" groups="base.group_multi_salesteams"/>
             </graph>
         </field>
     </record>
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"/>
+                <field name="section_id" groups="base.group_multi_salesteams"/>
                 <field name="categ_id"/>
                 <field name="category2_id"/>
                 <field name="stage_id"/>
                 <field name="name"/>
                 <field name="month"/>
                 <field name="user_id"/>
-                <field name="section_id"  widget="selection"/>
+                <field name="section_id"  widget="selection" groups="base.group_multi_salesteams"/>
                 <field name="categ_id"/>
                 <field name="category2_id"/>
                 <field name="stage_id"/>
                     <field name="month"/>
                     <field name="nbr"/>
                     <field name="state"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                </search>
             </field>
     </record>
             <graph string="Cases by Section, Category and Type" type="bar" orientation="horizontal">
                 <field name="category2_id"/>
                 <field name="nbr" operator="+"/>
-                <field name="section_id" group="True"/>
+                <field name="section_id" group="True" groups="base.group_multi_salesteams"/>
             </graph>
         </field>
     </record>
index e74b153..63385fa 100644 (file)
                 <form string="Case Category" version="7.0">
                     <group>
                         <field name="name"/>
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                         <field name="object_id" invisible="1"/>
                     </group>
                 </form>
             <field name="arch" type="xml">
                 <tree string="Case Category">
                     <field name="name"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                 </tree>
             </field>
         </record>
             <field name="arch" type="xml">
                 <tree string="Campaign">
                     <field name="name"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                 </tree>
             </field>
         </record>
                 <form string="Campaign" version="7.0">
                     <group>
                         <field name="name"/>
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                     </group>
                 </form>
             </field>
             <field name="arch" type="xml">
                 <tree string="Payment Mode">
                     <field name="name"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                 </tree>
             </field>
         </record>
                 <form string="Payment Mode" version="7.0">
                     <group>
                         <field name="name"/>
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                     </group>
                 </form>
             </field>
index 0e5df88..5485e11 100644 (file)
@@ -19,7 +19,7 @@
                 <field name="channel_id" invisible="1"/>
                 <field name="type" invisible="1"/>
                 <field name="priority" invisible="1"/>
-                <field name="section_id" invisible="1"/>
+                <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                 <field name="user_id" invisible="1"/>
                 <field name="company_id" invisible="1"/>
                 <field name="partner_id" invisible="1"/>
@@ -77,7 +77,7 @@
                             help="Leads/Opportunities that are assigned to one of the sale teams I manage"/>
                     <separator/>
                     <filter icon="terp-personal" string="My Case(s)" help="Leads/Opportunities that are assigned to me" domain="[('user_id','=',uid)]"/>
-                    <field name="section_id" context="{'invisible_section': False}"/>
+                    <field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
                     <field name="user_id" string="Salesperson"/>
                     <group expand="0" string="Extended Filters...">
                         <field name="partner_id"/>
                 <field name="creation_month" invisible="1"/>
                 <field name="creation_day" invisible="1"/>
                 <field name="deadline_month" invisible="1"/>
-                <field name="section_id" invisible="1"/>
+                <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                 <field name="user_id" invisible="1"/>
                 <field name="partner_id" invisible="1"/>
                 <field name="country_id" invisible="1"/>
index 1f1a4f9..1513eaa 100644 (file)
@@ -11,7 +11,7 @@
                 <tree string="Phone calls" create="false">
                     <field name="name" invisible="1"/>
                     <field name="month" invisible="1"/>
-                    <field name="section_id" invisible="1"/>
+                    <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                     <field name="priority" invisible="1"/>
                     <field name="user_id" invisible="1"/>
                     <field name="company_id" invisible="1"/>
@@ -59,7 +59,7 @@
                             help="Phone calls that are assigned to one of the sale teams I manage"/>
                     <separator/>
                     <filter icon="terp-personal" string="My Phone Calls" help="Phone Calls that are assigned to me" domain="[('user_id','=',uid)]" />
-                    <field name="section_id" string="Sales Team" context="{'invisible_section': False}"/>
+                    <field name="section_id" string="Sales Team" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
                     <field name="user_id" string="Salesperson"/>
                     <group expand="0" string="Extended Filters...">
                         <field name="partner_id"/>
index 150c1ee..dd6c50d 100644 (file)
@@ -10,7 +10,7 @@
                 <field eval="18" name="priority"/>
                 <field name="arch" type="xml">
                     <field name="user_id" position="after">
-                        <field name="section_id" completion="1"/>
+                        <field name="section_id" completion="1" groups="base.group_multi_salesteams"/>
                     </field>
                 </field>
         </record>
index 2a06840..fb34f28 100644 (file)
@@ -23,7 +23,7 @@
         <field name="users" eval="[(4, ref('base.user_root'))]"/>
     </record>
 
-    <record id="group_multi_salesteams" model="res.groups">
+    <record id="base.group_multi_salesteams" model="res.groups">
         <field name="name">Use mutli sales teams</field>
         <field name="category_id" ref="base.module_category_hidden"/>
     </record>
index 00686de..4093df9 100644 (file)
@@ -22,7 +22,7 @@
                                 <field name="phone"/>
                                 <field name="stage_id"/>
                                 <field name="user_id"/>
-                                <field name="section_id"/>
+                                <field name="section_id" groups="base.group_multi_salesteams"/>
                             </tree>
                         </field>
                     </group>
                                 <field name="phone"/>
                                 <field name="stage_id"/>
                                 <field name="user_id"/>
-                                <field name="section_id"/>
+                                <field name="section_id" groups="base.group_multi_salesteams"/>
                             </tree>
                         </field>
                     </group>
 
                     <group string="Assign opportunities to" attrs="{'invisible': [('name', '=', '')]}">
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                         <field name="user_ids" widget="many2many_tags"/>
                     </group>
 
index f68abeb..919d83c 100644 (file)
@@ -19,7 +19,7 @@
                             <field name="phone"/>
                             <field name="stage_id"/>
                             <field name="user_id"/>
-                            <field name="section_id"/>
+                            <field name="section_id" groups="base.group_multi_salesteams"/>
                         </tree>
                     </field>
                     <footer>
index ad36944..846d71d 100644 (file)
@@ -23,7 +23,7 @@
                             <field name="partner_id" readonly="True"/>
                             <field name="phone"/>
                             <field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>
-                            <field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}"/>
+                            <field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}" groups="base.group_multi_salesteams"/>
                         </group>
                     </group>
                     <field name="note" placeholder="Call Description" />
index e2d2521..812468b 100644 (file)
@@ -15,7 +15,7 @@
                         <field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
                         <field name="partner_id" readonly="True"/>
                         <field name="user_id"/>
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                     </group>
                     <footer>
                         <button name="action_schedule" type="object" string="Log Call" attrs="{'invisible' : [('action', '!=', 'log')]}" class="oe_highlight"/>
index b1ab72e..78e467a 100644 (file)
                     <group colspan="4" col="4"  groups="base.group_user">
                         <field name="user_id"/>
                         <field name="priority"/>
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                         <field name="date_deadline"/>
                         <field name="state" groups="base.group_no_one"/>
                     </group>
index a61490c..991810e 100644 (file)
@@ -11,7 +11,7 @@
                <tree string="Claims" create="false">
                     <field name="name" invisible="1"/>
                     <field name="month" invisible="1"/>
-                    <field name="section_id" invisible="1"/>
+                    <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                     <field name="user_id" invisible="1"/>
                     <field name="company_id" invisible="1"/>
                     <field name="partner_id" invisible="1"/>
@@ -61,7 +61,7 @@
                     <filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
                     <field name="company_id" groups="base.group_multi_company"/>
                     <field name="user_id" string="Salesperson"/>
-                    <field name="section_id" string="Sales Team" context="{'invisible_section': False}"/>
+                    <field name="section_id" string="Sales Team" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
                     <group  expand="0" string="Extended Filters...">
                         <field name="partner_id"/>
                         <field name="stage_id" domain="[('section_ids', '=', 'section_id')]"/>
index 6c0e343..6769b42 100644 (file)
@@ -48,7 +48,7 @@
                 <sheet string="Helpdesk Support">
                     <group col="4" class="oe_header">
                         <field name="name" string="Query"/>
-                        <field name="section_id" widget="selection"/>
+                        <field name="section_id" widget="selection" groups="base.group_multi_salesteams"/>
                         <field name="user_id"/>
                         <field name="date"/>
                         <field name="date_deadline"/>
                     <field name="date" string="Date"/>
                     <field name="date_deadline"/>
                     <field name="user_id"/>
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                     <field name="priority"/>
                     <field name="state"/>
                 </tree>
                             help="Helpdesk requests that are assigned to me or to one of the sale teams I manage" />
                     <field name="partner_id" />
                     <field name="user_id"/>
-                    <field name="section_id" string="Sales Team"/>
+                    <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
                     <group expand="0" string="Group By...">
                         <filter string="Partner" icon="terp-partner" domain="[]" help="Partner" context="{'group_by':'partner_id'}" />
                         <filter string="Responsible" icon="terp-personal" domain="[]" help="Responsible User" context="{'group_by':'user_id'}" />
index 05f5026..795ae21 100644 (file)
@@ -11,7 +11,7 @@
                 <tree string="Helpdesk" create="false">
                     <field name="name" invisible="1"/>
                     <field name="month" invisible="1"/>
-                    <field name="section_id" invisible="1"/>
+                    <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                     <field name="user_id" invisible="1"/>
                     <field name="company_id" invisible="1"/>
                     <field name="partner_id" invisible="1"/>
@@ -60,7 +60,7 @@
                     <separator/>
                     <filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[('section_id.user_id.company_id','=',uid)]" help="My company"/>
                     <field name="user_id" string="Salesperson"/>
-                    <field name="section_id" string="Sales Team" context="{'invisible_section': False}"/>   
+                    <field name="section_id" string="Sales Team" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>   
                     <field name="company_id" groups="base.group_multi_company"/>
                     <group expand="0" string="Extended Filters..."  groups="base.group_no_one">
                         <field name="priority" string="Priority"/>
index ee9266a..fbc4630 100644 (file)
@@ -10,7 +10,7 @@
                 <search string="Leads Analysis">
                     <filter icon="terp-check" string="Current" domain="[('state','in',('draft','open'))]"/>
                     <filter icon="terp-dialog-close" string="Closed" domain="[('state','=','done')]"/>
-                    <field name="section_id" context="{'invisible_section': False}"/>
+                    <field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
                     <field name="grade_id"/>
                     <field name="user_id"/>
                     <field name="partner_assigned_id"/>
@@ -69,7 +69,7 @@
                 <field name="year" invisible="1"/>
                 <field name="month" invisible="1"/>
                 <field name="date_assign" invisible="1"/>
-                <field name="section_id" invisible="1"/>
+                <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                 <field name="user_id" invisible="1"/>
                 <field name="grade_id" invisible="1" widget="selection"/>
                 <field name="partner_assigned_id" invisible="1"/>
index eb2c868..4e7e13a 100644 (file)
@@ -8,7 +8,7 @@
             <field name="model">crm.partner.report.assign</field>
             <field name="arch" type="xml">
                 <search string="Partner assigned Analysis">
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                     <field name="user_id"/>
                     <field name="grade_id"/>
                     <field name="activation"/>
@@ -49,7 +49,7 @@
                 <field name="date_review" invisible="1"/>
                 <field name="date_partnership" invisible="1"/>
                 <field name="period_id" invisible="1"/>
-                <field name="section_id" invisible="1"/>
+                <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                 <field name="user_id" invisible="1"/>
                 <field name="opp"/>
                 <field name="turnover"/>
index 433a290..a6e2e69 100644 (file)
                                  states="open,pending" type="object"
                                  icon="gtk-go-forward" />
                              <field name="section_id"
-                                 invisible="context.get('invisible_section', True)" />
+                                 invisible="context.get('invisible_section', True)"  groups="base.group_multi_salesteams"/>
                              <field name="user_id" />
                              <field name="state" />
                              <button name="case_cancel" string="Cancel"
index 47ea91f..e56c661 100644 (file)
@@ -14,7 +14,7 @@
                     <field name="version_id" string="Version" invisible="1"/>
                     <field name="priority" invisible="1"/>
                     <field name="company_id" invisible="1" groups="base.group_multi_company"/>
-                    <field name="section_id" invisible="1"/>
+                    <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                     <field name="user_id" invisible="1"/>
                     <field name="channel_id" invisible="1"/>
                     <field name="partner_id" invisible="1"/>
index 41166d5..983701d 100644 (file)
@@ -10,7 +10,7 @@
         <field name="arch" type="xml">
             <data>
                 <xpath expr="//field[@name='date']" position="after">
-                    <field name="section_id"/>
+                    <field name="section_id" groups="base.group_multi_salesteams"/>
                 </xpath>
             </data>
         </field>
index c7b10db..4e13a06 100644 (file)
@@ -22,7 +22,7 @@
             <field name="inherit_id" ref="sale.view_order_form"/>
             <field name="arch" type="xml">
                 <field name="user_id" position="after">
-                    <field name="section_id" widget="selection"/>
+                    <field name="section_id" widget="selection" groups="base.group_multi_salesteams"/>
                     <field name="categ_ids" widget="many2many_tags"/>
                 </field>
             </field>
@@ -41,7 +41,7 @@
                         help="My Sales Team(s)"/>
                 </xpath>
                 <xpath expr="//field[@name='user_id']" position="after">
-                    <field name="section_id" string="Sales Team"/>
+                    <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
                 </xpath>
             </field>
         </record>
@@ -54,7 +54,7 @@
             <field name="arch" type="xml">
                 <data>
                     <xpath expr="//field[@name='date_invoice']" position="after">
-                        <field name="section_id" invisible="1"/>
+                        <field name="section_id" invisible="1" groups="base.group_multi_salesteams"/>
                     </xpath>
                 </data>
             </field>
@@ -79,7 +79,7 @@
             <field name="arch" type="xml">
                 <data>
                     <xpath expr="//field[@name='user_id']" position="after">
-                        <field name="section_id"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                     </xpath>
                 </data>
             </field>