Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions purchase_edit_reply_to/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

======================
Purchase Edit Reply To
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4abc356de031524ff0e11d121f7f11cd894d4576f1ceb0de1e65fb423a8c7668
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-solvosci%2Fslv--reports-lightgray.png?logo=github
:target: https://github.com/solvosci/slv-reports/tree/18.0/purchase_edit_reply_to
:alt: solvosci/slv-reports

|badge1| |badge2| |badge3|

Allow setting a fixed Reply-To address for Purchase Order email
notifications via the system parameter purchase.reply_to_email. If not
set, Odoo's default Reply-To is used.

**Table of contents**

.. contents::
:local:

Usage
=====

To configure the email address we want to assign as the purchase
reply_to, you need to go to: Settings → Technical → System Parameters
Then add a new parameter with:

- Key: purchase.reply_to_email
- Value: the email address you want to assign

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/solvosci/slv-reports/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/solvosci/slv-reports/issues/new?body=module:%20purchase_edit_reply_to%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Solvos

Contributors
------------

- Carlos García <carlos.garcia@solvos.es>

Maintainers
-----------

This module is part of the `solvosci/slv-reports <https://github.com/solvosci/slv-reports/tree/18.0/purchase_edit_reply_to>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions purchase_edit_reply_to/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions purchase_edit_reply_to/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# © 2021 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
{
"name": "Purchase Edit Reply To",
"summary": """
Allow setting a fixed Reply-To address for Purchase Order email notifications via the system parameter.
""",
"author": "Solvos",
"license": "LGPL-3",
"version": "18.0.1.0.0",
'category': "Tools",
"website": "https://github.com/solvosci/",
"depends": [
'purchase',
],
'installable': True,
}
1 change: 1 addition & 0 deletions purchase_edit_reply_to/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_order
21 changes: 21 additions & 0 deletions purchase_edit_reply_to/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# © 2021 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html

from odoo import models


class PurchaseOrder(models.Model):
_inherit = "purchase.order"

def _notify_get_reply_to(self, default=None):
res = super()._notify_get_reply_to(default=default)
forced = self.env['ir.config_parameter'].sudo().get_param('purchase.reply_to_email')
if not forced:
return res
for po in self:
res[po.id] = self._notify_get_reply_to_formatted_email(
forced,
po.display_name or '',
company=po.company_id
)
return res
1 change: 1 addition & 0 deletions purchase_edit_reply_to/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Carlos García \<carlos.garcia@solvos.es\>
1 change: 1 addition & 0 deletions purchase_edit_reply_to/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow setting a fixed Reply-To address for Purchase Order email notifications via the system parameter purchase.reply_to_email. If not set, Odoo's default Reply-To is used.
5 changes: 5 additions & 0 deletions purchase_edit_reply_to/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To configure the email address we want to assign as the purchase reply_to, you need to go to:
Settings → Technical → System Parameters
Then add a new parameter with:
- Key: purchase.reply_to_email
- Value: the email address you want to assign
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading