[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:
Divyesh Makwana (Open ERP)
2012-07-31 16:10:43 +05:30
parent 0af85d64c3
commit fd0e40eb67
3 changed files with 17 additions and 7 deletions
+11 -1
View File
@@ -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'),
}
+5 -5
View File
@@ -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>
+1 -1
View File
@@ -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>