From eaa4cad6277771f3df81f724e9bda2ecfa954f65 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 2 Feb 2018 10:29:11 +0100 Subject: [PATCH] [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters... (#211) * [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters... * Brand new icon * Added feature of loading an existing filter as criteria * Tests as SavepointCase for optimizing times * Tests in post-install for avoiding errors on res.partner not null constraints when several modules added them. * Updated documentation. * Fix mock in test for not commiting test data. * [FIX] mass_mailing_list_dynamic: Wasn't able to create contacts in fully synced lists Syncing context was being set in the wrong object. Added to test too. * [FIX] mass_mailing_list_dynamic: Allow to write back vals from res.partner Module mass_mailing_partner writes back certain values from partner to mass_mailing_contact. Module should allow that write operation. --- mass_mailing_partner/i18n/es.po | 45 ++++++++++++---------- mass_mailing_partner/models/res_partner.py | 2 +- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/mass_mailing_partner/i18n/es.po b/mass_mailing_partner/i18n/es.po index 55d8f3e..e2616b0 100644 --- a/mass_mailing_partner/i18n/es.po +++ b/mass_mailing_partner/i18n/es.po @@ -4,13 +4,14 @@ # # Translators: # OCA Transbot , 2017 +# enjolras , 2017 msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-12-01 02:19+0000\n" -"PO-Revision-Date: 2017-12-01 02:19+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-26 01:46+0000\n" +"PO-Revision-Date: 2018-02-26 01:46+0000\n" +"Last-Translator: enjolras , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,23 +22,23 @@ msgstr "" #. module: mass_mailing_partner #: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form msgid "Add contacts to mailing list" -msgstr "" +msgstr "Añadir contactos a la lista de correo" #. module: mass_mailing_partner #: model:ir.actions.act_window,name:mass_mailing_partner.action_partner_mail_list msgid "Add to mailing list" -msgstr "" +msgstr "Añadir a la lista de correo" #. module: mass_mailing_partner #: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form msgid "Cancel" -msgstr "" +msgstr "Cancelar" #. module: mass_mailing_partner #: model:ir.model,name:mass_mailing_partner.model_partner_mail_list_wizard #: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form msgid "Create contact mailing list" -msgstr "" +msgstr "Crear lista de correo de contactos" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_create_uid @@ -47,7 +48,7 @@ msgstr "Creado por" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_create_date msgid "Created on" -msgstr "Creado en" +msgstr "Creado el" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_display_name @@ -57,7 +58,7 @@ msgstr "Nombre mostrado" #. module: mass_mailing_partner #: model:ir.model,name:mass_mailing_partner.model_mail_mail_statistics msgid "Email Statistics" -msgstr "Estadísticas del email" +msgstr "Estadísticas de email" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_id @@ -67,7 +68,7 @@ msgstr "ID" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard___last_update msgid "Last Modified on" -msgstr "Última modificación en" +msgstr "Última modificación el" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_write_uid @@ -77,7 +78,7 @@ msgstr "Última actualización por" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_write_date msgid "Last Updated on" -msgstr "Última actualización en" +msgstr "Última actualización el" #. module: mass_mailing_partner #: model:ir.model,name:mass_mailing_partner.model_mail_mass_mailing_list @@ -90,19 +91,19 @@ msgstr "Lista de correo" #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner_mass_mailing_contacts_count #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_mass_mailing_contacts_count msgid "Mailing list number" -msgstr "" +msgstr "Número de lista de correo" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner_mass_mailing_contact_ids #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_mass_mailing_contact_ids #: model:ir.ui.view,arch_db:mass_mailing_partner.view_partner_form msgid "Mailing lists" -msgstr "" +msgstr "Listas de correo" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_mail_mass_mailing_list_partner_mandatory msgid "Mandatory Partner" -msgstr "" +msgstr "Asociado obligatorio" #. module: mass_mailing_partner #: model:ir.model,name:mass_mailing_partner.model_mail_mass_mailing_contact @@ -114,13 +115,13 @@ msgstr "Contacto de envío masivo" #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_mass_mailing_stats #: model:ir.ui.view,arch_db:mass_mailing_partner.view_partner_form msgid "Mass mailing stats" -msgstr "" +msgstr "Estadísticas de envío masivo" #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner_mass_mailing_stats_count #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_mass_mailing_stats_count msgid "Mass mailing stats number" -msgstr "" +msgstr "Número de estadísticas de envío masivo" #. module: mass_mailing_partner #: model:ir.model,name:mass_mailing_partner.model_res_partner @@ -129,30 +130,30 @@ msgstr "" #: model:ir.ui.view,arch_db:mass_mailing_partner.view_mail_mail_statistics_search #: model:ir.ui.view,arch_db:mass_mailing_partner.view_mail_mass_mailing_contact_search msgid "Partner" -msgstr "Empresa" +msgstr "Asociado" #. module: mass_mailing_partner #: code:addons/mass_mailing_partner/wizard/partner_mail_list_wizard.py:26 #, python-format msgid "Partner '%s' has no email." -msgstr "" +msgstr "El asociado '%s' no tiene email." #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_mail_mass_mailing_list_partner_category msgid "Partner Tag" -msgstr "" +msgstr "Etiqueta del asociado" #. module: mass_mailing_partner #: code:addons/mass_mailing_partner/models/mail_mass_mailing_contact.py:19 #: sql_constraint:mail.mass_mailing.contact:0 #, python-format msgid "Partner already exists in this mailing list." -msgstr "" +msgstr "El asociado ya existe en esta lista de correo." #. module: mass_mailing_partner #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_partner_ids msgid "Partner ids" -msgstr "" +msgstr "IDs de asociados" #. module: mass_mailing_partner #: code:addons/mass_mailing_partner/models/res_partner.py:36 @@ -161,3 +162,5 @@ msgid "" "This partner '%s' is subscribed to one or more mailing lists. Email must be " "assigned." msgstr "" +"El asociado '%s' está suscrito a una o más listas de correo. Se le debe " +"asignar un email." diff --git a/mass_mailing_partner/models/res_partner.py b/mass_mailing_partner/models/res_partner.py index 118dd03..334d6a0 100644 --- a/mass_mailing_partner/models/res_partner.py +++ b/mass_mailing_partner/models/res_partner.py @@ -55,7 +55,7 @@ class ResPartner(models.Model): if vals.get('name'): mm_vals['name'] = vals['name'] if vals.get('email'): - mm_vals['name'] = vals['email'] + mm_vals['email'] = vals['email'] # Using sudo because ACLs shouldn't produce data inconsistency self.env["mail.mass_mailing.contact"].sudo().search([ ("partner_id", "in", self.ids),