[IMP]crm,hr: Fix the crm opt_out field problem and set Employee group for leave_id field in kanban view
bzr revid: dbr@tinyerp.com-20120507092027-gnqcqpzaa6ese1x8
This commit is contained in:
parent
6ea4587fad
commit
341e8845d5
|
@ -163,7 +163,7 @@ class crm_lead(crm_case, osv.osv):
|
|||
'contact_name': fields.char('Contact Name', size=64),
|
||||
'partner_name': fields.char("Customer Name", size=64,help='The name of the future partner company that will be created while converting the lead into opportunity', select=1),
|
||||
'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
|
||||
'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
|
||||
'opt_out': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
|
||||
'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
|
@ -228,10 +228,10 @@ class crm_lead(crm_case, osv.osv):
|
|||
return obj_id
|
||||
|
||||
def on_change_optin(self, cr, uid, ids, optin):
|
||||
return {'value':{'optin':optin,'optout':False}}
|
||||
return {'value':{'optin':optin,'opt_out':False}}
|
||||
|
||||
def on_change_optout(self, cr, uid, ids, optout):
|
||||
return {'value':{'optout':optout,'optin':False}}
|
||||
return {'value':{'opt_out':optout,'optin':False}}
|
||||
|
||||
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
|
||||
if not stage_id:
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
<group colspan="2" col="2">
|
||||
<separator string="Mailings" colspan="2" col="2"/>
|
||||
<field name="optin" on_change="on_change_optin(optin)"/>
|
||||
<field name="optout" on_change="on_change_optout(optout)"/>
|
||||
<field name="opt_out" on_change="on_change_optout(opt_out)"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" groups="base.group_no_one">
|
||||
<separator string="Statistics" colspan="2" col="2"/>
|
||||
|
@ -508,7 +508,7 @@
|
|||
<group colspan="2" col="2">
|
||||
<separator string="Mailings" colspan="2"/>
|
||||
<field name="optin" on_change="on_change_optin(optin)"/>
|
||||
<field name="optout" on_change="on_change_optout(optout)"/>
|
||||
<field name="opt_out" on_change="on_change_optout(opt_out)"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
|
|
|
@ -517,7 +517,7 @@
|
|||
<li t-if="record.current_leave_id.raw_value || record.last_login.raw_value">
|
||||
<span t-if="record.current_leave_id.raw_value" t-att-class="record.current_leave_state.raw_value=='validate'?'oe_kanban_color_3':'oe_kanban_color_2'">
|
||||
<span class="oe_kanban_button" style="font-size: 100%%">
|
||||
<field name="current_leave_id"/>
|
||||
<field name="current_leave_id" groups="base.group_user"/>
|
||||
</span>
|
||||
</span>
|
||||
<span t-if="record.last_login.raw_value && record.last_login.raw_value.is().today()" class="oe_kanban_button" style="font-size: 100%%">
|
||||
|
|
Loading…
Reference in New Issue