[IMP] crm : Added a new 'crm.payment.mode' object in order to relate the 'Payment Mode' field of 'crm.lead' and its related changes.
bzr revid: mdi@tinyerp.com-20120731104043-t59f7c69k7oedz43
This commit is contained in:
+11
-1
@@ -35,6 +35,16 @@ CRM_LEAD_PENDING_STATES = (
|
||||
crm.AVAILABLE_STATES[4][0], # Pending
|
||||
)
|
||||
|
||||
class crm_payment_mode(osv.osv):
|
||||
""" Payment Mode for Fund """
|
||||
_name = "crm.payment.mode"
|
||||
_description = "Payment Mode"
|
||||
_columns = {
|
||||
'name': fields.char('Payment Mode', size=64, required=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
}
|
||||
crm_payment_mode()
|
||||
|
||||
class crm_lead(base_stage, osv.osv):
|
||||
""" CRM Lead Case """
|
||||
_name = "crm.lead"
|
||||
@@ -259,7 +269,7 @@ class crm_lead(base_stage, osv.osv):
|
||||
'function': fields.char('Function', size=128),
|
||||
'title': fields.many2one('res.partner.title', 'Title'),
|
||||
'company_id': fields.many2one('res.company', 'Company', select=1),
|
||||
'payment_mode': fields.many2one('crm.case.resource.type', 'Campaign', \
|
||||
'payment_mode': fields.many2one('crm.payment.mode', 'Payment Mode', \
|
||||
domain="[('section_id','=',section_id)]"),
|
||||
'planned_cost': fields.float('Planned Costs'),
|
||||
}
|
||||
|
||||
@@ -114,24 +114,24 @@
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
</record>
|
||||
|
||||
<!-- CASE Resource(type_id) -->
|
||||
<!-- Payment Mode -->
|
||||
|
||||
<record model="crm.case.resource.type" id="type_fund1">
|
||||
<record model="crm.payment.mode" id="payment_mode_1">
|
||||
<field name="name">Cash</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.resource.type" id="type_fund2">
|
||||
<record model="crm.payment.mode" id="payment_mode_2">
|
||||
<field name="name">Cheque</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.resource.type" id="type_fund3">
|
||||
<record model="crm.payment.mode" id="payment_mode_3">
|
||||
<field name="name">Credit Card</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.resource.type" id="type_fund4">
|
||||
<record model="crm.payment.mode" id="payment_mode_4">
|
||||
<field name="name">Demand Draft</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
</record>
|
||||
|
||||
@@ -560,7 +560,7 @@
|
||||
</page>
|
||||
<page string="Fund Raising">
|
||||
<group>
|
||||
<field name="payment_mode" string="Payment Mode" widget="selection"/>
|
||||
<field name="payment_mode" widget="selection"/>
|
||||
<field name="planned_cost"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user