[ADD] crm_project_issue: link module to create lead from issues and issues from lead
bzr revid: jem@openerp.com-20140213143044-p06ef9scr32ihef2
This commit is contained in:
parent
a3411b79f1
commit
7d656e961b
|
@ -0,0 +1,3 @@
|
|||
|
||||
import project_issue
|
||||
import crm_lead
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
'name' : 'CRM Project Issues',
|
||||
'version': '1.0',
|
||||
'summary': 'Module linker between Leads and Issues',
|
||||
'sequence': '19',
|
||||
'category': 'Project Management',
|
||||
'complexity': 'easy',
|
||||
'description':
|
||||
"""
|
||||
CRM Project Issues
|
||||
==================
|
||||
|
||||
Link module to map leads and issues
|
||||
""",
|
||||
'data': [
|
||||
'project_issue_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
],
|
||||
'depends' : ['crm', 'project_issue'],
|
||||
'installable': True,
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
|
||||
class crm_lead(osv.Model):
|
||||
_inherit = 'crm.lead'
|
||||
|
||||
_columns = {
|
||||
'project_issue_ids': fields.one2many('project.issue', 'lead_id', "Project Issues"),
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="crm_project_issue_lead_form_view">
|
||||
<field name="name">lead.form</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_form_view_leads" />
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Related Issues">
|
||||
<field name="project_issue_ids" colspan="4" nolabel="1" context="{'default_name': name, 'default_partner_id' : partner_id, 'default_lead_id' : id, 'default_email_from' : email_from, 'default_description' : description}">
|
||||
<tree>
|
||||
<field name="create_date" />
|
||||
<field name="name" />
|
||||
<field name="user_id" />
|
||||
<field name="project_id" />
|
||||
<field name="partner_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
|
||||
class project_issue(osv.Model):
|
||||
_inherit = 'project.issue'
|
||||
|
||||
_columns = {
|
||||
'lead_id': fields.many2one('crm.lead', ondelete='set null', string="Related lead"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="crm_project_issue_form_view">
|
||||
<field name="name">project.issue.form</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="inherit_id" ref="project_issue.project_issue_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="priority" position="after">
|
||||
<field name="lead_id" groups="base.group_user" context="{'default_name': name, 'default_partner_id' : partner_id, 'default_email_from' : email_from, 'default_description' : description}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue