diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-12-12 11:38:25 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-12-12 11:38:25 +0100 |
| commit | f351dd8cab980a67ee17c431574d8ba9c37b8fdc (patch) | |
| tree | 2cb6e64d0a5083aade80206ea7fbfbcda69992b8 /addons/mail | |
| parent | 1144235d06a2ad42060c05d4ece145ce46a660e1 (diff) | |
| parent | 047e2b28de4653f11e097e6232d7fb79d54ce3af (diff) | |
[MERGE] forward port branch 12.0 up to 047e2b28de4
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/data/mail_data.xml | 10 | ||||
| -rw-r--r-- | addons/mail/i18n/cs.po | 108 | ||||
| -rw-r--r-- | addons/mail/i18n/it.po | 27 | ||||
| -rw-r--r-- | addons/mail/i18n/ja.po | 2 | ||||
| -rw-r--r-- | addons/mail/i18n/mail.pot | 6 | ||||
| -rw-r--r-- | addons/mail/i18n/nb.po | 15 | ||||
| -rw-r--r-- | addons/mail/i18n/nl.po | 2 | ||||
| -rw-r--r-- | addons/mail/i18n/pt_BR.po | 9 | ||||
| -rw-r--r-- | addons/mail/models/mail_activity.py | 2 | ||||
| -rw-r--r-- | addons/mail/models/mail_thread.py | 6 | ||||
| -rw-r--r-- | addons/mail/models/res_partner.py | 16 | ||||
| -rw-r--r-- | addons/mail/static/src/js/composers/chatter_composer.js | 3 | ||||
| -rw-r--r-- | addons/mail/static/tests/chatter_tests.js | 49 | ||||
| -rw-r--r-- | addons/mail/wizard/email_template_preview.py | 1 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 8 |
15 files changed, 176 insertions, 88 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 9553cc5b69e..05e61a912dd 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -169,7 +169,7 @@ <td align="center" style="min-width: 590px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: white; padding: 0; border-collapse:separate;"> <tr><td valign="middle"> - <span style="font-size: 10px;">Your <t t-esc="'%s' % model_description or 'document'"/></span><br/> + <span style="font-size: 10px;">Your <t t-esc="model_description or 'document'"/></span><br/> <span style="font-size: 20px; font-weight: bold;"> <t t-esc="message.record_name and message.record_name.replace('/','-') or ''"/> </span> @@ -233,11 +233,11 @@ <t t-set="is_online" t-value="access_action and access_action['type'] == 'ir.actions.act_url'"/> <t t-set="access_url" t-value="is_online and record._get_share_url(redirect=True, signup_partner=True) or ''"/> <t t-set="access_name"> - View <t t-esc="record._description.lower()"/> + View <t t-esc="model_description or 'document'"/> </t> <table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: white; padding: 0; border-collapse:separate;"> <tr><td valign="middle"> - <span style="font-size: 10px;">Your <t t-esc="'%s' % model_description or 'document'"/></span><br/> + <span style="font-size: 10px;">Your <t t-esc="model_description or 'document'"/></span><br/> <span style="font-size: 20px; font-weight: bold;"> <t t-esc="message.record_name"/> </span> @@ -301,11 +301,11 @@ <template id="message_user_assigned"> <p style="margin: 0px;"> <span>Dear <t t-esc="object.user_id.sudo().name"/>,</span><br /> - <span style="margin-top: 8px;">You have been assigned to the <t t-esc="object._description.lower()"/> <t t-esc="object.display_name"/>.</span> + <span style="margin-top: 8px;">You have been assigned to the <t t-esc="model_description or 'document'"/> <t t-esc="object.display_name"/>.</span> </p> <p style="margin-top: 24px; margin-bottom: 16px;"> <a t-att-href="'/mail/view?model=%s&res_id=%s' % (object._name, object.id)" style="background-color:#875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px;"> - View <t t-esc="object._description.lower()"/> + View <t t-esc="model_description or 'document'"/> </a> </p> </template> diff --git a/addons/mail/i18n/cs.po b/addons/mail/i18n/cs.po index 92a815ef29d..a9cd7a68cbe 100644 --- a/addons/mail/i18n/cs.po +++ b/addons/mail/i18n/cs.po @@ -43,7 +43,7 @@ msgstr "%d Zprávy" #: code:addons/mail/static/src/js/activity.js:89 #, python-format msgid "%d days overdue" -msgstr "" +msgstr "%d dnů po splatnosti" #. module: mail #: code:addons/mail/models/mail_template.py:249 @@ -129,7 +129,7 @@ msgstr "0 budoucích" #: code:addons/mail/static/src/xml/systray.xml:95 #, python-format msgid "0 Late" -msgstr "" +msgstr "0 Pozdě" #. module: mail #. openerp-web @@ -357,14 +357,14 @@ msgstr "Přijmout" #: code:addons/mail/static/src/xml/discuss.xml:185 #, python-format msgid "Accept selected messages" -msgstr "" +msgstr "Přijmout vybrané zprávy" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/thread.xml:412 #, python-format msgid "Accept |" -msgstr "" +msgstr "Přijmout |" #. module: mail #: selection:mail.compose.message,moderation_status:0 @@ -393,7 +393,7 @@ msgstr "Akce k provedení" #. module: mail #: model:ir.model,name:mail.model_ir_actions_act_window_view msgid "Action Window View" -msgstr "" +msgstr "Zobrazení okna akcí" #. module: mail #: model:ir.model.fields,help:mail.field_mail_message_subtype__default @@ -446,7 +446,7 @@ msgstr "Činnost" #. module: mail #: model:ir.model,name:mail.model_mail_activity_mixin msgid "Activity Mixin" -msgstr "" +msgstr "Aktivita Mixin" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_activity_mixin__activity_state @@ -470,14 +470,14 @@ msgstr "Typy aktivit" #. module: mail #: model:ir.model.fields,field_description:mail.field_ir_actions_server__activity_user_type msgid "Activity User Type" -msgstr "" +msgstr "Typ uživatelské aktivity" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/activity.xml:37 #, python-format msgid "Activity type" -msgstr "" +msgstr "Typ aktivity" #. module: mail #. openerp-web @@ -497,7 +497,7 @@ msgstr "Přidat kanály" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_blacklist_view_form msgid "Add Email Blacklist" -msgstr "" +msgstr "Přidat email na Blacklist" #. module: mail #. openerp-web @@ -521,7 +521,7 @@ msgstr "" #: model:ir.model.fields,field_description:mail.field_mail_mail__add_sign #: model:ir.model.fields,field_description:mail.field_mail_message__add_sign msgid "Add Sign" -msgstr "" +msgstr "Přidat podpis" #. module: mail #: model:ir.model.fields,field_description:mail.field_email_template_preview__user_signature @@ -553,19 +553,19 @@ msgstr "Přidejte soukromý kanál" #. module: mail #: model_terms:ir.actions.act_window,help:mail.mail_blacklist_action msgid "Add an email address in the blacklist" -msgstr "" +msgstr "Přidat e-mailovou adresu do černé listiny " #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/composer.xml:15 #, python-format msgid "Add attachment" -msgstr "" +msgstr "Přidat přílohu" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_wizard_invite_form msgid "Add channels to notify..." -msgstr "" +msgstr "Přidat kanály k oznámení ..." #. module: mail #: model_terms:ir.ui.view,arch_db:mail.email_compose_message_wizard_form @@ -578,7 +578,7 @@ msgstr "Přidat kontakt pro upozornění..." #: code:addons/mail/static/src/xml/thread.xml:418 #, python-format msgid "Add this email address to white list of people" -msgstr "" +msgstr "Přidat tuto e-mailovou adresu na bílý seznam osob" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_compose_message__partner_ids @@ -605,7 +605,7 @@ msgstr "Po" #: code:addons/mail/static/src/xml/followers.xml:26 #, python-format msgid "Alarm menu" -msgstr "" +msgstr "Nabídka výstrahy" #. module: mail #: selection:mail.activity.type,decoration_type:0 @@ -674,12 +674,12 @@ msgstr "Vše" #: code:addons/mail/static/src/xml/thread.xml:46 #, python-format msgid "All pages: " -msgstr "" +msgstr "Všechny stránky: " #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_moderation_view_search msgid "Allowed Emails" -msgstr "" +msgstr "Povolené e-maily" #. module: mail #: selection:ir.model.fields,track_visibility:0 @@ -696,14 +696,14 @@ msgstr "Vždy povolit" #: code:addons/mail/static/src/xml/thread.xml:418 #, python-format msgid "Always Allow |" -msgstr "" +msgstr "Vždy povolit |" #. module: mail #. openerp-web #: code:addons/mail/static/src/js/models/mail_failure.js:80 #, python-format msgid "An error occured when sending an email" -msgstr "" +msgstr "Při odesílání e-mailu došlo k chybě" #. module: mail #. openerp-web @@ -784,7 +784,7 @@ msgstr "Příloha" #: model:ir.model.fields,field_description:mail.field_mail_thread__message_attachment_count #: model:ir.model.fields,field_description:mail.field_res_partner__message_attachment_count msgid "Attachment Count" -msgstr "" +msgstr "Počet příloh" #. module: mail #. openerp-web @@ -867,12 +867,12 @@ msgstr "Automatické vymazání" #: model:ir.model.fields,field_description:mail.field_mail_activity__force_next #: model:ir.model.fields,field_description:mail.field_mail_activity_type__force_next msgid "Auto Schedule Next Activity" -msgstr "" +msgstr "Automatické naplánování další aktivity" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_channel_view_form msgid "Auto Subscribe Groups" -msgstr "" +msgstr "Automatický odběr skupin" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_channel__group_ids @@ -882,17 +882,17 @@ msgstr "Automatický odběr" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.view_mail_message_subtype_form msgid "Auto subscription" -msgstr "" +msgstr "Automatický odběr" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_activity__automated msgid "Automated activity" -msgstr "" +msgstr "Automatizovaná činnost" #. module: mail #: model:ir.model,name:mail.model_ir_autovacuum msgid "Automatic Vacuum" -msgstr "" +msgstr "Automatické vysávání" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_channel__moderation_notify @@ -912,36 +912,36 @@ msgstr "Avatar" #: code:addons/mail/static/src/xml/thread.xml:420 #, python-format msgid "Ban" -msgstr "" +msgstr "Ban (zákaz)" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_channel_view_form msgid "Ban List" -msgstr "" +msgstr "Seznam banů (zákazů)" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/thread.xml:420 #, python-format msgid "Ban this email address" -msgstr "" +msgstr "Zakázat tuto e-mailovou adresu" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_moderation_view_search msgid "Banned Emails" -msgstr "" +msgstr "Zakázané e-maily" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/followers.xml:90 #, python-format msgid "Be careful with channels following internal notifications" -msgstr "" +msgstr "Buďte opatrní s kanály sledující interní upozornění" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_notification_paynow msgid "Best regards," -msgstr "" +msgstr "S pozdravem," #. module: mail #: model:ir.actions.act_window,name:mail.mail_blacklist_action @@ -954,7 +954,7 @@ msgstr "Černá listina" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_blacklist_view_tree msgid "Blacklist Date" -msgstr "" +msgstr "Datum Blacklistu" #. module: mail #: model:ir.model.fields,field_description:mail.field_email_template_preview__body_html @@ -1009,7 +1009,7 @@ msgstr "Zrušit e-mail" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_resend_cancel_view_form msgid "Cancel notification in failure" -msgstr "" +msgstr "Zrušit oznámení v případě selhání" #. module: mail #. openerp-web @@ -1050,6 +1050,8 @@ msgstr "" #: model:ir.model.fields,help:mail.field_mail_activity_type__category msgid "Categories may trigger specific behavior like opening calendar view" msgstr "" +"Kategorie mohou vyvolat určité chování, například otevření zobrazení " +"kalendáře" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_activity__activity_category @@ -1073,7 +1075,7 @@ msgstr "Změnit" #: model:ir.model.fields,help:mail.field_mail_activity__activity_decoration #: model:ir.model.fields,help:mail.field_mail_activity_type__decoration_type msgid "Change the background color of the related activities of this type." -msgstr "" +msgstr "Změnit barvu pozadí souvisejících aktivit tohoto typu." #. module: mail #. openerp-web @@ -1283,7 +1285,7 @@ msgstr "Gratulujeme, vaše schránka je prázdná!" #. module: mail #: selection:mail.notification,failure_type:0 msgid "Connection failed (outgoing mail server problem)" -msgstr "" +msgstr "Připojení se nezdařilo (problém s odesílajícím poštovním serverem)" #. module: mail #: model:ir.model,name:mail.model_res_partner @@ -1318,7 +1320,7 @@ msgstr "" #: code:addons/mail/static/src/xml/systray.xml:9 #, python-format msgid "Conversations" -msgstr "" +msgstr "Konverzace" #. module: mail #: model:ir.model.fields,help:mail.field_res_partner__message_bounce @@ -1335,7 +1337,7 @@ msgstr "" #. module: mail #: selection:ir.actions.server,state:0 msgid "Create Next Activity" -msgstr "" +msgstr "Vytvořtit další aktivitu" #. module: mail #: code:addons/mail/models/mail_thread.py:400 @@ -1433,7 +1435,7 @@ msgstr "" #. module: mail #: model:ir.model.fields,help:mail.field_mail_channel__is_moderator msgid "Current user is a moderator of the channel" -msgstr "" +msgstr "Současný uživatel je moderátorem kanálu" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_compose_message__date @@ -1482,7 +1484,7 @@ msgstr "Výchozí" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_activity_type__default_next_type_id msgid "Default Next Activity" -msgstr "" +msgstr "Výchozí další aktivita" #. module: mail #: model:ir.model.fields,field_description:mail.field_email_template_preview__null_value @@ -1515,7 +1517,7 @@ msgstr "" #. module: mail #: model_terms:ir.actions.act_window,help:mail.mail_shortcode_action msgid "Define a new chat shortcode" -msgstr "" +msgstr "Definovat nový zkrácený kód chatu" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_activity_type__delay_from @@ -1543,7 +1545,7 @@ msgstr "Smazat emaily" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_compose_message__auto_delete_message msgid "Delete Message Copy" -msgstr "" +msgstr "Odstranit kopii zprávy" #. module: mail #: model:ir.model.fields,help:mail.field_mail_compose_message__auto_delete @@ -1603,7 +1605,7 @@ msgstr "" #. module: mail #: model:ir.actions.act_window,name:mail.mail_resend_cancel_action msgid "Discard mail delivery failures" -msgstr "" +msgstr "Zrušit selhání doručení pošty" #. module: mail #. openerp-web @@ -1840,7 +1842,7 @@ msgstr "" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_blacklist_view_tree msgid "Email Blacklist" -msgstr "" +msgstr "Email Blacklist" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.email_template_form @@ -1885,7 +1887,7 @@ msgstr "Emailové vlákno" #. module: mail #: sql_constraint:mail.blacklist:0 msgid "Email address already exists!" -msgstr "" +msgstr "Emailová adresa již existuje!" #. module: mail #: model:ir.model.fields,help:mail.field_res_users__alias_id @@ -1904,16 +1906,18 @@ msgid "" "Email address of the sender. This field is set when no matching partner is " "found and replaces the author_id field in the chatter." msgstr "" +"E-mailová adresa odesílatele. Toto pole je nastaveno, pokud nebyl nalezen " +"žádný odpovídající partner a nahrazuje pole autor_id v chatu." #. module: mail #: selection:mail.notification,failure_type:0 msgid "Email address rejected by destination" -msgstr "" +msgstr "E-mailová adresa byla zamítnuta podle cíle" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.email_compose_message_wizard_form msgid "Email address to redirect replies..." -msgstr "" +msgstr "E-mailová adresa pro přesměrování odpovědí ..." #. module: mail #: model_terms:ir.actions.act_window,help:mail.mail_blacklist_action @@ -1921,6 +1925,8 @@ msgid "" "Email addresses that are blacklisted means that the recipient won't receive " "any mass mailing anymore." msgstr "" +"E-mailové adresy, které jsou na černé listině, znamenají, že příjemce již " +"nebude přijímat žádné hromadné poštovní zásilky." #. module: mail #: model:ir.model,name:mail.model_mail_compose_message @@ -1955,7 +1961,7 @@ msgstr "" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_resend_cancel_view_form msgid "Envelope Example" -msgstr "" +msgstr "Příklad obálky" #. module: mail #. openerp-web @@ -1978,6 +1984,8 @@ msgid "" "Error without exception. Probably due do sending an email without computed " "recipients." msgstr "" +"Chyba bez výjimky. Pravděpodobně kvůli odeslání e-mailu bez vypočtených " +"příjemců." #. module: mail #: sql_constraint:mail.followers:0 @@ -3492,7 +3500,7 @@ msgstr "" #: code:addons/mail/static/src/xml/discuss.xml:181 #, python-format msgid "New Message" -msgstr "" +msgstr "Nová zpráva" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_tracking_value__new_value_char @@ -4645,7 +4653,7 @@ msgstr "" #. module: mail #: selection:mail.channel,public:0 msgid "Selected group of users" -msgstr "" +msgstr "Vybraná skupina uživatelů" #. module: mail #. openerp-web @@ -5627,7 +5635,7 @@ msgstr "" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_channel_view_form msgid "Who can follow the group's activities?" -msgstr "" +msgstr "Kdo může sledovat aktivity skupiny?" #. module: mail #. openerp-web diff --git a/addons/mail/i18n/it.po b/addons/mail/i18n/it.po index 65bc64c0722..28ac325cb7f 100644 --- a/addons/mail/i18n/it.po +++ b/addons/mail/i18n/it.po @@ -3,7 +3,6 @@ # * mail # # Translators: -# p_amoruso <p.amoruso@elvenstudio.it>, 2018 # Marius Marolla <mariusmarolla@entersys.it>, 2018 # Leonardo Donelli <learts92@gmail.com>, 2018 # Sebastiano Pistore <SebastianoPistore.info@protonmail.ch>, 2018 @@ -12,7 +11,6 @@ # Cesare Cugnasco <cesare.cugnasco@gmail.com>, 2018 # Christian <chris@effeci.info>, 2018 # Fabio Genovese <ing.fabiogenovese@gmail.com>, 2018 -# Sergio Zanchetta <primes2h@gmail.com>, 2018 # Lorenzo Battistini <lorenzo.battistini@agilebg.com>, 2018 # Giacomo Grasso <giacomo.grasso.82@gmail.com>, 2018 # Giovanni Perteghella <giovanni@perteghella.org>, 2018 @@ -27,6 +25,7 @@ # Léonie Bouchat <lbo@odoo.com>, 2018 # Simone Bernini <simone@aperturelabs.it>, 2018 # efraimbiffi <eab@odoo.com>, 2018 +# Sergio Zanchetta <primes2h@gmail.com>, 2018 # msgid "" msgstr "" @@ -34,7 +33,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-08 06:49+0000\n" "PO-Revision-Date: 2018-08-24 09:20+0000\n" -"Last-Translator: efraimbiffi <eab@odoo.com>, 2018\n" +"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>, 2018\n" "Language-Team: Italian (https://www.transifex.com/odoo/teams/41243/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -468,7 +467,7 @@ msgstr "Azione Da Fare" #. module: mail #: model:ir.model,name:mail.model_ir_actions_act_window_view msgid "Action Window View" -msgstr "" +msgstr "Vista finestra azione" #. module: mail #: model:ir.model.fields,help:mail.field_mail_message_subtype__default @@ -567,7 +566,7 @@ msgstr "Aggiungi" #: model:ir.model.fields,field_description:mail.field_ir_actions_server__channel_ids #, python-format msgid "Add Channels" -msgstr "Aggiungi Canali" +msgstr "Canali da aggiungere" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_blacklist_view_form @@ -1414,7 +1413,7 @@ msgstr "Crea %s" #. module: mail #: selection:ir.actions.server,state:0 msgid "Create Next Activity" -msgstr "Crea un'attività" +msgstr "Creare attività successiva" #. module: mail #: code:addons/mail/models/mail_thread.py:400 @@ -1946,17 +1945,17 @@ msgstr "Email Status" #. module: mail #: model:ir.model.fields,field_description:mail.field_ir_actions_server__template_id msgid "Email Template" -msgstr "Template Email" +msgstr "Modello email" #. module: mail #: model:ir.model,name:mail.model_email_template_preview msgid "Email Template Preview" -msgstr "Anteprima Template email" +msgstr "Anteprima modello email" #. module: mail #: model:ir.model,name:mail.model_mail_template msgid "Email Templates" -msgstr "Modelli di Email" +msgstr "Modelli email" #. module: mail #: model:ir.model,name:mail.model_mail_thread @@ -2384,12 +2383,12 @@ msgstr "" #. module: mail #: selection:res.users,notification_type:0 msgid "Handle by Emails" -msgstr "Gestisci per Email" +msgstr "Gestire con email" #. module: mail #: selection:res.users,notification_type:0 msgid "Handle in Odoo" -msgstr "Gestisci in Odoo" +msgstr "Gestire in Odoo" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_resend_message__has_cancel @@ -3125,7 +3124,7 @@ msgstr "" #: model:ir.cron,cron_name:mail.ir_cron_mail_scheduler_action #: model:ir.cron,name:mail.ir_cron_mail_scheduler_action msgid "Mail: Email Queue Manager" -msgstr "Mail: gestione mail in coda" +msgstr "Email: gestore coda email" #. module: mail #: model:ir.actions.server,name:mail.ir_cron_mail_notify_channel_moderators_ir_actions_server @@ -3814,7 +3813,7 @@ msgstr "Notifica" #. module: mail #: model:ir.model.fields,field_description:mail.field_res_users__notification_type msgid "Notification Management" -msgstr "Gestione Notifiche" +msgstr "Gestione notifiche" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_channel__moderation_notify_msg @@ -4821,7 +4820,7 @@ msgstr "Invia di nuovo" #: selection:ir.actions.server,state:0 #: model:ir.model.fields,field_description:mail.field_mail_wizard_invite__send_mail msgid "Send Email" -msgstr "Invia Email" +msgstr "Inviare email" #. module: mail #: code:addons/mail/models/mail_template.py:265 diff --git a/addons/mail/i18n/ja.po b/addons/mail/i18n/ja.po index aa8196f0512..1ec078ff85d 100644 --- a/addons/mail/i18n/ja.po +++ b/addons/mail/i18n/ja.po @@ -4206,7 +4206,7 @@ msgstr "プレビュー:" #: code:addons/mail/static/src/xml/thread.xml:92 #, python-format msgid "Previous" -msgstr "" +msgstr "前" #. module: mail #: model:ir.model.fields,field_description:mail.field_mail_activity__previous_activity_type_id diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index 80b1399e139..c6b2c731738 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -5441,6 +5441,12 @@ msgid "You cannot delete those groups, as the Whole Company group is required by msgstr "" #. module: mail +#: code:addons/mail/models/mail_thread.py:2358 +#, python-format +msgid "You have been assigned to %s" +msgstr "" + +#. module: mail #: model_terms:ir.ui.view,arch_db:mail.message_user_assigned msgid "You have been assigned to the" msgstr "" diff --git a/addons/mail/i18n/nb.po b/addons/mail/i18n/nb.po index cd6136b6643..8c037adcd72 100644 --- a/addons/mail/i18n/nb.po +++ b/addons/mail/i18n/nb.po @@ -5,6 +5,7 @@ # Translators: # Martin Trigaux, 2018 # Jorunn D. Newth, 2018 +# Marius Stedjan <marius@stedjan.com>, 2018 # msgid "" msgstr "" @@ -12,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-08 06:49+0000\n" "PO-Revision-Date: 2018-08-24 09:20+0000\n" -"Last-Translator: Jorunn D. Newth, 2018\n" +"Last-Translator: Marius Stedjan <marius@stedjan.com>, 2018\n" "Language-Team: Norwegian Bokmål (https://www.transifex.com/odoo/teams/41243/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1258,7 +1259,7 @@ msgstr "Skrivemodus" #. module: mail #: model:ir.model,name:mail.model_res_config_settings msgid "Config Settings" -msgstr "" +msgstr "Konfigurasjonsinnstillinger" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.res_config_settings_view_form @@ -2817,7 +2818,7 @@ msgstr "Forsinkede aktiviteter" #: model:ir.model.fields,field_description:mail.field_mail_mail__layout #: model:ir.model.fields,field_description:mail.field_mail_message__layout msgid "Layout" -msgstr "" +msgstr "Layout" #. module: mail #: model_terms:ir.ui.view,arch_db:mail.mail_channel_view_kanban @@ -4729,7 +4730,8 @@ msgstr "Sender meldinger som epost" #. module: mail #. openerp-web -#: code:addons/mail/static/src/xml/thread.xml:397 +#: code:addons/mail/static/src/xml/thread.xml:390 +#: model_terms:ir.ui.view,arch_db:mail.message_notification_email #: model_terms:ir.ui.view,arch_db:mail.view_mail_search #: selection:mail.mail,state:0 selection:mail.notification,email_status:0 #, python-format @@ -5798,14 +5800,14 @@ msgstr "Malen din må definere email_from" #: code:addons/mail/static/src/xml/thread.xml:68 #, python-format msgid "Zoom In" -msgstr "" +msgstr "Zoom inn" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/thread.xml:70 #, python-format msgid "Zoom Out" -msgstr "" +msgstr "Zoom ut" #. module: mail #: selection:mail.activity.type,delay_from:0 @@ -5836,6 +5838,7 @@ msgstr "styremøter" #. module: mail #. openerp-web #: code:addons/mail/static/src/xml/activity.xml:43 +#: model_terms:ir.ui.view,arch_db:mail.message_notification_email #: model_terms:ir.ui.view,arch_db:mail.view_mail_form #, python-format msgid "by" diff --git a/addons/mail/i18n/nl.po b/addons/mail/i18n/nl.po index b336900b6c2..07c2f1ebe8c 100644 --- a/addons/mail/i18n/nl.po +++ b/addons/mail/i18n/nl.po @@ -4180,7 +4180,7 @@ msgstr "Relatie met aanvullende informatie voor e-mail opnieuw verzenden" #: model:ir.model.fields,field_description:mail.field_mail_mail__needaction_partner_ids #: model:ir.model.fields,field_description:mail.field_mail_message__needaction_partner_ids msgid "Partners with Need Action" -msgstr "Relaties met Nodige Actie" +msgstr "Relaties met benodigde actie" #. module: mail #: selection:mail.compose.message,moderation_status:0 diff --git a/addons/mail/i18n/pt_BR.po b/addons/mail/i18n/pt_BR.po index c3cf930f640..201605ddfcd 100644 --- a/addons/mail/i18n/pt_BR.po +++ b/addons/mail/i18n/pt_BR.po @@ -22,6 +22,7 @@ # Yannick Belot <yannickbh@gmail.com>, 2018 # Marcel Savegnago <marcel.savegnago@gmail.com>, 2018 # Marcelo Costa <marcelo@comdesk.com.br>, 2018 +# Rafael H L Moretti <rafael.moretti@gmail.com>, 2018 # msgid "" msgstr "" @@ -29,7 +30,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-08 06:49+0000\n" "PO-Revision-Date: 2018-08-24 09:20+0000\n" -"Last-Translator: Marcelo Costa <marcelo@comdesk.com.br>, 2018\n" +"Last-Translator: Rafael H L Moretti <rafael.moretti@gmail.com>, 2018\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/odoo/teams/41243/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -574,7 +575,7 @@ msgstr "" #: code:addons/mail/static/src/xml/discuss.xml:71 #, python-format msgid "Add a private channel" -msgstr "" +msgstr "Adicionar um canal privado" #. module: mail #: model_terms:ir.actions.act_window,help:mail.mail_blacklist_action @@ -1950,6 +1951,8 @@ msgid "" "Email addresses that are blacklisted means that the recipient won't receive " "any mass mailing anymore." msgstr "" +"Endereços de e-mail na lista negra significa que o destinatário não irá mais" +" receber nenhuma correspondência em massa." #. module: mail #: model:ir.model,name:mail.model_mail_compose_message @@ -5573,7 +5576,7 @@ msgstr "" #: code:addons/mail/static/src/xml/thread_window.xml:11 #, python-format msgid "User name" -msgstr "" +msgstr "Nome de usuário" #. module: mail #: model:ir.model,name:mail.model_res_users diff --git a/addons/mail/models/mail_activity.py b/addons/mail/models/mail_activity.py index b925f59b1be..893b6ea78af 100644 --- a/addons/mail/models/mail_activity.py +++ b/addons/mail/models/mail_activity.py @@ -332,7 +332,7 @@ class MailActivity(models.Model): def action_notify(self): body_template = self.env.ref('mail.message_activity_assigned') for activity in self: - model_description = self.env[activity.res_model]._description.lower() + model_description = self.env['ir.model']._get(activity.res_model).display_name body = body_template.render( dict(activity=activity, model_description=model_description), engine='ir.qweb', diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index 20163ea15f3..a27a8464c9c 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -2340,18 +2340,20 @@ class MailThread(models.AbstractModel): view = self.env['ir.ui.view'].browse(self.env['ir.model.data'].xmlid_to_res_id(template)) for record in self: + model_description = self.env['ir.model']._get(record._name).display_name values = { 'object': record, + 'model_description': model_description, } assignation_msg = view.render(values, engine='ir.qweb', minimal_qcontext=True) assignation_msg = self.env['mail.thread']._replace_local_links(assignation_msg) record.message_notify( - subject='You have been assigned to %s' % record.display_name, + subject=_('You have been assigned to %s') % record.display_name, body=assignation_msg, partner_ids=[(4, pid) for pid in partner_ids], record_name=record.display_name, notif_layout='mail.mail_notification_light', - model_description=record._description.lower() + model_description=model_description, ) @api.multi diff --git a/addons/mail/models/res_partner.py b/addons/mail/models/res_partner.py index 32a2f4014bd..7ce819f799d 100644 --- a/addons/mail/models/res_partner.py +++ b/addons/mail/models/res_partner.py @@ -52,8 +52,16 @@ class Partner(models.Model): else: website_url = False + # Retrieve the language in which the template was rendered, in order to render the custom + # layout in the same language. + lang = self.env.context.get('lang') + if {'default_template_id', 'default_model', 'default_res_id'} <= self.env.context.keys(): + template = self.env['mail.template'].browse(self.env.context['default_template_id']) + if template and template.lang: + lang = template._render_template(template.lang, self.env.context['default_model'], self.env.context['default_res_id']) + if not model_description and message.model: - model_description = self.env['ir.model']._get(message.model).display_name + model_description = self.env['ir.model'].with_context(lang=lang)._get(message.model).display_name tracking = [] for tracking_value in self.env['mail.tracking.value'].sudo().search([('mail_message_id', '=', message.id)]): @@ -74,6 +82,7 @@ class Partner(models.Model): 'tracking_values': tracking, 'is_discussion': is_discussion, 'subtype': message.subtype_id, + 'lang': lang, } @api.model @@ -95,15 +104,14 @@ class Partner(models.Model): if not rdata: return True + base_template_ctx = self._notify_prepare_template_context(message, record, model_description=model_description) template_xmlid = message.layout if message.layout else 'mail.message_notification_email' try: - base_template = self.env.ref(template_xmlid, raise_if_not_found=True) + base_template = self.env.ref(template_xmlid, raise_if_not_found=True).with_context(lang=base_template_ctx['lang']) except ValueError: _logger.warning('QWeb template %s not found when sending notification emails. Sending without layouting.' % (template_xmlid)) base_template = False - base_template_ctx = self._notify_prepare_template_context(message, record, model_description=model_description) - # prepare notification mail values base_mail_values = { 'mail_message_id': message.id, diff --git a/addons/mail/static/src/js/composers/chatter_composer.js b/addons/mail/static/src/js/composers/chatter_composer.js index cda91eab205..777467e6eb8 100644 --- a/addons/mail/static/src/js/composers/chatter_composer.js +++ b/addons/mail/static/src/js/composers/chatter_composer.js @@ -3,6 +3,7 @@ odoo.define('mail.composer.Chatter', function (require) { var BasicComposer = require('mail.composer.Basic'); var mailUtils = require('mail.utils'); +var session = require('web.session'); var core = require('web.core'); var viewDialogs = require('web.view_dialogs'); @@ -195,7 +196,7 @@ var ChatterComposer = BasicComposer.extend({ message = _.extend(message, { subtype: 'mail.mt_comment', message_type: 'comment', - context: self.context, + context: _.defaults({}, self.context, session.user_context), }); // Subtype diff --git a/addons/mail/static/tests/chatter_tests.js b/addons/mail/static/tests/chatter_tests.js index ac9f715be5d..30225bd041a 100644 --- a/addons/mail/static/tests/chatter_tests.js +++ b/addons/mail/static/tests/chatter_tests.js @@ -1464,6 +1464,55 @@ QUnit.test('chatter: Attachment viewer', function (assert) { form.destroy(); }); +QUnit.test('chatter: keep context when sending a message', function(assert) { + assert.expect(1); + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + services: this.services, + arch: '<form string="Partners">' + + '<sheet>' + + '<field name="foo"/>' + + '</sheet>' + + '<div class="oe_chatter">' + + '<field name="message_ids" widget="mail_thread"/>' + + '</div>' + + '</form>', + res_id: 2, + session: { + user_context: {lang: 'en_US'}, + }, + mockRPC: function (route, args) { + if (args.method === 'message_get_suggested_recipients') { + return $.when({2: []}); + } + if (args.method === 'message_post') { + assert.deepEqual(args.kwargs.context, { + default_model: "partner", + default_res_id: 2, + lang: "en_US", + mail_post_autofollow: true, + }, + "the context is incorrect"); + return $.when(57923); + } + if (args.method === 'message_format') { + return $.when([{ + author_id: [42, "Me"], + model: 'partner', + }]); + } + return this._super(route, args); + }, + }); + + testUtils.dom.click(form.$('.o_chatter_button_new_message')); + testUtils.fields.editInput(form.$('.oe_chatter .o_composer_text_field:first()'), 'Pouet'); + testUtils.dom.click(form.$('.oe_chatter .o_composer_button_send')); + form.destroy(); +}); + QUnit.test('form activity widget: read RPCs', function (assert) { // Records of model 'mail.activity' may be updated in business flows (e.g. // the date of a 'Meeting' activity is updated when the associated meeting diff --git a/addons/mail/wizard/email_template_preview.py b/addons/mail/wizard/email_template_preview.py index 89808b0b6d1..eb02b082b4e 100644 --- a/addons/mail/wizard/email_template_preview.py +++ b/addons/mail/wizard/email_template_preview.py @@ -34,6 +34,7 @@ class TemplatePreview(models.TransientModel): res_id = fields.Selection(_get_records, 'Sample Document') partner_ids = fields.Many2many('res.partner', string='Recipients') + attachment_ids = fields.Many2many(string='Attachments', store=False) @api.onchange('res_id') @api.multi diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index c2ef637d299..46ec87060cf 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -198,6 +198,13 @@ class MailComposer(models.TransientModel): """ Process the wizard content and proceed with sending the related email(s), rendering any template patterns on the fly if needed. """ notif_layout = self._context.get('custom_layout') + # Several custom layouts make use of the model description at rendering, e.g. in the + # 'View <document>' button. Some models are used for different business concepts, such as + # 'purchase.order' which is used for a RFQ and and PO. To avoid confusion, we must use a + # different wording depending on the state of the object. + # Therefore, we can set the description in the context from the beginning to avoid falling + # back on the regular display_name retrieved in '_notify_prepare_template_context'. + model_description = self._context.get('model_description') for wizard in self: # Duplicate attachments linked to the email.template. # Indeed, basic mail.compose.message wizard duplicates attachments in mass @@ -252,6 +259,7 @@ class MailComposer(models.TransientModel): notif_layout=notif_layout, add_sign=not bool(wizard.template_id), mail_auto_delete=wizard.template_id.auto_delete if wizard.template_id else False, + model_description=model_description, **mail_values) if ActiveModel._name == 'mail.thread' and wizard.model: post_params['model'] = wizard.model |
