[FIX] crm: rename fields optin, optout to opt_in, opt_out, to make them consistent with opt_out in res.partner (module email_template)

lp bug: https://launchpad.net/bugs/995986 fixed

bzr revid: rco@openerp.com-20120508074338-2dcayog3ebybfi22
This commit is contained in:
Raphael Collet 2012-05-08 09:43:38 +02:00
parent 76ce881d6f
commit f8a6776092
4 changed files with 12 additions and 12 deletions

View File

@ -162,8 +162,8 @@ class crm_lead(crm_case, osv.osv):
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel (mail, direct, phone, ...)"),
'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_in': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
'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),
@ -227,11 +227,11 @@ class crm_lead(crm_case, osv.osv):
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id
def on_change_optin(self, cr, uid, ids, optin):
return {'value':{'optin':optin,'optout':False}}
def on_change_opt_in(self, cr, uid, ids, opt_in):
return {'value':{'opt_in':opt_in,'opt_out':False}}
def on_change_optout(self, cr, uid, ids, optout):
return {'value':{'optout':optout,'optin':False}}
def on_change_opt_out(self, cr, uid, ids, opt_out):
return {'value':{'opt_out':opt_out,'opt_in':False}}
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
if not stage_id:

View File

@ -144,8 +144,8 @@
</group>
<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_in" on_change="on_change_opt_in(opt_in)"/>
<field name="opt_out" on_change="on_change_opt_out(opt_out)"/>
</group>
<group colspan="2" col="2" groups="base.group_no_one">
<separator string="Statistics" colspan="2" col="2"/>
@ -506,8 +506,8 @@
</group>
<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_in" on_change="on_change_opt_in(opt_in)"/>
<field name="opt_out" on_change="on_change_opt_out(opt_out)"/>
</group>
</page>
<page string="Extra Info">

View File

@ -28,7 +28,7 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'opt_out': fields.boolean('Opt-out', help="If checked, this partner will not receive any automated email " \
'opt_out': fields.boolean('Opt-Out', help="If checked, this partner will not receive any automated email " \
"notifications, such as the availability of invoices."),
}

View File

@ -697,7 +697,7 @@ class sugar_import(import_framework):
'state': map_val('status', self.lead_state) ,
'fax': 'phone_fax',
'referred': 'refered_by',
'optout': 'do_not_call',
'opt_out': 'do_not_call',
'channel_id/id': call(self.get_channel_id, value('lead_source')),
'type_id/id': ref(self.TABLE_COMPAIGN, 'campaign_id'),
'country_id/id': 'country_id/id',