Browse Source

[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.
pull/323/head
Pedro M. Baeza 7 years ago
committed by Victor Martin
parent
commit
61cc1ad9ad
  1. 45
      mass_mailing_partner/i18n/es.po
  2. 2
      mass_mailing_partner/models/res_partner.py

45
mass_mailing_partner/i18n/es.po

@ -4,13 +4,14 @@
# #
# Translators: # Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017 # OCA Transbot <transbot@odoo-community.org>, 2017
# enjolras <yo@miguelrevilla.com>, 2017
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \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 <transbot@odoo-community.org>, 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 <yo@miguelrevilla.com>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -21,23 +22,23 @@ msgstr ""
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form #: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form
msgid "Add contacts to mailing list" msgid "Add contacts to mailing list"
msgstr ""
msgstr "Añadir contactos a la lista de correo"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.actions.act_window,name:mass_mailing_partner.action_partner_mail_list #: model:ir.actions.act_window,name:mass_mailing_partner.action_partner_mail_list
msgid "Add to mailing list" msgid "Add to mailing list"
msgstr ""
msgstr "Añadir a la lista de correo"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form #: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form
msgid "Cancel" msgid "Cancel"
msgstr ""
msgstr "Cancelar"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model,name:mass_mailing_partner.model_partner_mail_list_wizard #: 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 #: model:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form
msgid "Create contact mailing list" msgid "Create contact mailing list"
msgstr ""
msgstr "Crear lista de correo de contactos"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_create_uid #: 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 #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_create_date #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_create_date
msgid "Created on" msgid "Created on"
msgstr "Creado en"
msgstr "Creado el"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_display_name #: 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 #. module: mass_mailing_partner
#: model:ir.model,name:mass_mailing_partner.model_mail_mail_statistics #: model:ir.model,name:mass_mailing_partner.model_mail_mail_statistics
msgid "Email Statistics" msgid "Email Statistics"
msgstr "Estadísticas del email"
msgstr "Estadísticas de email"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_id #: 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 #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard___last_update #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard___last_update
msgid "Last Modified on" msgid "Last Modified on"
msgstr "Última modificación en"
msgstr "Última modificación el"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_write_uid #: 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 #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_write_date #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_write_date
msgid "Last Updated on" msgid "Last Updated on"
msgstr "Última actualización en"
msgstr "Última actualización el"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model,name:mass_mailing_partner.model_mail_mass_mailing_list #: 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_partner_mass_mailing_contacts_count
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_mass_mailing_contacts_count #: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_mass_mailing_contacts_count
msgid "Mailing list number" msgid "Mailing list number"
msgstr ""
msgstr "Número de lista de correo"
#. module: mass_mailing_partner #. 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_partner_mass_mailing_contact_ids
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_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 #: model:ir.ui.view,arch_db:mass_mailing_partner.view_partner_form
msgid "Mailing lists" msgid "Mailing lists"
msgstr ""
msgstr "Listas de correo"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mail_mass_mailing_list_partner_mandatory #: model:ir.model.fields,field_description:mass_mailing_partner.field_mail_mass_mailing_list_partner_mandatory
msgid "Mandatory Partner" msgid "Mandatory Partner"
msgstr ""
msgstr "Asociado obligatorio"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model,name:mass_mailing_partner.model_mail_mass_mailing_contact #: 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.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 #: model:ir.ui.view,arch_db:mass_mailing_partner.view_partner_form
msgid "Mass mailing stats" msgid "Mass mailing stats"
msgstr ""
msgstr "Estadísticas de envío masivo"
#. module: mass_mailing_partner #. 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_partner_mass_mailing_stats_count
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users_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" msgid "Mass mailing stats number"
msgstr ""
msgstr "Número de estadísticas de envío masivo"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model,name:mass_mailing_partner.model_res_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_mail_statistics_search
#: model:ir.ui.view,arch_db:mass_mailing_partner.view_mail_mass_mailing_contact_search #: model:ir.ui.view,arch_db:mass_mailing_partner.view_mail_mass_mailing_contact_search
msgid "Partner" msgid "Partner"
msgstr "Empresa"
msgstr "Asociado"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: code:addons/mass_mailing_partner/wizard/partner_mail_list_wizard.py:26 #: code:addons/mass_mailing_partner/wizard/partner_mail_list_wizard.py:26
#, python-format #, python-format
msgid "Partner '%s' has no email." msgid "Partner '%s' has no email."
msgstr ""
msgstr "El asociado '%s' no tiene email."
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mail_mass_mailing_list_partner_category #: model:ir.model.fields,field_description:mass_mailing_partner.field_mail_mass_mailing_list_partner_category
msgid "Partner Tag" msgid "Partner Tag"
msgstr ""
msgstr "Etiqueta del asociado"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: code:addons/mass_mailing_partner/models/mail_mass_mailing_contact.py:19 #: code:addons/mass_mailing_partner/models/mail_mass_mailing_contact.py:19
#: sql_constraint:mail.mass_mailing.contact:0 #: sql_constraint:mail.mass_mailing.contact:0
#, python-format #, python-format
msgid "Partner already exists in this mailing list." msgid "Partner already exists in this mailing list."
msgstr ""
msgstr "El asociado ya existe en esta lista de correo."
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_partner_ids #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard_partner_ids
msgid "Partner ids" msgid "Partner ids"
msgstr ""
msgstr "IDs de asociados"
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: code:addons/mass_mailing_partner/models/res_partner.py:36 #: 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 " "This partner '%s' is subscribed to one or more mailing lists. Email must be "
"assigned." "assigned."
msgstr "" msgstr ""
"El asociado '%s' está suscrito a una o más listas de correo. Se le debe "
"asignar un email."

2
mass_mailing_partner/models/res_partner.py

@ -55,7 +55,7 @@ class ResPartner(models.Model):
if vals.get('name'): if vals.get('name'):
mm_vals['name'] = vals['name'] mm_vals['name'] = vals['name']
if vals.get('email'): if vals.get('email'):
mm_vals['name'] = vals['email']
mm_vals['email'] = vals['email']
# Using sudo because ACLs shouldn't produce data inconsistency # Using sudo because ACLs shouldn't produce data inconsistency
self.env["mail.mass_mailing.contact"].sudo().search([ self.env["mail.mass_mailing.contact"].sudo().search([
("partner_id", "in", self.ids), ("partner_id", "in", self.ids),

Loading…
Cancel
Save