-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16.0 mig-account_payment_notification #660
Merged
OCA-git-bot
merged 7 commits into
OCA:16.0
from
moduon:16.0-mig-account_payment_notification
Aug 11, 2023
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e41f9e7
[ADD] account_payment_notification: tell people about sent payments
yajo e9c4fe6
[UPD] Update account_payment_notification.pot
ea14fce
[UPD] README.rst
OCA-git-bot b1e3ed0
[IMP] account_payment_notification: display envelope
yajo 387b041
account_payment_notification 15.0.1.0.1
OCA-git-bot 0c9f110
[IMP] account_payment_notification: black, isort, prettier
24bc2b5
[16.0][MIG] account_payment_notification
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
============================ | ||
Account payment notification | ||
============================ | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |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/licence-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-OCA%2Faccount--payment-lightgray.png?logo=github | ||
:target: https://github.com/OCA/account-payment/tree/15.0/account_payment_notification | ||
:alt: OCA/account-payment | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/account-payment-15-0/account-payment-15-0-account_payment_notification | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/96/15.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module lets you notify partners about sent payment or debit orders. | ||
|
||
You can do that by e-mail and/or by SMS. It is automated by default. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure automatic notifications, you need to: | ||
|
||
#. Go to *Settings*. | ||
#. Go to *Invoicing*. | ||
#. Choose if you want to *Require payment notifications*. | ||
#. Select the desired *Payment notification method*. | ||
#. Select the desired *Payment notifications automatism*. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to *Invoicing* or *Accounting* app. | ||
#. Go to *Customers > Payments* or *Vendors > Payments*. | ||
#. Select one or more payments. | ||
#. Click on *Action*. | ||
#. Select *Notify partners*. | ||
|
||
Odoo will use your preferred notification method, as defined in | ||
configuration (see that section), to notify all the chosen partners. | ||
|
||
Both email and SMS notifications are put in outgoing queues. They will be | ||
cleared automatically when their corresponding cron jobs are executed. | ||
|
||
If you do that same operation from a payment form view, you will have the option | ||
to choose between sending an email or an SMS. You will be able to edit the | ||
template before sending it. | ||
|
||
💡 Tip: You have new filters in the payments list. Use them to select those | ||
that have (or not) email or mobile phone. | ||
|
||
⚠️ `Sending SMS is a paid service | ||
<https://www.odoo.com/documentation/15.0/applications/marketing/sms_marketing/pricing/pricing_and_faq.html>`__. | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* Multiple SMS notifications to the same partner cannot be sent in batch. | ||
Always group payments before notifying. Odoo considers these SMS as duplicated | ||
and avoids sending more than one per batch. This behavior is hardcoded. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/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 <https://github.com/OCA/account-payment/issues/new?body=module:%20account_payment_notification%0Aversion:%2015.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 | ||
~~~~~~~ | ||
|
||
* Moduon | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Rafael Blasco (`Moduon <https://www.moduon.team/>`__) | ||
* Jairo Llopis (`Moduon <https://www.moduon.team/>`__) | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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. | ||
|
||
.. |maintainer-yajo| image:: https://github.com/yajo.png?size=40px | ||
:target: https://github.com/yajo | ||
:alt: yajo | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-yajo| | ||
|
||
This module is part of the `OCA/account-payment <https://github.com/OCA/account-payment/tree/15.0/account_payment_notification>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import models | ||
from . import wizards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2022 Moduon Team S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
{ | ||
"name": "Account payment notification", | ||
"summary": "Notifiy upcoming payments", | ||
"version": "16.0.1.0.1", | ||
"development_status": "Beta", | ||
"category": "Accounting", | ||
"website": "https://github.com/OCA/account-payment", | ||
"author": "Moduon, Odoo Community Association (OCA)", | ||
"maintainers": ["yajo"], | ||
"license": "LGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"account", | ||
"sms", | ||
], | ||
"data": [ | ||
"data/mail_template.xml", | ||
"data/sms_template.xml", | ||
"security/sms_template.xml", | ||
"views/account_payment_views.xml", | ||
"wizards/res_config_settings_views.xml", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2022 Moduon Team S.L. | ||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). --> | ||
<data noupdate="1"> | ||
|
||
<record id="mail_template_notification" model="mail.template"> | ||
<field name="name">Payment notification</field> | ||
<field name="auto_delete" eval="False" /> | ||
<field name="lang">{{ object.partner_id.lang }}</field> | ||
<field name="model_id" ref="account.model_account_payment" /> | ||
<field name="partner_to">{{ object.partner_id.id }}</field> | ||
<field | ||
name="subject" | ||
>{{ object.company_id.name }} Payment Notification (Ref {{ object.name or 'n/a' }})</field> | ||
<field name="body_html" type="html"> | ||
<p>Dear <t t-out="object.partner_id.name or ''">Azure Interior</t>,</p> | ||
<p t-if="object.payment_type == 'inbound'"> | ||
Your debit order was processed and sent to the bank. | ||
</p> | ||
<p t-else=""> | ||
Your payment order was processed and sent to the bank. | ||
</p> | ||
<p t-if="object.reconciled_invoices_type == 'invoice'"> | ||
It includes the following invoices: | ||
</p> | ||
<p t-else=""> | ||
It includes the following credit notes: | ||
</p> | ||
<ul> | ||
<t t-foreach="object.reconciled_invoice_ids" t-as="invoice"> | ||
<li t-out="invoice.name">INV/2022/00001</li> | ||
</t> | ||
<t t-foreach="object.reconciled_bill_ids" t-as="bill"> | ||
<li t-out="bill.ref or bill.name">INV/2022/00002</li> | ||
</t> | ||
</ul> | ||
<p>Total amount: <strong t-field="object.amount" /></p> | ||
<div> | ||
<p>Thanks for your cooperation!</p> | ||
<p>--<br /><t t-out="object.company_id.name" /></p> | ||
<p> | ||
<small | ||
>This is an automated notification. Replies will not be monitored nor answered. If you have questions, please contact us by the usual means.</small> | ||
</p> | ||
</div> | ||
</field> | ||
</record> | ||
|
||
</data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2022 Moduon Team S.L. | ||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). --> | ||
<data noupdate="1"> | ||
|
||
<record id="sms_template_notification" model="sms.template"> | ||
<field name="name">Payment notification</field> | ||
<field | ||
name="body" | ||
>Dear {{ object.partner_id.name }}, the {{ 'debit' if object.payment_type == 'inbound' else 'payment' }} order of your {{ 'invoice(s)' if object.reconciled_invoices_type == 'invoice' else 'credit note(s)' }} ({{ ", ".join(object.reconciled_bill_ids.mapped(lambda rec: rec.ref or rec.name) + object.reconciled_invoice_ids.mapped("name")) }}) for the total amount of {{ format_amount(object.amount, object.currency_id, object.partner_id.lang) }} was processed and sent to the bank. Thanks for your cooperation! -- {{ object.company_id.name }}</field> | ||
<field name="lang">{{ object.partner_id.lang }}</field> | ||
<field name="model_id" ref="account.model_account_payment" /> | ||
</record> | ||
|
||
</data> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anddago78 add mysel here please
:target: github.com/rafaelbn
:alt: rafaelbn
Thanks