From f8a6776092e031846a3b81186bf9d25ecb4bb9c5 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 8 May 2012 09:43:38 +0200 Subject: [PATCH 1/4] [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 --- addons/crm/crm_lead.py | 12 ++++++------ addons/crm/crm_lead_view.xml | 8 ++++---- addons/email_template/res_partner.py | 2 +- addons/import_sugarcrm/import_sugarcrm.py | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 00f477a75d7..be372410f26 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -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: diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index a867777cb5b..087675f827e 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -144,8 +144,8 @@ - - + + @@ -506,8 +506,8 @@ - - + + diff --git a/addons/email_template/res_partner.py b/addons/email_template/res_partner.py index a451b171b70..7b350442e84 100644 --- a/addons/email_template/res_partner.py +++ b/addons/email_template/res_partner.py @@ -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."), } diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py index d6e43866bf2..3ff14bcf1c7 100644 --- a/addons/import_sugarcrm/import_sugarcrm.py +++ b/addons/import_sugarcrm/import_sugarcrm.py @@ -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', From f056758c5425b76426490a4e344a49a357f2cfb2 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 8 May 2012 10:42:14 +0200 Subject: [PATCH 2/4] [FIX] crm: renamed fields opt_in and opt_out in yml test files bzr revid: rco@openerp.com-20120508084214-l9mg2ljv2sh0ibvw --- addons/crm/test/ui/crm_demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/test/ui/crm_demo.yml b/addons/crm/test/ui/crm_demo.yml index 5ef40838466..b5fd005126c 100644 --- a/addons/crm/test/ui/crm_demo.yml +++ b/addons/crm/test/ui/crm_demo.yml @@ -7,7 +7,7 @@ type: opportunity stage_id: crm.stage_lead1 state: draft - optin: True + opt_in: True - I create lead record to call Mailing opt-out onchange method. - @@ -15,7 +15,7 @@ name: 'Need 20 Days of Consultancy' type: opportunity state: draft - optout: True + opt_out: True - I create phonecall record to call partner onchange method. - From 9724b1ceb03915861ca083cfa8161c79399060f6 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 10 May 2012 09:48:13 +0200 Subject: [PATCH 3/4] [IMP] crm: in crm_lead, use attribute oldname in renamed field bzr revid: rco@openerp.com-20120510074813-ssqkyfv7o8auosow --- addons/crm/crm_lead.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index be372410f26..6c45a17f626 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -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), - '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."), + 'opt_in': fields.boolean('Opt-In', oldname='optin', help="If opt-in is checked, this contact has accepted to receive emails."), + 'opt_out': fields.boolean('Opt-Out', oldname='optout', 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), From 1dcd32ec5e32aa6b1abf07005a40c2190b0182c1 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 10 May 2012 09:53:14 +0200 Subject: [PATCH 4/4] [IMP] email_template: fix capitalization in po files bzr revid: rco@openerp.com-20120510075314-u9977nneo4rtad3t --- addons/email_template/i18n/ar.po | 2 +- addons/email_template/i18n/bg.po | 2 +- addons/email_template/i18n/ca.po | 2 +- addons/email_template/i18n/da.po | 2 +- addons/email_template/i18n/de.po | 2 +- addons/email_template/i18n/email_template.pot | 2 +- addons/email_template/i18n/es.po | 2 +- addons/email_template/i18n/es_CR.po | 2 +- addons/email_template/i18n/es_EC.po | 2 +- addons/email_template/i18n/et.po | 2 +- addons/email_template/i18n/fi.po | 2 +- addons/email_template/i18n/fr.po | 2 +- addons/email_template/i18n/hr.po | 2 +- addons/email_template/i18n/hu.po | 2 +- addons/email_template/i18n/it.po | 2 +- addons/email_template/i18n/ja.po | 2 +- addons/email_template/i18n/mn.po | 2 +- addons/email_template/i18n/nb.po | 2 +- addons/email_template/i18n/nl.po | 4 ++-- addons/email_template/i18n/pl.po | 2 +- addons/email_template/i18n/pt.po | 2 +- addons/email_template/i18n/pt_BR.po | 2 +- addons/email_template/i18n/ro.po | 2 +- addons/email_template/i18n/ru.po | 2 +- addons/email_template/i18n/sr.po | 2 +- addons/email_template/i18n/sr@latin.po | 2 +- addons/email_template/i18n/sv.po | 2 +- addons/email_template/i18n/tr.po | 2 +- addons/email_template/i18n/zh_CN.po | 4 ++-- 29 files changed, 31 insertions(+), 31 deletions(-) diff --git a/addons/email_template/i18n/ar.po b/addons/email_template/i18n/ar.po index d33ab17cb6a..6cd4ab69803 100644 --- a/addons/email_template/i18n/ar.po +++ b/addons/email_template/i18n/ar.po @@ -524,7 +524,7 @@ msgstr "قوالب" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/bg.po b/addons/email_template/i18n/bg.po index b8693e6d1f1..46f35795360 100644 --- a/addons/email_template/i18n/bg.po +++ b/addons/email_template/i18n/bg.po @@ -524,7 +524,7 @@ msgstr "Шаблони" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/ca.po b/addons/email_template/i18n/ca.po index 428ed903e2a..56646819296 100644 --- a/addons/email_template/i18n/ca.po +++ b/addons/email_template/i18n/ca.po @@ -528,7 +528,7 @@ msgstr "Plantilles" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/da.po b/addons/email_template/i18n/da.po index 84e51a4b98a..3fb07f1c770 100644 --- a/addons/email_template/i18n/da.po +++ b/addons/email_template/i18n/da.po @@ -524,7 +524,7 @@ msgstr "" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/de.po b/addons/email_template/i18n/de.po index 2ce67607ea5..878014c9753 100644 --- a/addons/email_template/i18n/de.po +++ b/addons/email_template/i18n/de.po @@ -551,7 +551,7 @@ msgstr "Vorlagen" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "abmelden" #. module: email_template diff --git a/addons/email_template/i18n/email_template.pot b/addons/email_template/i18n/email_template.pot index 3b28522ab22..019816ac323 100644 --- a/addons/email_template/i18n/email_template.pot +++ b/addons/email_template/i18n/email_template.pot @@ -498,7 +498,7 @@ msgstr "" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/es.po b/addons/email_template/i18n/es.po index 18ea0406d93..378847061c8 100644 --- a/addons/email_template/i18n/es.po +++ b/addons/email_template/i18n/es.po @@ -528,7 +528,7 @@ msgstr "Plantillas" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/es_CR.po b/addons/email_template/i18n/es_CR.po index f3b612b0264..cff07d6dc25 100644 --- a/addons/email_template/i18n/es_CR.po +++ b/addons/email_template/i18n/es_CR.po @@ -561,7 +561,7 @@ msgstr "Plantillas" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "Optar-Salir" #. module: email_template diff --git a/addons/email_template/i18n/es_EC.po b/addons/email_template/i18n/es_EC.po index 67445346577..2fc04d666ef 100644 --- a/addons/email_template/i18n/es_EC.po +++ b/addons/email_template/i18n/es_EC.po @@ -524,7 +524,7 @@ msgstr "" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/et.po b/addons/email_template/i18n/et.po index 8604ac5d2bf..65b0ac31654 100644 --- a/addons/email_template/i18n/et.po +++ b/addons/email_template/i18n/et.po @@ -524,7 +524,7 @@ msgstr "" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/fi.po b/addons/email_template/i18n/fi.po index 6e39542e336..3398fa78e25 100644 --- a/addons/email_template/i18n/fi.po +++ b/addons/email_template/i18n/fi.po @@ -527,7 +527,7 @@ msgstr "Viestipohjat" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/fr.po b/addons/email_template/i18n/fr.po index 9436b37ece2..dcd1ea5ec25 100644 --- a/addons/email_template/i18n/fr.po +++ b/addons/email_template/i18n/fr.po @@ -535,7 +535,7 @@ msgstr "Modèles" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/hr.po b/addons/email_template/i18n/hr.po index 9be03f269e2..825453baa22 100644 --- a/addons/email_template/i18n/hr.po +++ b/addons/email_template/i18n/hr.po @@ -524,7 +524,7 @@ msgstr "" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/hu.po b/addons/email_template/i18n/hu.po index d28faf4fc81..6ba6360caab 100644 --- a/addons/email_template/i18n/hu.po +++ b/addons/email_template/i18n/hu.po @@ -524,7 +524,7 @@ msgstr "Sablonok" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/it.po b/addons/email_template/i18n/it.po index 34f21c8451c..901a8dcb6ef 100644 --- a/addons/email_template/i18n/it.po +++ b/addons/email_template/i18n/it.po @@ -528,7 +528,7 @@ msgstr "Template" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/ja.po b/addons/email_template/i18n/ja.po index 483f64ba9e0..6f32ba97eed 100644 --- a/addons/email_template/i18n/ja.po +++ b/addons/email_template/i18n/ja.po @@ -531,7 +531,7 @@ msgstr "テンプレート" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "オプトアウト" #. module: email_template diff --git a/addons/email_template/i18n/mn.po b/addons/email_template/i18n/mn.po index a890f8ad452..f72310552e1 100644 --- a/addons/email_template/i18n/mn.po +++ b/addons/email_template/i18n/mn.po @@ -527,7 +527,7 @@ msgstr "Загвар" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/nb.po b/addons/email_template/i18n/nb.po index 31eb9424a73..502d6c7e645 100644 --- a/addons/email_template/i18n/nb.po +++ b/addons/email_template/i18n/nb.po @@ -524,7 +524,7 @@ msgstr "Maler" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/nl.po b/addons/email_template/i18n/nl.po index ed1411b8213..2413cb12207 100644 --- a/addons/email_template/i18n/nl.po +++ b/addons/email_template/i18n/nl.po @@ -560,8 +560,8 @@ msgstr "Sjablonen" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" -msgstr "Opt-out" +msgid "Opt-Out" +msgstr "Opt-Out" #. module: email_template #: help:email.template,email_bcc:0 diff --git a/addons/email_template/i18n/pl.po b/addons/email_template/i18n/pl.po index e28d28be466..5a9d8787933 100644 --- a/addons/email_template/i18n/pl.po +++ b/addons/email_template/i18n/pl.po @@ -524,7 +524,7 @@ msgstr "Szablony" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/pt.po b/addons/email_template/i18n/pt.po index f5243f7c60f..56de58aa6b5 100644 --- a/addons/email_template/i18n/pt.po +++ b/addons/email_template/i18n/pt.po @@ -524,7 +524,7 @@ msgstr "Modelos" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/pt_BR.po b/addons/email_template/i18n/pt_BR.po index ec127e94e04..59f2bbb5ce4 100644 --- a/addons/email_template/i18n/pt_BR.po +++ b/addons/email_template/i18n/pt_BR.po @@ -524,7 +524,7 @@ msgstr "Modelos" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/ro.po b/addons/email_template/i18n/ro.po index 40e64a040f4..e84b2b895e5 100644 --- a/addons/email_template/i18n/ro.po +++ b/addons/email_template/i18n/ro.po @@ -528,7 +528,7 @@ msgstr "Șabloane" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/ru.po b/addons/email_template/i18n/ru.po index 03d8a70981d..adbee34081c 100644 --- a/addons/email_template/i18n/ru.po +++ b/addons/email_template/i18n/ru.po @@ -524,7 +524,7 @@ msgstr "Шаблоны" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/sr.po b/addons/email_template/i18n/sr.po index dc88905779e..32038a3e50e 100644 --- a/addons/email_template/i18n/sr.po +++ b/addons/email_template/i18n/sr.po @@ -527,7 +527,7 @@ msgstr "Šabloni" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/sr@latin.po b/addons/email_template/i18n/sr@latin.po index c9444054d0b..2e192860506 100644 --- a/addons/email_template/i18n/sr@latin.po +++ b/addons/email_template/i18n/sr@latin.po @@ -527,7 +527,7 @@ msgstr "Šabloni" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/sv.po b/addons/email_template/i18n/sv.po index 0fe43879b71..33f8684b5a5 100644 --- a/addons/email_template/i18n/sv.po +++ b/addons/email_template/i18n/sv.po @@ -524,7 +524,7 @@ msgstr "Mallar" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/tr.po b/addons/email_template/i18n/tr.po index 9a9de67ba4a..fc39b1ec495 100644 --- a/addons/email_template/i18n/tr.po +++ b/addons/email_template/i18n/tr.po @@ -530,7 +530,7 @@ msgstr "Şablonlar" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" +msgid "Opt-Out" msgstr "" #. module: email_template diff --git a/addons/email_template/i18n/zh_CN.po b/addons/email_template/i18n/zh_CN.po index 77e41bef712..97dd8b76600 100644 --- a/addons/email_template/i18n/zh_CN.po +++ b/addons/email_template/i18n/zh_CN.po @@ -528,8 +528,8 @@ msgstr "模板" #. module: email_template #: field:res.partner,opt_out:0 -msgid "Opt-out" -msgstr "Opt-out" +msgid "Opt-Out" +msgstr "Opt-Out" #. module: email_template #: help:email.template,email_bcc:0