mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[ADD] account_payment_order_notification: New addon
TT38957 [UPD] Update account_payment_order_notification.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: bank-payment-13.0/bank-payment-13.0-account_payment_order_notification Translate-URL: https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_order_notification/ [FIX] account_payment_order_notification: Display the communication field in the email template. TT39982 [UPD] Update account_payment_order_notification.pot account_payment_order_notification 13.0.1.0.1
This commit is contained in:
114
account_payment_order_notification/README.rst
Normal file
114
account_payment_order_notification/README.rst
Normal file
@@ -0,0 +1,114 @@
|
||||
==================================
|
||||
Account Payment Order 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-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/13.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-13-0/bank-payment-13-0-account_payment_order_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/173/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|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:
|
||||
|
||||
#. Go to *Invoicing > Configuration > Payment Modes* and create a payment mode if you wish.
|
||||
|
||||
#. Go to *Invoicing > Customers > Customers* and creates a new record as follows:
|
||||
* Name: Test customer 1
|
||||
* Email: customer1@test.com
|
||||
|
||||
#. Go to *Invoicing > Customers > Customers* and creates a new record as follows:
|
||||
* Name: Test customer 2
|
||||
* Email: (empty)
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
#. Go to *Invoicing > Customers > Invoices* and creates one or more invoices linked to the payment mode.
|
||||
#. Go to *Invoicing > Customers > Invoices* select the invoices created and execute the action called "Post entries".
|
||||
#. Go to *Invoicing > Customers > Invoices* select the invoices created and execute the action called "Add to Payment/Debit Order" and creates a payment order.
|
||||
#. Click on "Confirm Payments" button.
|
||||
#. Click on "Generate Payment File" button.
|
||||
#. Click on "File Successfully Uploaded" button.
|
||||
#. Click on "Send mails" button.
|
||||
#. Any involved partner with no email will appear with the column "To send" not checked.
|
||||
#. Click on "Confirm" button.
|
||||
#. An email will have been sent to the selected partners.
|
||||
#. 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 smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_order_notification%0Aversion:%2013.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
|
||||
|
||||
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/13.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
account_payment_order_notification/__init__.py
Normal file
2
account_payment_order_notification/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import models
|
||||
from . import wizard
|
||||
20
account_payment_order_notification/__manifest__.py
Normal file
20
account_payment_order_notification/__manifest__.py
Normal file
@@ -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": "13.0.1.0.1",
|
||||
"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"],
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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">${user.email_formatted |safe}</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"
|
||||
><![CDATA[
|
||||
<div style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
|
||||
<p>Hello ${object.partner_id.name or ''},</p>
|
||||
% 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>
|
||||
% else:
|
||||
<p>A payment order including at least one of your invoices has been processed and sent to the bank.</p>
|
||||
% endif
|
||||
<p>It includes the following transactions:</p>
|
||||
<table>
|
||||
<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>
|
||||
% for payment_line in object.payment_line_ids:
|
||||
<tr>
|
||||
<td>${payment_line.communication}</td>
|
||||
<td>${payment_line.date}</td>
|
||||
<td>${format_amount(payment_line.amount_currency, payment_line.currency_id)}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
</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="user_signature" eval="False" />
|
||||
<field name="auto_delete" eval="True" />
|
||||
</record>
|
||||
</data>
|
||||
@@ -0,0 +1,330 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_payment_order_notification
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:mail.template,body_html:account_payment_order_notification.email_account_payment_order_notification
|
||||
msgid ""
|
||||
"\n"
|
||||
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
|
||||
" <p>Hello ${object.partner_id.name or ''},</p>\n"
|
||||
" % if object.order_id.payment_type == 'inbound':\n"
|
||||
" <p>A debit order including at least one of your invoices has been processed and sent to the bank.</p>\n"
|
||||
" % else:\n"
|
||||
" <p>A payment order including at least one of your invoices has been processed and sent to the bank.</p>\n"
|
||||
" % endif\n"
|
||||
" <p>It includes the following transactions:</p>\n"
|
||||
" <table>\n"
|
||||
" <thead>\n"
|
||||
" <tr style=\"height: 15px; background-color: #d8d8d8;font-size: 13px;font-weight:bold;\" align=\"center\" valign=\"middle\">\n"
|
||||
" <td>Number</td>\n"
|
||||
" <td>Date</td>\n"
|
||||
" <td>Amount</td>\n"
|
||||
" </tr>\n"
|
||||
" </thead>\n"
|
||||
" % for payment_line in object.payment_line_ids:\n"
|
||||
" <tr>\n"
|
||||
" <td>${payment_line.communication}</td>\n"
|
||||
" <td>${payment_line.date}</td>\n"
|
||||
" <td>${format_amount(payment_line.amount_currency, payment_line.currency_id)}</td>\n"
|
||||
" </tr>\n"
|
||||
" % endfor\n"
|
||||
" </table>\n"
|
||||
" <p>Do not hesitate to contact us if you have any questions.</p>\n"
|
||||
"</div>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:mail.template,subject:account_payment_order_notification.email_account_payment_order_notification
|
||||
msgid ""
|
||||
"${object.company_id.name} Payment Order (Ref ${object.order_id.name or "
|
||||
"'n/a'})"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_needaction
|
||||
msgid "Action Needed"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_attachment_count
|
||||
msgid "Attachment Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.wizard_account_payment_order_notification_form
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__company_id
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.wizard_account_payment_order_notification_form
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__create_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__create_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__create_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__create_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__display_name
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__display_name
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: code:addons/account_payment_order_notification/models/account_payment_order.py:0
|
||||
#, python-format
|
||||
msgid "Email has been sent to the following partners: %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_follower_ids
|
||||
msgid "Followers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_channel_ids
|
||||
msgid "Followers (Channels)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_partner_ids
|
||||
msgid "Followers (Partners)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_notification_search
|
||||
msgid "Group By"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_needaction
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_unread
|
||||
msgid "If checked, new messages require your attention."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_has_error
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_has_sms_error
|
||||
msgid "If checked, some messages have a delivery error."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_is_follower
|
||||
msgid "Is Follower"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification____last_update
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification____last_update
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__write_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__write_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__write_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__write_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__line_ids
|
||||
msgid "Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__mail_template_id
|
||||
msgid "Mail Template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_main_attachment_id
|
||||
msgid "Main Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_has_error
|
||||
msgid "Message Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_ids
|
||||
msgid "Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order__notification_count
|
||||
msgid "Notification count"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order__notification_ids
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_form
|
||||
msgid "Notifications"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_needaction_counter
|
||||
msgid "Number of Actions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_has_error_counter
|
||||
msgid "Number of errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_needaction_counter
|
||||
msgid "Number of messages which requires an action"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_has_error_counter
|
||||
msgid "Number of messages with delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_unread_counter
|
||||
msgid "Number of unread messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__order_id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__order_id
|
||||
msgid "Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__parent_id
|
||||
msgid "Parent"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__partner_id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__partner_id
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__payment_line_ids
|
||||
msgid "Payment Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_account_payment_order
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_notification_search
|
||||
msgid "Payment Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_account_payment_order_notification
|
||||
msgid "Payment Order Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.actions.act_window,name:account_payment_order_notification.account_payment_order_notification_action
|
||||
msgid "Payment Order Notifications"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_has_sms_error
|
||||
msgid "SMS Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_form
|
||||
msgid "Send mails"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.actions.act_window,name:account_payment_order_notification.wizard_account_payment_order_notification_action
|
||||
msgid "Send notifications"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__to_send
|
||||
msgid "To send"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_notification_form
|
||||
msgid "Transactions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_unread
|
||||
msgid "Unread Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_unread_counter
|
||||
msgid "Unread Messages Counter"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__website_message_ids
|
||||
msgid "Website Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__website_message_ids
|
||||
msgid "Website communication history"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_wizard_account_payment_order_notification
|
||||
msgid "Wizard Account Payment Order Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_wizard_account_payment_order_notification_line
|
||||
msgid "Wizard Account Payment Order Notification Line"
|
||||
msgstr ""
|
||||
373
account_payment_order_notification/i18n/es.po
Normal file
373
account_payment_order_notification/i18n/es.po
Normal file
@@ -0,0 +1,373 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_payment_order_notification
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-19 06:43+0000\n"
|
||||
"PO-Revision-Date: 2022-10-19 08:44+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:mail.template,body_html:account_payment_order_notification.email_account_payment_order_notification
|
||||
msgid ""
|
||||
"\n"
|
||||
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
|
||||
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
|
||||
" <p>Hello ${object.partner_id.name or ''},</p>\n"
|
||||
" % if object.order_id.payment_type == 'inbound':\n"
|
||||
" <p>A debit order including at least one of your invoices has been "
|
||||
"processed and sent to the bank.</p>\n"
|
||||
" % else:\n"
|
||||
" <p>A payment order including at least one of your invoices has been "
|
||||
"processed and sent to the bank.</p>\n"
|
||||
" % endif\n"
|
||||
" <p>It includes the following transactions:</p>\n"
|
||||
" <table>\n"
|
||||
" <thead>\n"
|
||||
" <tr style=\"height: 15px; background-color: #d8d8d8;font-size: "
|
||||
"13px;font-weight:bold;\" align=\"center\" valign=\"middle\">\n"
|
||||
" <td>Number</td>\n"
|
||||
" <td>Date</td>\n"
|
||||
" <td>Amount</td>\n"
|
||||
" </tr>\n"
|
||||
" </thead>\n"
|
||||
" % for payment_line in object.payment_line_ids:\n"
|
||||
" <tr>\n"
|
||||
" <td>${payment_line.communication}</td>\n"
|
||||
" <td>${payment_line.date}</td>\n"
|
||||
" <td>${format_amount(payment_line.amount_currency, "
|
||||
"payment_line.currency_id)}</td>\n"
|
||||
" </tr>\n"
|
||||
" % endfor\n"
|
||||
" </table>\n"
|
||||
" <p>Do not hesitate to contact us if you have any questions.</p>\n"
|
||||
"</div>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
|
||||
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
|
||||
" <p>Hola ${object.partner_id.name or ''},</p>\n"
|
||||
" % if object.order_id.payment_type == 'inbound':\n"
|
||||
" <p>Se ha procesado y enviado al banco una orden de débito que "
|
||||
"incluye al menos una de sus facturas.</p>\n"
|
||||
" % else:\n"
|
||||
" <p>Se ha procesado y enviado al banco una orden de pago que incluye "
|
||||
"al menos una de sus facturas.</p>\n"
|
||||
" % endif\n"
|
||||
" <p>Incluye las siguientes transacciones:</p>\n"
|
||||
" <table>\n"
|
||||
" <thead>\n"
|
||||
" <tr style=\"height: 15px; background-color: #d8d8d8;font-size: "
|
||||
"13px;font-weight:bold;\" align=\"center\" valign=\"middle\">\n"
|
||||
" <td>Número</td>\n"
|
||||
" <td>Fecha</td>\n"
|
||||
" <td>Importe</td>\n"
|
||||
" </tr>\n"
|
||||
" </thead>\n"
|
||||
" % for payment_line in object.payment_line_ids:\n"
|
||||
" <tr>\n"
|
||||
" <td>${payment_line.communication}</td>\n"
|
||||
" <td>${payment_line.date}</td>\n"
|
||||
" <td>${format_amount(payment_line.amount_currency, "
|
||||
"payment_line.currency_id)}</td>\n"
|
||||
" </tr>\n"
|
||||
" % endfor\n"
|
||||
" </table>\n"
|
||||
" <p>No dude en ponerse en contacto con nosotros si tiene alguna pregunta."
|
||||
"</p>\n"
|
||||
"</div>\n"
|
||||
" "
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:mail.template,subject:account_payment_order_notification.email_account_payment_order_notification
|
||||
msgid ""
|
||||
"${object.company_id.name} Payment Order (Ref ${object.order_id.name or 'n/"
|
||||
"a'})"
|
||||
msgstr "Orden de pago ${object.company_id.name} (Ref ${object.name or 'n/a'})"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_needaction
|
||||
msgid "Action Needed"
|
||||
msgstr "Acción necesariaa"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_attachment_count
|
||||
msgid "Attachment Count"
|
||||
msgstr "Total de adjuntos"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.wizard_account_payment_order_notification_form
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__company_id
|
||||
msgid "Company"
|
||||
msgstr "Compañía"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.wizard_account_payment_order_notification_form
|
||||
msgid "Confirm"
|
||||
msgstr "Confirmar"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__create_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__create_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Creado por"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__create_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__create_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Creado el"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__display_name
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__display_name
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nombre mostrado"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__email
|
||||
msgid "Email"
|
||||
msgstr "Email"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: code:addons/account_payment_order_notification/models/account_payment_order.py:0
|
||||
#, python-format
|
||||
msgid "Email has been sent to the following partners: %s"
|
||||
msgstr "Se ha enviado un correo electrónico a las siguientes empresas: %s"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_follower_ids
|
||||
msgid "Followers"
|
||||
msgstr "Seguidores"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_channel_ids
|
||||
msgid "Followers (Channels)"
|
||||
msgstr "Seguidores (Canales)"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_partner_ids
|
||||
msgid "Followers (Partners)"
|
||||
msgstr "Seguidores (Contactos)"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_notification_search
|
||||
msgid "Group By"
|
||||
msgstr "Agrupar por"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_needaction
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_unread
|
||||
msgid "If checked, new messages require your attention."
|
||||
msgstr "Si está marcado, hay nuevos mensajes que requieren de su atención."
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_has_error
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_has_sms_error
|
||||
msgid "If checked, some messages have a delivery error."
|
||||
msgstr "Si está marcado, hay mensajes que tienen error de entrega."
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_is_follower
|
||||
msgid "Is Follower"
|
||||
msgstr "Es seguidor"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification____last_update
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification____last_update
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última modificación el"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__write_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__write_uid
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Última modificación por"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__write_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__write_date
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Última actualización en"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__line_ids
|
||||
msgid "Lines"
|
||||
msgstr "Líneas"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__mail_template_id
|
||||
msgid "Mail Template"
|
||||
msgstr "Plantilla de email"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_main_attachment_id
|
||||
msgid "Main Attachment"
|
||||
msgstr "Adjunto principal"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_has_error
|
||||
msgid "Message Delivery error"
|
||||
msgstr "Mensaje de error de entrega"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_ids
|
||||
msgid "Messages"
|
||||
msgstr "Mensajes"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order__notification_count
|
||||
msgid "Notification count"
|
||||
msgstr "Enviar notificaciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order__notification_ids
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_form
|
||||
msgid "Notifications"
|
||||
msgstr "Enviar notificaciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_needaction_counter
|
||||
msgid "Number of Actions"
|
||||
msgstr "Número de acciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_has_error_counter
|
||||
msgid "Number of errors"
|
||||
msgstr "Número de errores"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_needaction_counter
|
||||
msgid "Number of messages which requires an action"
|
||||
msgstr "Nº de mensajes que requieren acción"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_has_error_counter
|
||||
msgid "Number of messages with delivery error"
|
||||
msgstr "Nº de mensajes con error de entrega"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__message_unread_counter
|
||||
msgid "Number of unread messages"
|
||||
msgstr "Número de mensajes no leídos"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__order_id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification__order_id
|
||||
msgid "Order"
|
||||
msgstr "Pedido"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__parent_id
|
||||
msgid "Parent"
|
||||
msgstr "Padre"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__partner_id
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__partner_id
|
||||
msgid "Partner"
|
||||
msgstr "Empresa"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__payment_line_ids
|
||||
msgid "Payment Line"
|
||||
msgstr "Orden de pago"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_account_payment_order
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_notification_search
|
||||
msgid "Payment Order"
|
||||
msgstr "Orden de pago"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_account_payment_order_notification
|
||||
msgid "Payment Order Notification"
|
||||
msgstr "Enviar notificaciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.actions.act_window,name:account_payment_order_notification.account_payment_order_notification_action
|
||||
msgid "Payment Order Notifications"
|
||||
msgstr "Enviar notificaciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_has_sms_error
|
||||
msgid "SMS Delivery error"
|
||||
msgstr "Error de entrega de SMS"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_form
|
||||
msgid "Send mails"
|
||||
msgstr "Enviar emails"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.actions.act_window,name:account_payment_order_notification.wizard_account_payment_order_notification_action
|
||||
msgid "Send notifications"
|
||||
msgstr "Enviar notificaciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_wizard_account_payment_order_notification_line__to_send
|
||||
msgid "To send"
|
||||
msgstr "A enviar"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model_terms:ir.ui.view,arch_db:account_payment_order_notification.account_payment_order_notification_form
|
||||
msgid "Transactions"
|
||||
msgstr "Transacciones"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_unread
|
||||
msgid "Unread Messages"
|
||||
msgstr "Mensajes no leídos"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__message_unread_counter
|
||||
msgid "Unread Messages Counter"
|
||||
msgstr "Contador de mensajes sin leer"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,field_description:account_payment_order_notification.field_account_payment_order_notification__website_message_ids
|
||||
msgid "Website Messages"
|
||||
msgstr "Mensajes del sitio web"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model.fields,help:account_payment_order_notification.field_account_payment_order_notification__website_message_ids
|
||||
msgid "Website communication history"
|
||||
msgstr "Historial de comunicación del sitio web"
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_wizard_account_payment_order_notification
|
||||
msgid "Wizard Account Payment Order Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order_notification
|
||||
#: model:ir.model,name:account_payment_order_notification.model_wizard_account_payment_order_notification_line
|
||||
msgid "Wizard Account Payment Order Notification Line"
|
||||
msgstr ""
|
||||
2
account_payment_order_notification/models/__init__.py
Normal file
2
account_payment_order_notification/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import account_payment_order_notification
|
||||
from . import account_payment_order
|
||||
@@ -0,0 +1,45 @@
|
||||
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, fields, models
|
||||
|
||||
|
||||
class AccountPaymentOrder(models.Model):
|
||||
_inherit = "account.payment.order"
|
||||
|
||||
notification_ids = fields.One2many(
|
||||
comodel_name="account.payment.order.notification",
|
||||
inverse_name="order_id",
|
||||
string="Notifications",
|
||||
)
|
||||
notification_count = fields.Integer(
|
||||
string="Notification count", compute="_compute_notification_count"
|
||||
)
|
||||
|
||||
def _compute_notification_count(self):
|
||||
notification_data = self.env["account.payment.order.notification"].read_group(
|
||||
[("order_id", "in", self.ids)], ["order_id"], ["order_id"]
|
||||
)
|
||||
mapped_data = {r["order_id"][0]: r["order_id_count"] for r in notification_data}
|
||||
for record in self:
|
||||
record.notification_count = mapped_data.get(record.id, 0)
|
||||
|
||||
def action_view_notifications(self):
|
||||
self.ensure_one()
|
||||
xml_id = "%s.%s" % (
|
||||
"account_payment_order_notification",
|
||||
"account_payment_order_notification_action",
|
||||
)
|
||||
action = self.env.ref(xml_id).read()[0]
|
||||
action["domain"] = [("order_id", "=", self.id)]
|
||||
return action
|
||||
|
||||
def _action_send_mail_notifications(self, template):
|
||||
for notification in self.notification_ids:
|
||||
notification.message_post_with_template(template.id)
|
||||
|
||||
def _action_create_note_from_notifications(self):
|
||||
body = _("Email has been sent to the following partners: %s") % (
|
||||
", ".join(self.mapped("notification_ids.partner_id.name"))
|
||||
)
|
||||
self.message_post(body=body)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountPaymentOrderNotification(models.Model):
|
||||
_name = "account.payment.order.notification"
|
||||
_description = "Payment Order Notification"
|
||||
_inherit = ["mail.thread"]
|
||||
|
||||
order_id = fields.Many2one(
|
||||
comodel_name="account.payment.order", required=True, readonly=True,
|
||||
)
|
||||
company_id = fields.Many2one(related="order_id.company_id")
|
||||
partner_id = fields.Many2one(
|
||||
comodel_name="res.partner", required=True, readonly=True,
|
||||
)
|
||||
payment_line_ids = fields.Many2many(
|
||||
comodel_name="account.payment.line", readonly=True
|
||||
)
|
||||
display_name = fields.Char(compute="_compute_display_name")
|
||||
|
||||
@api.depends("order_id", "partner_id")
|
||||
def _compute_display_name(self):
|
||||
for item in self:
|
||||
item.display_name = "[{}] {}".format(
|
||||
item.order_id.name, item.partner_id.display_name
|
||||
)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
res = super().create(vals_list)
|
||||
mt_comment = self.env.ref("mail.mt_comment")
|
||||
for rec in res:
|
||||
for follower in rec.order_id.message_follower_ids:
|
||||
rec.message_subscribe(
|
||||
partner_ids=[follower.partner_id.id],
|
||||
subtype_ids=follower.subtype_ids.ids,
|
||||
)
|
||||
rec.message_subscribe(
|
||||
partner_ids=[rec.partner_id.id], subtype_ids=mt_comment.ids,
|
||||
)
|
||||
return res
|
||||
11
account_payment_order_notification/readme/CONFIGURE.rst
Normal file
11
account_payment_order_notification/readme/CONFIGURE.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
To configure this module, you need to:
|
||||
|
||||
#. Go to *Invoicing > Configuration > Payment Modes* and create a payment mode if you wish.
|
||||
|
||||
#. Go to *Invoicing > Customers > Customers* and creates a new record as follows:
|
||||
* Name: Test customer 1
|
||||
* Email: customer1@test.com
|
||||
|
||||
#. Go to *Invoicing > Customers > Customers* and creates a new record as follows:
|
||||
* Name: Test customer 2
|
||||
* Email: (empty)
|
||||
@@ -0,0 +1,4 @@
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Víctor Martínez
|
||||
* Pedro M. Baeza
|
||||
@@ -0,0 +1 @@
|
||||
This module adds a button on debit / payment orders to send an email to each related partner with the details of their transactions.
|
||||
11
account_payment_order_notification/readme/USAGE.rst
Normal file
11
account_payment_order_notification/readme/USAGE.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
#. Go to *Invoicing > Customers > Invoices* and creates one or more invoices linked to the payment mode.
|
||||
#. Go to *Invoicing > Customers > Invoices* select the invoices created and execute the action called "Post entries".
|
||||
#. Go to *Invoicing > Customers > Invoices* select the invoices created and execute the action called "Add to Payment/Debit Order" and creates a payment order.
|
||||
#. Click on "Confirm Payments" button.
|
||||
#. Click on "Generate Payment File" button.
|
||||
#. Click on "File Successfully Uploaded" button.
|
||||
#. Click on "Send mails" button.
|
||||
#. Any involved partner with no email will appear with the column "To send" not checked.
|
||||
#. Click on "Confirm" button.
|
||||
#. An email will have been sent to the selected partners.
|
||||
#. A reminder note will have been created.
|
||||
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_account_payment_order_notification,account.payment.order.notification.manager,model_account_payment_order_notification,account_payment_order.group_account_payment,1,1,1,1
|
||||
|
BIN
account_payment_order_notification/static/description/icon.png
Normal file
BIN
account_payment_order_notification/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
468
account_payment_order_notification/static/description/index.html
Normal file
468
account_payment_order_notification/static/description/index.html
Normal file
@@ -0,0 +1,468 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Account Payment Order Notification</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="account-payment-order-notification">
|
||||
<h1 class="title">Account Payment Order Notification</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-payment/tree/13.0/account_payment_order_notification"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_order_notification"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/173/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds a button on debit / payment orders to send an email to each related partner with the details of their transactions.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
|
||||
<p>To configure this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Invoicing > Configuration > Payment Modes</em> and create a payment mode if you wish.</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt>Go to <em>Invoicing > Customers > Customers</em> and creates a new record as follows:</dt>
|
||||
<dd><ul class="first last">
|
||||
<li>Name: Test customer 1</li>
|
||||
<li>Email: <a class="reference external" href="mailto:customer1@test.com">customer1@test.com</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt>Go to <em>Invoicing > Customers > Customers</em> and creates a new record as follows:</dt>
|
||||
<dd><ul class="first last">
|
||||
<li>Name: Test customer 2</li>
|
||||
<li>Email: (empty)</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Invoicing > Customers > Invoices</em> and creates one or more invoices linked to the payment mode.</li>
|
||||
<li>Go to <em>Invoicing > Customers > Invoices</em> select the invoices created and execute the action called “Post entries”.</li>
|
||||
<li>Go to <em>Invoicing > Customers > Invoices</em> select the invoices created and execute the action called “Add to Payment/Debit Order” and creates a payment order.</li>
|
||||
<li>Click on “Confirm Payments” button.</li>
|
||||
<li>Click on “Generate Payment File” button.</li>
|
||||
<li>Click on “File Successfully Uploaded” button.</li>
|
||||
<li>Click on “Send mails” button.</li>
|
||||
<li>Any involved partner with no email will appear with the column “To send” not checked.</li>
|
||||
<li>Click on “Confirm” button.</li>
|
||||
<li>An email will have been sent to the selected partners.</li>
|
||||
<li>A reminder note will have been created.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-payment/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_order_notification%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Tecnativa</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Víctor Martínez</li>
|
||||
<li>Pedro M. Baeza</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>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.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/victoralmau"><img alt="victoralmau" src="https://github.com/victoralmau.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-payment/tree/13.0/account_payment_order_notification">OCA/bank-payment</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
3
account_payment_order_notification/tests/__init__.py
Normal file
3
account_payment_order_notification/tests/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import test_account_payment_order_notification
|
||||
@@ -0,0 +1,80 @@
|
||||
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo.tests import Form, common
|
||||
|
||||
|
||||
class TestAccountPaymentOrderNotification(common.SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.payment_mode = cls.env.ref("account_payment_mode.payment_mode_inbound_dd1")
|
||||
cls.partner_a = cls.env["res.partner"].create(
|
||||
{"name": "Test partner A", "email": "partner-a@test.com"}
|
||||
)
|
||||
cls.partner_b = cls.env["res.partner"].create(
|
||||
{"name": "Test partner B", "email": "partner-b@test.com"}
|
||||
)
|
||||
cls.partner_c = cls.env["res.partner"].create({"name": "Test partner C"})
|
||||
cls.product = cls.env["product.product"].create(
|
||||
{"name": "Test product", "list_price": 100}
|
||||
)
|
||||
cls.mt_comment = cls.env.ref("mail.mt_comment")
|
||||
|
||||
def _create_invoice(self, partner, invoice_type="out_invoice"):
|
||||
invoice_form = Form(
|
||||
self.env["account.move"].with_context(default_type=invoice_type)
|
||||
)
|
||||
invoice_form.partner_id = partner
|
||||
invoice_form.payment_mode_id = self.payment_mode
|
||||
with invoice_form.invoice_line_ids.new() as line_form:
|
||||
line_form.product_id = self.product
|
||||
return invoice_form.save()
|
||||
|
||||
def _test_notification_from_partner(self, po, partner):
|
||||
notification = po.notification_ids.filtered(lambda x: x.partner_id == partner)
|
||||
self.assertIn(partner, notification.mapped("message_follower_ids.partner_id"))
|
||||
self.assertIn(self.mt_comment, notification.mapped("message_ids.subtype_id"))
|
||||
|
||||
def test_wizard_account_payment_order_notification(self):
|
||||
self._create_invoice(self.partner_a)
|
||||
self._create_invoice(self.partner_a)
|
||||
self._create_invoice(self.partner_b)
|
||||
self._create_invoice(self.partner_c)
|
||||
partners = self.partner_a + self.partner_b + self.partner_c
|
||||
invoices = self.env["account.move"].search([("partner_id", "in", partners.ids)])
|
||||
invoices.action_post()
|
||||
wizard = (
|
||||
self.env["account.invoice.payment.line.multi"]
|
||||
.with_context(active_model=invoices._name, active_ids=invoices.ids)
|
||||
.create({})
|
||||
)
|
||||
res = wizard.run()
|
||||
payment_order = self.env[res["res_model"]].browse(res["res_id"])
|
||||
old_messages = payment_order.message_ids
|
||||
template_xml_id = "%s.%s" % (
|
||||
"account_payment_order_notification",
|
||||
"email_account_payment_order_notification",
|
||||
)
|
||||
wizard = (
|
||||
self.env["wizard.account.payment.order.notification"]
|
||||
.with_context(active_id=payment_order.id)
|
||||
.create({"mail_template_id": self.env.ref(template_xml_id).id})
|
||||
)
|
||||
self.assertEqual(len(wizard.line_ids), 3)
|
||||
line_a = wizard.line_ids.filtered(lambda x: x.partner_id == self.partner_a)
|
||||
self.assertEqual(line_a.email, self.partner_a.email)
|
||||
self.assertTrue(line_a.to_send)
|
||||
line_b = wizard.line_ids.filtered(lambda x: x.partner_id == self.partner_b)
|
||||
self.assertEqual(line_b.email, self.partner_b.email)
|
||||
self.assertTrue(line_b.to_send)
|
||||
line_c = wizard.line_ids.filtered(lambda x: x.partner_id == self.partner_c)
|
||||
self.assertFalse(line_c.email)
|
||||
self.assertFalse(line_c.to_send)
|
||||
wizard.action_process()
|
||||
self._test_notification_from_partner(payment_order, self.partner_a)
|
||||
self._test_notification_from_partner(payment_order, self.partner_b)
|
||||
self.assertNotIn(
|
||||
self.partner_c, payment_order.mapped("notification_ids.partner_id")
|
||||
)
|
||||
new_messages = payment_order.message_ids - old_messages
|
||||
self.assertIn(self.env.ref("mail.mt_note"), new_messages.mapped("subtype_id"))
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="account_payment_order_notification_form" model="ir.ui.view">
|
||||
<field name="name">account.payment.order.notification.form</field>
|
||||
<field name="model">account.payment.order.notification</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="0" edit="0">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="order_id" />
|
||||
</h1>
|
||||
</div>
|
||||
<group name="head" col="2">
|
||||
<group name="head-left">
|
||||
<field name="partner_id" />
|
||||
<field name="create_date" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="payment-lines" string="Transactions">
|
||||
<field name="payment_line_ids" />
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_payment_order_notification_tree" model="ir.ui.view">
|
||||
<field name="name">account.payment.order.notification.tree</field>
|
||||
<field name="model">account.payment.order.notification</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="0">
|
||||
<field name="order_id" />
|
||||
<field name="partner_id" />
|
||||
<field name="create_date" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_payment_order_notification_search" model="ir.ui.view">
|
||||
<field name="name">account.payment.order.notification.search</field>
|
||||
<field name="model">account.payment.order.notification</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="order_id" invisible="1" />
|
||||
<field name="partner_id" />
|
||||
<group string="Group By" name="groupby">
|
||||
<filter
|
||||
name="order_id"
|
||||
string="Payment Order"
|
||||
context="{'group_by': 'order_id'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record
|
||||
id="account_payment_order_notification_action"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Payment Order Notifications</field>
|
||||
<field name="res_model">account.payment.order.notification</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="account_payment_order_form" model="ir.ui.view">
|
||||
<field name="name">account.payment.order.form</field>
|
||||
<field name="model">account.payment.order</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_payment_order.account_payment_order_form"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box">
|
||||
<button
|
||||
name="action_view_notifications"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-envelope"
|
||||
attrs="{'invisible': [('notification_count', '=', 0)]}"
|
||||
>
|
||||
<field
|
||||
name="notification_count"
|
||||
widget="statinfo"
|
||||
string="Notifications"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<button name="action_cancel" position="before">
|
||||
<button
|
||||
type="action"
|
||||
name="%(wizard_account_payment_order_notification_action)d"
|
||||
string="Send mails"
|
||||
attrs="{'invisible': ['|', ('state', 'not in', ('uploaded','done')), ('notification_count', '>', 0)]}"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
3
account_payment_order_notification/wizard/__init__.py
Normal file
3
account_payment_order_notification/wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import wizard_account_payment_order_notification
|
||||
@@ -0,0 +1,87 @@
|
||||
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class WizardAccountPaymentOrderNotification(models.TransientModel):
|
||||
_name = "wizard.account.payment.order.notification"
|
||||
_description = "Wizard Account Payment Order Notification"
|
||||
|
||||
order_id = fields.Many2one(
|
||||
comodel_name="account.payment.order", required=True, readonly=True,
|
||||
)
|
||||
mail_template_id = fields.Many2one(
|
||||
comodel_name="mail.template",
|
||||
domain=[("model_id.model", "=", "account.payment.order.notification")],
|
||||
required=True,
|
||||
)
|
||||
line_ids = fields.One2many(
|
||||
comodel_name="wizard.account.payment.order.notification.line",
|
||||
inverse_name="parent_id",
|
||||
string="Lines",
|
||||
)
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields):
|
||||
vals = super().default_get(fields)
|
||||
po = self.env["account.payment.order"].browse(
|
||||
[self.env.context.get("active_id")]
|
||||
)
|
||||
if po:
|
||||
line_ids = []
|
||||
for partner in po.payment_line_ids.mapped("partner_id"):
|
||||
line_ids += [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"partner_id": partner.id,
|
||||
"email": partner.email,
|
||||
"to_send": True if partner.email else False,
|
||||
},
|
||||
)
|
||||
]
|
||||
template_xml_id = "%s.%s" % (
|
||||
"account_payment_order_notification",
|
||||
"email_account_payment_order_notification",
|
||||
)
|
||||
vals.update(
|
||||
{
|
||||
"order_id": po.id,
|
||||
"line_ids": line_ids,
|
||||
"mail_template_id": self.env.ref(template_xml_id).id,
|
||||
}
|
||||
)
|
||||
return vals
|
||||
|
||||
def action_process(self):
|
||||
notifications = []
|
||||
for item in self.line_ids.filtered("to_send"):
|
||||
payment_line_ids = self.order_id.payment_line_ids.filtered(
|
||||
lambda x: x.partner_id == item.partner_id
|
||||
)
|
||||
data = {
|
||||
"partner_id": item.partner_id.id,
|
||||
"payment_line_ids": payment_line_ids,
|
||||
}
|
||||
notifications.append((0, 0, data))
|
||||
self.order_id.notification_ids = notifications
|
||||
self.order_id._action_send_mail_notifications(self.mail_template_id)
|
||||
self.order_id._action_create_note_from_notifications()
|
||||
|
||||
|
||||
class WizardAccountPaymentOrderNotificationLine(models.TransientModel):
|
||||
_name = "wizard.account.payment.order.notification.line"
|
||||
_description = "Wizard Account Payment Order Notification Line"
|
||||
|
||||
parent_id = fields.Many2one(
|
||||
comodel_name="wizard.account.payment.order.notification",
|
||||
ondelete="cascade",
|
||||
index=True,
|
||||
)
|
||||
partner_id = fields.Many2one(
|
||||
comodel_name="res.partner", required=True, string="Partner", readonly=True
|
||||
)
|
||||
email = fields.Char(string="Email")
|
||||
to_send = fields.Boolean(string="To send")
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="wizard_account_payment_order_notification_form" model="ir.ui.view">
|
||||
<field name="name">wizard.account.payment.order.notification.form</field>
|
||||
<field name="model">wizard.account.payment.order.notification</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group name="main_group">
|
||||
<group name="left_group">
|
||||
<field name="order_id" />
|
||||
<field name="mail_template_id" />
|
||||
</group>
|
||||
</group>
|
||||
<group name="secondary_group">
|
||||
<field name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" create="false" delete="false">
|
||||
<field name="partner_id" force_save="1" />
|
||||
<field name="email" />
|
||||
<field
|
||||
name="to_send"
|
||||
attrs="{'readonly':[('email','=',False)]}"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<footer>
|
||||
<button
|
||||
type="object"
|
||||
name="action_process"
|
||||
string="Confirm"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button string="Cancel" class="btn-default" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record
|
||||
id="wizard_account_payment_order_notification_action"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Send notifications</field>
|
||||
<field name="res_model">wizard.account.payment.order.notification</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user