Browse Source

[8.0][ADD] mail_opt_out_default addon

pull/76/head
astirpe 9 years ago
parent
commit
21b27fe6dd
  1. 76
      mail_opt_out_default/README.rst
  2. 5
      mail_opt_out_default/__init__.py
  3. 17
      mail_opt_out_default/__openerp__.py
  4. 5
      mail_opt_out_default/models/__init__.py
  5. 13
      mail_opt_out_default/models/res_partner.py

76
mail_opt_out_default/README.rst

@ -0,0 +1,76 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
====================================
Restrict automatic emails to partner
====================================
This module sets the default value of the field "Opt-Out" to True while creating a Partner.
In standard Odoo, that field is defined in the module email_template and its default value is False.
As stated in the help comment for the field (Odoo code, module email_template):
`
help="If opt-out is checked, this contact has refused to receive emails for mass mailing and marketing campaign. "
`
By installing this module, partners by default will not receive marketing emails or other kind of automated emails.
Configuration
=============
To configure this module, you need to:
#. No configuration needed.
Usage
=====
To use this module, you need to:
#. Create a Partner
.. 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
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.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Andrea Stirpe <a.stirpe@onestein.nl>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

5
mail_opt_out_default/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# © 2016 ONESTEiN BV (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

17
mail_opt_out_default/__openerp__.py

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# © 2016 ONESTEiN BV (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Restrict automatic emails to partner',
'images': [],
'summary': 'Set field Opt-Out as true by default while creating a partner',
'license': 'AGPL-3',
'author': 'ONESTEiN BV, Odoo Community Association (OCA)',
'website': 'http://www.onestein.eu',
'category': 'Marketing',
'version': '8.0.1.0.0',
'depends': [
'email_template',
],
}

5
mail_opt_out_default/models/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# © 2016 ONESTEiN BV (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import res_partner

13
mail_opt_out_default/models/res_partner.py

@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# © 2016 ONESTEiN BV (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models
class ResPartner(models.Model):
_inherit = 'res.partner'
_defaults = {
'opt_out': True,
}
Loading…
Cancel
Save