[FIX,IMP]: crm: Fixes and improvement in yml tests + security csv
bzr revid: rpa@tinyerp.com-20100506102700-9ksfm283t33q8m05
This commit is contained in:
parent
8cd78c3f41
commit
1e407d5f2d
|
@ -21,9 +21,9 @@
|
|||
|
||||
|
||||
{
|
||||
'name': 'Customer & Supplier Relationship Management',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'name': 'Customer & Supplier Relationship Management',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'description': """The generic Open ERP Customer Relationship Management
|
||||
system enables a group of people to intelligently and efficiently manage
|
||||
leads, opportunities, meeting, phonecall etc.
|
||||
|
@ -41,79 +41,79 @@ appropriate staff, and making sure all future correspondence gets to the right
|
|||
place.
|
||||
|
||||
The CRM module has a email gateway for the synchronisation interface
|
||||
between mails and Open ERP.""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
between mails and Open ERP.""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': [
|
||||
'base',
|
||||
'base_action_rule',
|
||||
'process',
|
||||
'mail_gateway',
|
||||
'base_calendar',
|
||||
'resource',
|
||||
],
|
||||
'base_action_rule',
|
||||
'process',
|
||||
'mail_gateway',
|
||||
'base_calendar',
|
||||
'resource',
|
||||
],
|
||||
'init_xml': [
|
||||
'crm_data.xml',
|
||||
'crm_meeting_data.xml',
|
||||
'crm_lead_data.xml',
|
||||
'crm_meeting_data.xml',
|
||||
'crm_opportunity_data.xml',
|
||||
'crm_phonecall_data.xml',
|
||||
],
|
||||
'crm_data.xml',
|
||||
'crm_meeting_data.xml',
|
||||
'crm_lead_data.xml',
|
||||
'crm_meeting_data.xml',
|
||||
'crm_opportunity_data.xml',
|
||||
'crm_phonecall_data.xml',
|
||||
],
|
||||
|
||||
'update_xml': [
|
||||
'wizard/crm_lead_to_partner_view.xml',
|
||||
'wizard/crm_lead_to_opportunity_view.xml',
|
||||
'wizard/crm_lead_to_partner_view.xml',
|
||||
'wizard/crm_lead_to_opportunity_view.xml',
|
||||
|
||||
'wizard/crm_phonecall_to_phonecall_view.xml',
|
||||
'wizard/crm_phonecall_to_partner_view.xml',
|
||||
'wizard/crm_phonecall_to_opportunity_view.xml',
|
||||
'wizard/crm_phonecall_to_phonecall_view.xml',
|
||||
'wizard/crm_phonecall_to_partner_view.xml',
|
||||
'wizard/crm_phonecall_to_opportunity_view.xml',
|
||||
|
||||
'wizard/crm_opportunity_to_phonecall_view.xml',
|
||||
'wizard/crm_partner_to_opportunity_view.xml',
|
||||
'wizard/crm_opportunity_to_phonecall_view.xml',
|
||||
'wizard/crm_partner_to_opportunity_view.xml',
|
||||
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_email_add_cc_view.xml',
|
||||
'crm_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_email_add_cc_view.xml',
|
||||
'crm_view.xml',
|
||||
|
||||
'crm_action_rule_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
'crm_lead_menu.xml',
|
||||
'crm_action_rule_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
'crm_lead_menu.xml',
|
||||
|
||||
'crm_meeting_view.xml',
|
||||
'crm_meeting_menu.xml',
|
||||
'crm_meeting_view.xml',
|
||||
'crm_meeting_menu.xml',
|
||||
|
||||
'crm_phonecall_view.xml',
|
||||
'crm_phonecall_menu.xml',
|
||||
'crm_phonecall_view.xml',
|
||||
'crm_phonecall_menu.xml',
|
||||
|
||||
'crm_opportunity_view.xml',
|
||||
'crm_opportunity_menu.xml',
|
||||
'crm_opportunity_view.xml',
|
||||
'crm_opportunity_menu.xml',
|
||||
|
||||
'security/crm_security.xml',
|
||||
# 'security/ir.model.access.csv',
|
||||
'security/crm_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
'report/crm_lead_report_view.xml',
|
||||
'report/crm_phonecall_report_view.xml',
|
||||
'report/crm_lead_report_view.xml',
|
||||
'report/crm_phonecall_report_view.xml',
|
||||
|
||||
'process/crm_configuration_process.xml',
|
||||
'process/crm_configuration_process.xml',
|
||||
'crm_installer_view.xml'
|
||||
],
|
||||
],
|
||||
'demo_xml': [
|
||||
'crm_demo.xml',
|
||||
'crm_lead_demo.xml',
|
||||
'crm_meeting_demo.xml',
|
||||
'crm_opportunity_demo.xml',
|
||||
'crm_demo.xml',
|
||||
'crm_lead_demo.xml',
|
||||
'crm_meeting_demo.xml',
|
||||
'crm_opportunity_demo.xml',
|
||||
'crm_phonecall_demo.xml'
|
||||
],
|
||||
],
|
||||
'test': [
|
||||
# 'test/test_crm_lead.yml',
|
||||
# 'test/test_crm_meeting.yml',
|
||||
# 'test/test_crm_opportunity.yml',
|
||||
# 'test/test_crm_phonecall.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0079056041421',
|
||||
'test/test_crm_lead.yml',
|
||||
'test/test_crm_meeting.yml',
|
||||
'test/test_crm_opportunity.yml',
|
||||
'test/test_crm_phonecall.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0079056041421',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -43,14 +43,17 @@ class crm_phonecall(osv.osv, crm_case):
|
|||
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
|
||||
domain="[('partner_id','=',partner_id)]"),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'description': fields.text('Description'),
|
||||
'description': fields.text('Description'),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
# phonecall fields
|
||||
'duration': fields.float('Duration'),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
"access_crm_case_stage_manager","crm.case.stage","model_crm_case_stage","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_resource_type_user","crm_case_resource_type user","model_crm_case_resource_type","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_resource_type_manager","crm_case_resource_type manager","model_crm_case_resource_type","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_report_user","crm.case.report","model_crm_case_report","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_report_manager","crm.case.report manager","model_crm_case_report","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_lead_report_user","crm.lead.report","model_crm_lead_report","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_phonecall_report_user","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_user",1,0,0,0
|
||||
"access_report_crm_case_service_dashboard","report.crm.case.service.dashboard","model_report_crm_case_service_dashboard","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_opportunity2phonecall","crm.opportunity2phonecall","model_crm_opportunity2phonecall","crm.group_crm_user",1,1,1,1
|
||||
|
|
|
|
@ -88,8 +88,7 @@
|
|||
-
|
||||
!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')
|
||||
obj_opportunity = self.pool.get('crm.lead')
|
||||
ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
|
||||
opportunity = obj_opportunity.browse(cr, uid, ids)[0]
|
||||
assert lead.partner_name == opportunity.partner_id.name
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
I start by creating a new Opportunity. And I select partner for opportunity.
|
||||
I can see that after selecting partner his contact and email is automatically filled.
|
||||
-
|
||||
!record {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
|
||||
!record {model: crm.lead, id: crm_opportunity_abcfuelcounits0}:
|
||||
email_from: info@balmerinc.be
|
||||
name: 'ABC FUEL CO 829264 - 10002 units '
|
||||
partner_address_id: base.res_partner_address_1
|
||||
|
@ -15,19 +15,19 @@
|
|||
- |
|
||||
I check that the opportunity is in 'New' state.
|
||||
-
|
||||
!assert {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
|
||||
!assert {model: crm.lead, id: crm_opportunity_abcfuelcounits0}:
|
||||
- state == "draft"
|
||||
- |
|
||||
I open opportunity by click on "Open" button,
|
||||
-
|
||||
!python {model: crm.opportunity}: |
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
|
||||
|
||||
- |
|
||||
I schedule Meeting on this current opportunity by clicking on "schedule
|
||||
Meeting".
|
||||
-
|
||||
!python {model: crm.opportunity}: |
|
||||
!python {model: crm.lead}: |
|
||||
self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
|
||||
|
||||
- |
|
||||
|
|
Loading…
Reference in New Issue