[IMP]: crm: Usability Improvement in case section(Sale teams)form. and some minor changes in yaml.
bzr revid: atp@tinyerp.co.in-20100513052042-xdwu6fbyh20pe8q3
This commit is contained in:
parent
76e6f9ed4c
commit
4f2caf3615
|
@ -67,7 +67,7 @@ class crm_case_section(osv.osv):
|
|||
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
|
||||
'server_id':fields.many2one('email.smtpclient', 'Server ID'),
|
||||
'note': fields.text('Description'),
|
||||
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -13,31 +13,28 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Sales Team">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="parent_id" select="2" widget="selection"/>
|
||||
<field name="code" select="1"/>
|
||||
<newline/>
|
||||
<field name="resource_calendar_id" select="2"/>
|
||||
<field name="user_id" select="2"/>
|
||||
<field name="working_hours" widget="float_time"/>
|
||||
<field name="active" select="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Sales Team">
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Responsible" colspan="2"/>
|
||||
<field name="parent_id" select="2" widget="selection"/>
|
||||
<field name="user_id" select="2"/>
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Contact Information" colspan="2"/>
|
||||
<field name="server_id" select="2"/>
|
||||
<separator string="Mailgateway" colspan="2"/>
|
||||
<field name="reply_to" select="2"/>
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Sales Team Property" colspan="2"/>
|
||||
<field name="active" select="2"/>
|
||||
<separator string="Configuration" colspan="2"/>
|
||||
<field name="allow_unlink" select="2"/>
|
||||
</group>
|
||||
<separator string="Members List" colspan="4"/>
|
||||
<separator string="Team Members" colspan="4"/>
|
||||
<field name="member_ids" nolabel="1" colspan="4"/>
|
||||
<separator string="Note" colspan="4"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="note" select="1" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
@ -171,16 +171,6 @@
|
|||
id="act_res_users_2_report_crm_case_user" name="Monthly cases"
|
||||
res_model="crm.case.report" src_model="res.users" />
|
||||
|
||||
<act_window domain="[('section_id', '=', active_id)]"
|
||||
id="act_crm_case_section_2_report_crm_case_user"
|
||||
name="Monthly cases by user" res_model="crm.case.report"
|
||||
src_model="crm.case.section" />
|
||||
|
||||
<act_window domain="[('section_id', '=', active_id)]"
|
||||
id="act_crm_case_section_2_report_crm_case_categ"
|
||||
name="Monthly cases by Sales Team" res_model="crm.case.report"
|
||||
src_model="crm.case.section" />
|
||||
|
||||
<!-- Closed & Open CRM Case view for Random Activities dashboard Tree View -->
|
||||
|
||||
<record id="board_view_crm_case_open_dashboard_tree" model="ir.ui.view">
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
login: user_crm
|
||||
name: user_crm
|
||||
password: user_crm
|
||||
|
||||
|
||||
- |
|
||||
I start by creating a new lead "New Customer" and I provide an address to this
|
||||
|
@ -25,7 +24,7 @@
|
|||
!record {model: crm.lead, id: crm_lead_newcustomer0}:
|
||||
email_from: info@mycustomer.com
|
||||
name: New Customer
|
||||
partner_name: Sandip zala
|
||||
partner_name: Capegemini
|
||||
phone: (855) 924-4364
|
||||
mobile: (333) 715-1450
|
||||
section_id: crm.section_sales_department
|
||||
|
@ -41,6 +40,11 @@
|
|||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
|
||||
- |
|
||||
I check that lead is now in 'open' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in open state}:
|
||||
- state == "open"
|
||||
|
||||
- |
|
||||
As the lead seems to be a real business opportunity, I will convert it to a
|
||||
|
@ -49,8 +53,8 @@
|
|||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
|
||||
if not lead.partner_id:
|
||||
self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
|
||||
action = self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
|
||||
assert action['res_model'] == 'crm.lead2opportunity.partner'
|
||||
-
|
||||
|
|
||||
Now, select "create a new partner" option in this wizard.
|
||||
|
@ -66,7 +70,7 @@
|
|||
Now, I give value to this wizard field.
|
||||
-
|
||||
!record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
|
||||
name: Sandip zala
|
||||
name: Capegemini
|
||||
planned_revenue: 0.00
|
||||
probability: 0.00
|
||||
-
|
||||
|
@ -79,8 +83,8 @@
|
|||
I can check that a lead and a business opportunity is now assigned to this
|
||||
lead.
|
||||
-
|
||||
# !python {model: crm.lead, id: crm_lead_newcustomer0}:
|
||||
# - opportunity_id.id != False
|
||||
# !python {model: crm.lead, id: crm_lead_newcustomer0}:
|
||||
# - opportunity_id == False
|
||||
|
||||
- |
|
||||
I check that the partner associated to this lead as the same country, phone number
|
||||
|
@ -88,7 +92,6 @@
|
|||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
|
||||
print "lead", lead.partner_name
|
||||
obj_opportunity = self.pool.get('crm.opportunity')
|
||||
ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
|
||||
opportunity = obj_opportunity.browse(cr, uid, ids)[0]
|
||||
|
|
|
@ -4,44 +4,55 @@
|
|||
!record {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
|
||||
date: '2010-04-21 18:59:00'
|
||||
name: Interview call
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
partner_mobile: (+32)2 211 34 83
|
||||
section_id: crm.section_sales_department
|
||||
- |
|
||||
Now , I select partner by click on "Create a Partner" button.
|
||||
|
||||
-
|
||||
!record {model: crm.phonecall2partner, id: crm_phonecall2partner_1}:
|
||||
action: exist
|
||||
partner_id: base.res_partner_9
|
||||
|
||||
-
|
||||
Now, click on "Continue" button of this wizard.
|
||||
-
|
||||
!python {model: crm.phonecall2partner}: |
|
||||
self.make_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]})
|
||||
|
||||
- |
|
||||
As the success of phonecall seems to be a real business opportunity, I will convert
|
||||
it to opportunity by clicking on the "Convert to Opportunity" button.
|
||||
-
|
||||
!record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_interviewcall0}:
|
||||
name: Interview call
|
||||
partner_id: base.res_partner_9
|
||||
planned_revenue: 0.0
|
||||
probability: 0.0
|
||||
-
|
||||
Now, I click on "Convert" button of this wizard.
|
||||
-
|
||||
# !python {model: crm.phonecall2opportunity}: |
|
||||
# self.action_apply(cr, uid, [1], {'active_id': ref('crm_phonecall_interviewcall0')})
|
||||
|
||||
!python {model: crm.phonecall2opportunity}: |
|
||||
self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")})
|
||||
-
|
||||
# This is not working, find a way to do that in YAML
|
||||
|
||||
|
||||
- |
|
||||
I can see that a business opportunity is now assigned to this phonecall
|
||||
- |
|
||||
I check that the partner associated to this as the same country, phone number
|
||||
and name than the phonecall.
|
||||
- |
|
||||
In order to avoid the duplication of similar partner, OpenERP should be able to
|
||||
detect if the partner exists or if it should be created from the phonecall during the
|
||||
conversion.
|
||||
- |
|
||||
In order to test this, I log as the user "user_crm2"
|
||||
- |
|
||||
Then, I create the same phonecall than the preceeding one but I change the name
|
||||
of the phonecall. But this customer keeps the same email.
|
||||
- |
|
||||
This time OpenERP should detect that this customer already exists in the
|
||||
partner base and I check that in the wizard, proposes me to link to this existing
|
||||
partner instead of creating another one.
|
||||
- |
|
||||
I confirm the conversion wizard.
|
||||
-
|
||||
!assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
|
||||
- opportunity_id == True
|
||||
|
||||
- |
|
||||
And I check that the phonecall and the newly created business opportunity is linked
|
||||
to the partner
|
||||
to same partner
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
xid= ref('crm_phonecall_interviewcall0')
|
||||
obj_phonecall = self.browse(cr, uid, xid)
|
||||
ids = self.pool.get('crm.opportunity').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
|
||||
obj_opp = self.pool.get('crm.opportunity').browse(cr, uid, ids)[0]
|
||||
assert obj_phonecall.partner_id == obj_opp.partner_id
|
||||
|
||||
- |
|
||||
I schedule Meeting on this current phonecall by clicking on "schedule
|
||||
Meeting"
|
||||
|
|
Loading…
Reference in New Issue