[MIG] fetchmail_notify_error_to_sender: Migration to 11.0
parent
541ee218e2
commit
00d8b575a7
|
@ -35,7 +35,7 @@ Usage
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
:target: https://runbot.odoo-community.org/runbot/149/9.0
|
:target: https://runbot.odoo-community.org/runbot/149/11.0
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
@ -58,6 +58,7 @@ Contributors
|
||||||
|
|
||||||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
* Miquel Raïch <miquel.raich@eficent.com> (migration to v9 and v10)
|
* Miquel Raïch <miquel.raich@eficent.com> (migration to v9 and v10)
|
||||||
|
* Hai Dinh <haidd.uit@gmail.com> (migration to V11)
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
|
||||||
# Copyright 2017 Eficent <http://www.eficent.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
# Copyright 2017 Eficent <http://www.eficent.com>
|
# Copyright 2017 Eficent <http://www.eficent.com>
|
||||||
|
# Copyright 2018 Hai Dinh <haidd.uit@gmail.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Fetchmail Notify Error to Sender',
|
'name': 'Fetchmail Notify Error to Sender',
|
||||||
'summary': 'If fetching mails gives error, send an email to sender',
|
'summary': 'If fetching mails gives error, send an email to sender',
|
||||||
'version': '10.0.1.0.0',
|
'version': '11.0.1.0.0',
|
||||||
'category': 'Tools',
|
'category': 'Tools',
|
||||||
'author': "Agile Business Group,Eficent,Odoo Community Association (OCA)",
|
'author':
|
||||||
|
"Agile Business Group,Eficent,Odoo Community Association (OCA)",
|
||||||
'website': 'https://github.com/OCA/server-tools',
|
'website': 'https://github.com/OCA/server-tools',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'depends': [
|
'depends': [
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<odoo noupdate="1">
|
<odoo noupdate="1">
|
||||||
<!--Email template -->
|
<!--Email template -->
|
||||||
<record id="email_template_error_notice" model="mail.template">
|
<record id="email_template_error_notice" model="mail.template">
|
||||||
<field name="name">Fetchmail - error notice</field>
|
<field name="name">Fetchmail - error notice</field>
|
||||||
<field name="email_from">${ctx.get('sender_message').get('to')|safe}</field>
|
<field name="email_from">${ctx.get('sender_message').get('to')|safe}</field>
|
||||||
<field name="email_to">${ctx.get('sender_message').get('from')|safe}</field>
|
<field name="email_to">${ctx.get('sender_message').get('from')|safe}</field>
|
||||||
<field name="subject">Receiving error with: ${ctx.get('sender_message').get('subject')|safe}</field>
|
<field name="subject">Receiving error with: ${ctx.get('sender_message').get('subject')|safe}</field>
|
||||||
<field name="model_id" ref="fetchmail.model_fetchmail_server"/>
|
<field name="model_id" ref="fetchmail.model_fetchmail_server"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
<field name="user_signature" eval="True"/>
|
<field name="user_signature" eval="True"/>
|
||||||
<field name="lang">${ctx.get('lang')}</field>
|
<field name="lang">${ctx.get('lang')}</field>
|
||||||
<field name="body_html"><![CDATA[
|
<field name="body_html"><![CDATA[
|
||||||
<div>
|
<div>
|
||||||
<p>Hello ${ctx.get('sender_message').get('from')},</p>
|
<p>Hello ${ctx.get('sender_message').get('from')},</p>
|
||||||
<p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>
|
<p>we got a problem with your email: <i>${ctx.get('sender_message').get('subject')}</i></p>
|
||||||
<p>Maybe you used a wrong recipient address?</p>
|
<p>Maybe you used a wrong recipient address?</p>
|
||||||
<p><br/></p>
|
<p><br/></p>
|
||||||
<p>Technical details:</p>
|
<p>Technical details:</p>
|
||||||
<p><i>${ctx.get('route_exception').message}</i></p>
|
<p><i>${ctx.get('route_exception').message}</i></p>
|
||||||
</div>
|
</div>
|
||||||
]]></field>
|
]]></field>
|
||||||
</record>
|
</record>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2017 Eficent <http://www.eficent.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from . import fetchmail
|
from . import fetchmail
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
# Copyright 2017 Eficent <http://www.eficent.com>
|
# Copyright 2017 Eficent <http://www.eficent.com>
|
||||||
|
# Copyright 2018 Hai Dinh <haidd.uit@gmail.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import fields, models
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
class FetchmailServer(models.Model):
|
class FetchmailServer(models.Model):
|
||||||
|
|
||||||
_inherit = 'fetchmail.server'
|
_inherit = 'fetchmail.server'
|
||||||
|
|
||||||
error_notice_template_id = fields.Many2one(
|
error_notice_template_id = fields.Many2one(
|
||||||
'mail.template', string="Error notice template",
|
'mail.template', string="Error notice template",
|
||||||
help="Set here the template to use to send notice to sender when "
|
help="Set here the template to use to send notice to sender when "
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
# Copyright 2015-2017 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
# Copyright 2017 Eficent <http://www.eficent.com>
|
# Copyright 2017 Eficent <http://www.eficent.com>
|
||||||
|
# Copyright 2018 Hai Dinh <haidd.uit@gmail.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import api, models
|
from odoo import api, models
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<record model="ir.ui.view" id="view_email_server_form">
|
<record model="ir.ui.view" id="view_email_server_form">
|
||||||
<field name="name">fetchmail.server.form</field>
|
<field name="name">fetchmail.server.form</field>
|
||||||
<field name="model">fetchmail.server</field>
|
<field name="model">fetchmail.server</field>
|
||||||
<field name="inherit_id" ref="fetchmail.view_email_server_form"/>
|
<field name="inherit_id" ref="fetchmail.view_email_server_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="active" position="after">
|
<field name="active" position="after">
|
||||||
<field name="error_notice_template_id"/>
|
<field name="error_notice_template_id"/>
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</field>
|
||||||
|
</record>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue