[MIG][9.0] mail_attach_existing_attachment: Module migrated (#68)
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
This commit is contained in:
parent
941809d36f
commit
8056012b1b
@ -31,7 +31,7 @@ To configure this module, you need to:
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/205/8.0
|
||||
:target: https://runbot.odoo-community.org/runbot/205/9.0
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
@ -41,10 +41,10 @@ Known issues / Roadmap
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
|
||||
`here <https://github.com/OCA/social/issues/new?body=module:%20mail_attach_existing_attachment%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/OCA/social/issues>`_. In case of trouble, please
|
||||
check there if your issue has already been reported. If you spotted it first,
|
||||
help us smashing it by providing a detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
@ -53,6 +53,7 @@ Contributors
|
||||
------------
|
||||
|
||||
* Adrien Peiffer <adrien.peiffer@acsone.eu>
|
||||
* Sergio Teruel <sergio.teruel@tecnativa.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
@ -26,10 +26,12 @@
|
||||
'name': "Mail Attach Existing Attachment",
|
||||
'summary': """
|
||||
Adding attachment on the object by sending this one""",
|
||||
'author': "ACSONE SA/NV,Odoo Community Association (OCA)",
|
||||
'author': "ACSONE SA/NV,"
|
||||
"Tecnativa,"
|
||||
"Odoo Community Association (OCA)",
|
||||
'website': "http://acsone.eu",
|
||||
'category': 'Social Network',
|
||||
'version': '8.0.1.0.0',
|
||||
'version': '9.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'depends': [
|
||||
'mail',
|
||||
@ -38,4 +40,5 @@
|
||||
'data': [
|
||||
'wizard/mail_compose_message_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
33
mail_attach_existing_attachment/i18n/ca.po
Normal file
33
mail_attach_existing_attachment/i18n/ca.po
Normal file
@ -0,0 +1,33 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-12 23:57+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: Catalan (http://www.transifex.com/oca/OCA-social-9-0/language/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: ca\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "Assistent per composició de correus electrònics"
|
33
mail_attach_existing_attachment/i18n/de.po
Normal file
33
mail_attach_existing_attachment/i18n/de.po
Normal file
@ -0,0 +1,33 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-12 23:57+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: German (http://www.transifex.com/oca/OCA-social-9-0/language/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: de\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "Assistent zum Email verfassen"
|
33
mail_attach_existing_attachment/i18n/es.po
Normal file
33
mail_attach_existing_attachment/i18n/es.po
Normal file
@ -0,0 +1,33 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-12 23:57+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-social-9-0/language/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "Asistente composición Correo Electrónico"
|
33
mail_attach_existing_attachment/i18n/es_CO.po
Normal file
33
mail_attach_existing_attachment/i18n/es_CO.po
Normal file
@ -0,0 +1,33 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-12 23:57+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: Spanish (Colombia) (http://www.transifex.com/oca/OCA-social-9-0/language/es_CO/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: es_CO\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "Asistente de redacción de E-mail"
|
33
mail_attach_existing_attachment/i18n/fr.po
Normal file
33
mail_attach_existing_attachment/i18n/fr.po
Normal file
@ -0,0 +1,33 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-12 23:57+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: French (http://www.transifex.com/oca/OCA-social-9-0/language/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: fr\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "Assistant de composition de courriel"
|
34
mail_attach_existing_attachment/i18n/hr.po
Normal file
34
mail_attach_existing_attachment/i18n/hr.po
Normal file
@ -0,0 +1,34 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
# Bole <bole@dajmi5.com>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-14 11:29+0000\n"
|
||||
"Last-Translator: Bole <bole@dajmi5.com>\n"
|
||||
"Language-Team: Croatian (http://www.transifex.com/oca/OCA-social-9-0/language/hr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: hr\n"
|
||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr "Privitci"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr "Može pridružiti privitak"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr "Čarobnjak za sastavljanje maila"
|
@ -6,12 +6,12 @@
|
||||
# Armando Vulcano Junior <vulcano@uol.com.br>, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (8.0)\n"
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-30 16:56+0000\n"
|
||||
"PO-Revision-Date: 2015-09-18 19:58+0000\n"
|
||||
"Last-Translator: Armando Vulcano Junior <vulcano@uol.com.br>\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-social-8-0/language/pt_BR/)\n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-13 03:11+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-social-9-0/language/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@ -19,12 +19,12 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: field:mail.compose.message,object_attachment_ids:0
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr "Anexos"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: field:mail.compose.message,can_attach_attachment:0
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr "Pode Anexar Anexo"
|
||||
|
||||
|
@ -6,12 +6,12 @@
|
||||
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (8.0)\n"
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-04 14:42+0000\n"
|
||||
"PO-Revision-Date: 2015-09-07 14:25+0000\n"
|
||||
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
|
||||
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-social-8-0/language/sl/)\n"
|
||||
"POT-Creation-Date: 2016-06-13 02:44+0000\n"
|
||||
"PO-Revision-Date: 2016-06-13 03:11+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
|
||||
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-social-9-0/language/sl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
@ -19,12 +19,12 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: field:mail.compose.message,object_attachment_ids:0
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr "Priponke"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: field:mail.compose.message,can_attach_attachment:0
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr "Lahko pripenja priponke"
|
||||
|
||||
|
34
mail_attach_existing_attachment/i18n/zh_CN.po
Normal file
34
mail_attach_existing_attachment/i18n/zh_CN.po
Normal file
@ -0,0 +1,34 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mail_attach_existing_attachment
|
||||
#
|
||||
# Translators:
|
||||
# Jeffery Chenn <jeffery9@gmail.com>, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: social (9.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-09-02 00:46+0000\n"
|
||||
"PO-Revision-Date: 2016-09-04 05:54+0000\n"
|
||||
"Last-Translator: Jeffery Chenn <jeffery9@gmail.com>\n"
|
||||
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-social-9-0/language/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: zh_CN\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_object_attachment_ids
|
||||
msgid "Attachments"
|
||||
msgstr "附件"
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model.fields,field_description:mail_attach_existing_attachment.field_mail_compose_message_can_attach_attachment
|
||||
msgid "Can Attach Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mail_attach_existing_attachment
|
||||
#: model:ir.model,name:mail_attach_existing_attachment.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr ""
|
BIN
mail_attach_existing_attachment/static/description/icon.png
Normal file
BIN
mail_attach_existing_attachment/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
@ -44,6 +44,6 @@ class TestAttachExistingAttachment(common.TransactionCase):
|
||||
'object_attachment_ids': [(6, 0, [attach1.id])]
|
||||
}
|
||||
mail = self.env['mail.compose.message'].create(vals)
|
||||
values = mail.get_mail_values(mail, [self.partner_01.id])
|
||||
values = mail.get_mail_values([self.partner_01.id])
|
||||
self.assertTrue(attach1.id in
|
||||
values[self.partner_01.id]['attachment_ids'])
|
||||
|
@ -35,7 +35,7 @@ class MailComposeMessage(models.TransientModel):
|
||||
if res.get('res_id') and res.get('model') and \
|
||||
res.get('composition_mode', '') != 'mass_mail' and\
|
||||
not res.get('can_attach_attachment'):
|
||||
res['can_attach_attachment'] = True
|
||||
res['can_attach_attachment'] = True # pragma: no cover
|
||||
return res
|
||||
|
||||
can_attach_attachment = fields.Boolean(string='Can Attach Attachment')
|
||||
@ -44,14 +44,10 @@ class MailComposeMessage(models.TransientModel):
|
||||
relation='mail_compose_message_ir_attachments_object_rel',
|
||||
column1='wizard_id', column2='attachment_id', string='Attachments')
|
||||
|
||||
@api.model
|
||||
def get_mail_values(self, wizard, res_ids):
|
||||
res = super(MailComposeMessage, self).get_mail_values(wizard, res_ids)
|
||||
if wizard.object_attachment_ids.ids and wizard.model and\
|
||||
len(res_ids) == 1:
|
||||
for res_id in res_ids:
|
||||
if not res[res_id].get('attachment_ids'):
|
||||
res[res_id]['attachment_ids'] = []
|
||||
res[res_id]['attachment_ids'].extend(
|
||||
wizard.object_attachment_ids.ids)
|
||||
@api.multi
|
||||
def get_mail_values(self, res_ids):
|
||||
res = super(MailComposeMessage, self).get_mail_values(res_ids)
|
||||
if self.object_attachment_ids.ids and self.model and len(res_ids) == 1:
|
||||
res[res_ids[0]].setdefault('attachment_ids', []).extend(
|
||||
self.object_attachment_ids.ids)
|
||||
return res
|
||||
|
Loading…
Reference in New Issue
Block a user