Skip to content

Commit

Permalink
Merge PR #1334 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Aug 24, 2024
2 parents 1ba7177 + fc97330 commit 7be3e22
Show file tree
Hide file tree
Showing 26 changed files with 2,861 additions and 0 deletions.
132 changes: 132 additions & 0 deletions account_payment_order_notification/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
==================================
Account Payment Order Notification
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e5ad04ecc8cfa4d7eef0547b8b8a62a83f7906228b463c1cf7f1029e8d555a42
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github
:target: https://github.com/OCA/bank-payment/tree/17.0/account_payment_order_notification
:alt: OCA/bank-payment
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/bank-payment-17-0/bank-payment-17-0-account_payment_order_notification
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds a button on debit / payment orders to send an email to
each related partner with the details of their transactions.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:

1. Go to *Invoicing > Configuration > Payment Modes* and create a
payment mode, if you wish.

2. Go to *Invoicing > Customers > Customers* and create a new record as
follows:

- Name: Test customer 1
- Email: [email protected]

3. Go to *Invoicing > Customers > Customers* and create a new record as
follows:

- Name: Test customer 2
- Email: (empty)

Usage
=====

1. Go to *Invoicing > Customers > Invoices* and create one or more
invoices linked to the payment mode.
2. Go to *Invoicing > Customers > Invoices* select the invoices created
and execute the action called "Post entries".
3. Go to *Invoicing > Customers > Invoices* select the invoices created
and execute the action called "Add to Payment/Debit Order" and
create a payment order.
4. Click on "Confirm Payments" button.
5. Click on "Generate Payment File" button.
6. Click on "File Successfully Uploaded" button.
7. Click on "Send mails" button.
8. Any involved partner with no email will appear with the column "To
send" not checked.
9. Click on "Confirm" button.
10. An email will have been sent to the selected partners.
11. A reminder note will have been created.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-payment/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/OCA/bank-payment/issues/new?body=module:%20account_payment_order_notification%0Aversion:%2017.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
-------

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__:

- Víctor Martínez
- Pedro M. Baeza

- `APSL-Nagarro <https://apsl.tech>`__:

- Antoni Marroig <[email protected]>

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-victoralmau| image:: https://github.com/victoralmau.png?size=40px
:target: https://github.com/victoralmau
:alt: victoralmau

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-victoralmau|

This module is part of the `OCA/bank-payment <https://github.com/OCA/bank-payment/tree/17.0/account_payment_order_notification>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions account_payment_order_notification/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
20 changes: 20 additions & 0 deletions account_payment_order_notification/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Account Payment Order Notification",
"version": "17.0.1.0.0",
"category": "Banking addons",
"website": "https://github.com/OCA/bank-payment",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["account_payment_order"],
"installable": True,
"data": [
"security/ir.model.access.csv",
"data/mail_template_data.xml",
"wizard/wizard_account_payment_order_notification_views.xml",
"views/account_payment_order_view.xml",
"views/account_payment_order_notification_view.xml",
],
"maintainers": ["victoralmau"],
}
83 changes: 83 additions & 0 deletions account_payment_order_notification/data/mail_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8" ?>
<data>
<record id="email_account_payment_order_notification" model="mail.template">
<field name="name">Payment Order Notification: Send by email</field>
<field
name="model_id"
ref="account_payment_order_notification.model_account_payment_order_notification"
/>
<field
name="email_from"
>{{ object.company_id.email_formatted or user.email_formatted }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field
name="subject"
>{{ object.company_id.name }} Payment Order (Ref {{ object.order_id.name or 'n/a' }})</field>
<field name="body_html" type="html">
<div
style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF;
"
>
<p>Hello <t
t-out="object.partner_id.name or ''"
>Brandon Freeman</t>,</p>
<t t-if="object.order_id.payment_type == 'inbound'">
<p
>A debit order including at least one of your invoices has been processed and
sent to the bank.</p>
</t>
<t t-else="">
<p
>A payment order including at least one of your invoices has been processed
and sent to the bank.</p>
</t>
<p>It includes the following transactions:</p>
<table class="table table-striped">
<thead>
<tr
style="height: 15px; background-color: #d8d8d8;font-size: 13px;font-weight:bold;"
align="center"
valign="middle"
>
<td>Number</td>
<td>Date</td>
<td>Amount</td>
</tr>
</thead>
<tbody>
<t t-foreach="object.payment_line_ids" t-as="payment_line">
<tr>
<td>
<t
t-if="payment_line.move_line_id.move_id.move_type in ('in_invoice', 'in_refund') and payment_line.move_line_id.move_id.ref"
>
<t
t-out="payment_line.move_line_id.move_id.ref or ''"
>PY000</t>
</t>
<t t-else="">
<t
t-out="payment_line.communication or ''"
>Email</t>
</t>
</td>
<td>
<t t-out="format_date(payment_line.date)" />
</td>
<td>
<t
t-out="format_amount(payment_line.amount_currency, payment_line.currency_id) or ''"
>$
1000</t>
</td>
</tr>
</t>
</tbody>
</table>
<p>Do not hesitate to contact us if you have any questions.</p>
</div>
</field>
<field name="lang">{{object.partner_id.lang}}</field>
<field name="auto_delete" eval="True" />
</record>
</data>
Loading

0 comments on commit 7be3e22

Please sign in to comment.