<?xml version="1.0"?>
<openerp>
<data noupdate="1">
-<!-- <menuitem id="menu_aftersale" name="After-Sale Services" parent="crm.menu_crm"/>-->
+ <menuitem id="base.menu_aftersale" name="After-Sale Services" parent="base.menu_base_partner" sequence="6"/>
######################## CLAIMS (menu) ###########################
<record model="ir.actions.act_window" id="crm_case_categ_claim0">
- <field name="name">All Claims</field>
+ <field name="name">Claims</field>
<field name="res_model">crm.claim</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="act_window_id" ref="crm_case_categ_claim0"/>
</record>
-<!-- <menuitem name="Claims" id="menu_crm_case_claims" parent="menu_aftersale" action="crm_case_categ_claim0"/>-->
+ <menuitem name="Claims" id="menu_crm_case_claims" parent="base.menu_aftersale" action="crm_case_categ_claim0"/>
</data>
<openerp>
<data noupdate="1">
<!-- MENU -->
+ <menuitem id="base.menu_fundrising" name="Fund Raising" parent="base.menu_base_partner" sequence="7"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_all1">
- <field name="name">All Funds</field>
+ <field name="name">Funds</field>
<field name="res_model">crm.fundraising</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm.crm_case_tree_view_fund"/>
<field name="view_id" ref="crm.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
-
-<!-- <menuitem name="Fund Raising" id="menu_crm_case_fund_raise" parent="crm.menu_crm" action="crm_case_category_act_fund_all1"/>-->
+ <menuitem name="Fund Raising" id="menu_crm_case_fund_raise" parent="base.menu_fundrising" action="crm_case_category_act_fund_all1" sequence="1"/>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
-<!-- <menuitem id="menu_aftersale" name="After-Sale Services" parent="crm.menu_crm"/>-->
+ <menuitem id="base.menu_aftersale" name="After-Sale Services" parent="base.menu_base_partner" sequence="6"/>
######################## Help Desk (menu) ###########################
<record model="ir.actions.act_window" id="crm_case_helpdesk_act111">
- <field name="name">All Helpdesk Requests</field>
+ <field name="name">Helpdesk Requests</field>
<field name="res_model">crm.helpdesk</field>
<field name="view_mode">tree,calendar,form</field>
- <field name="view_id" ref="crm_case_tree_view_helpdesk"/>
- <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+')]'"/>
+ <field name="view_id" ref="crm_case_tree_view_helpdesk"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<field name="view_id" ref="crm_case_form_view_helpdesk"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
-<!-- <menuitem name="Helpdesk and Support" id="menu_help_support_main" parent="menu_aftersale" action="crm_case_helpdesk_act111"/> -->
+ <menuitem name="Helpdesk and Support" id="menu_help_support_main" parent="base.menu_aftersale" action="crm_case_helpdesk_act111"/>
</data>
</openerp>
'categ_id' : form['category_id'],
'description' : form['note'],
'date' : form['deadline'],
- 'section_id' : form['section_id']
+ 'section_id' : form['section_id'],
+ 'partner_id': opportunity.partner_id.id,
+ 'partner_address_id':opportunity.partner_address_id.id,
+ 'description':opportunity.description
}, context=context)
-
+ vals = {}
+ if not opportunity.phonecall_id:
+ vals.update({'phonecall_id' : new_case})
+ opportunity_case_obj.write(cr, uid, [opportunity.id], vals)
opportunity_case_obj.case_cancel(cr, uid, [opportunity.id])
phonecall_case_obj.case_open(cr, uid, [new_case])
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
"the partner mentality in relation to our services.The scale has" \
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
+ 'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'),
}
<field name="name" string="Description" colspan="2"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="user_id" string="Responsible" select="2"/>
- <button string="Schedule a Phone Call"
- name="%(wizard_crm_job_reschedule_phone_call)d" icon="gtk-redo" type="action" />
<newline/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="2">
<field name="date" string="Next Interview"/>
<field name="duration" widget="float_time"/>
<button name="%(wizard_crm_job_meeting_set)d" string="Schedule Meeting" icon="terp-crm" type="action"/>
+ <field name="phonecall_id" select="1"/>
+ <button string="Schedule a Phone Call"
+ name="%(wizard_crm_job_reschedule_phone_call)d" icon="gtk-redo" type="action" attrs="{'invisible':[('phonecall_id','!=',False)]}"/>
+
</group>
<notebook colspan="4">
<page string="Job Info">
case = case_obj.browse(cr, uid, data['id'])
return {
'user_id' : case.user_id and case.user_id.id,
- 'category_id' : categ_id and categ_id[0] or case.categ_id and case.categ_id.id,
+ 'category_id' : categ_id and categ_id[0] or case.categ_id and case.categ_id.id,
+ 'section_id' : case.section_id and case.section_id.id or False,
'note' : case.description
}
#TODO : Take other info from job
new_phonecall_id = phonecall_case_obj.create(cr, uid, {
'name' : job.name,
- 'case_id' : job.inherit_case_id.id,
'user_id' : form['user_id'],
'categ_id' : form['category_id'],
'description' : form['note'],
'date' : form['deadline'],
- 'section_id' : form['section_id']
+ 'section_id' : form['section_id'],
+ 'description':job.description,
}, context=context)
new_phonecall = phonecall_case_obj.browse(cr, uid, new_phonecall_id)
vals = {}
if not job.case_id:
- vals.update({'case_id' : new_phonecall.inherit_case_id.id})
+ vals.update({'phonecall_id' : new_phonecall.id})
job_case_obj.write(cr, uid, [job.id], vals)
job_case_obj.case_cancel(cr, uid, [job.id])
phonecall_case_obj.case_open(cr, uid, [new_phonecall_id])
'description': fields.text('Description'),
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."),
- 'type': fields.many2one('project.task.type', 'Type'),
+ 'type': fields.many2one('project.task.type', 'Type', readonly=True),
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the task is created the state \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
\n If the task is over, the states is set to \'Done\'.'),
def next_type(self, cr, uid, ids, *args):
type_obj = self.pool.get('project.task.type')
- type_ids = type_obj.search(cr,uid,[])
+ types = []
for typ in self.browse(cr, uid, ids):
typeid = typ.type.id
- if typeid and type_ids.index(typeid) != len(type_ids)-1 :
- index = type_ids.index(typeid)
+ types = map(lambda x:x.id, typ.project_id.allowed_task_type)
+ if types:
+ if typeid and typeid in types and types.index(typeid) != len(types)-1 :
+ index = types.index(typeid)
+ else:
+ index = -1
+ self.write(cr, uid, typ.id, {'type': types[index+1]})
else:
- index = -1
- self.write(cr, uid, typ.id, {'type': type_ids[index+1]})
+ self.write(cr, uid, typ.id, {'type': ''})
return True
def prev_type(self, cr, uid, ids, *args):
type_obj = self.pool.get('project.task.type')
- type_ids = type_obj.search(cr,uid,[])
+ types = []
for typ in self.browse(cr, uid, ids):
typeid = typ.type.id
- if typeid and type_ids.index(typeid) != 0 :
- index = type_ids.index(typeid)
+ types = map(lambda x:x.id, typ.project_id.allowed_task_type)
+ if types:
+ if typeid and typeid in types and types.index(typeid) != 0 :
+ index = types.index(typeid)
+ else:
+ index = len(types)
+ self.write(cr, uid, typ.id, {'type': types[index-1]})
else:
- index = len(type_ids)
- self.write(cr, uid, typ.id, {'type': type_ids[index - 1]})
+ self.write(cr, uid, typ.id, {'type': ''})
return True
task()
<field name="project_time_mode_id" ref="product.uom_hour"></field>
</record>
+ <!-- Task Types -->
<record id="project_tt_specification" model="project.task.type">
<field name="sequence">1</field>
<field name="name">Specification</field>
<field name="sequence">4</field>
<field name="name">Merge</field>
</record>
-
+
+ <!-- Projects -->
<record id="project_project_9" model="project.project">
<field name="warn_manager">1</field>
<field name="name">Open ERP Integration</field>
<field name="manager" ref="base.user_root"/>
+ <field eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development'),ref('project_tt_testing'),ref('project_tt_merge')])]" name="allowed_task_type"/>
</record>
<record id="project_project_21" model="project.project">
<field name="warn_manager">1</field>
<field name="name">Study + Prototype</field>
<field model="account.analytic.account" name="category_id" search="[('name','=', 'Seagate P1')]"/>
<field name="manager" ref="base.user_root"/>
+ <field eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development')])]" name="allowed_task_type"/>
</record>
<record id="project_project_22" model="project.project">
<field name="priority">20</field>
<field name="name">Specific Developements</field>
<field model="account.analytic.account" name="category_id" search="[('name','=', 'Seagate P1')]"/>
<field name="manager" ref="base.user_root"/>
+ <field eval="[(6, 0, [ref('project_tt_specification'), ref('project_tt_development')])]" name="allowed_task_type"/>
</record>
<record id="project_project_23" model="project.project">
<field name="priority">30</field>
<field name="name">Install, data import, configuration</field>
<field model="account.analytic.account" name="category_id" search="[('name','=', 'Seagate P1')]"/>
<field name="manager" ref="base.user_root"/>
+ <field eval="[(6, 0, [ref('project_tt_development')])]" name="allowed_task_type"/>
</record>
+ <!-- Tasks -->
<record id="project_task_116" model="project.task">
<field name="planned_hours">38.0</field>
<field name="remaining_hours">38.0</field>