Skip to content

Commit 0d6be62

Browse files
Murtaza-OSIBernatPForgeFlow
authored andcommitted
[16.0][MIG] account_payment_batch_process
1 parent e61d98d commit 0d6be62

File tree

10 files changed

+100
-73
lines changed

10 files changed

+100
-73
lines changed

Diff for: account_payment_batch_process/README.rst

+13-10
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Account Payment Batch Processing
33
================================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:f1b83c1fec8f245da7c650b886f95d6b2d2db91c7bab0a4408d3db1bf620bdf5
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1114
:target: https://odoo-community.org/page/development-status
@@ -14,16 +17,16 @@ Account Payment Batch Processing
1417
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1518
:alt: License: AGPL-3
1619
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github
17-
:target: https://github.com/OCA/account-payment/tree/15.0/account_payment_batch_process
20+
:target: https://github.com/OCA/account-payment/tree/16.0/account_payment_batch_process
1821
:alt: OCA/account-payment
1922
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/account-payment-15-0/account-payment-15-0-account_payment_batch_process
23+
:target: https://translation.odoo-community.org/projects/account-payment-16-0/account-payment-16-0-account_payment_batch_process
2124
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/96/15.0
24-
:alt: Try me on Runbot
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-payment&target_branch=16.0
27+
:alt: Try me on Runboat
2528

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2730

2831
Batch Payments Processing for Customers Invoices and Supplier Invoices/Vendor Bills.
2932

@@ -57,8 +60,8 @@ Bug Tracker
5760

5861
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/issues>`_.
5962
In case of trouble, please check there if your issue has already been reported.
60-
If you spotted it first, help us smashing it by providing a detailed and welcomed
61-
`feedback <https://github.com/OCA/account-payment/issues/new?body=module:%20account_payment_batch_process%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
63+
If you spotted it first, help us to smash it by providing a detailed and welcomed
64+
`feedback <https://github.com/OCA/account-payment/issues/new?body=module:%20account_payment_batch_process%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6265

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

@@ -100,6 +103,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
100103
mission is to support the collaborative development of Odoo features and
101104
promote its widespread use.
102105

103-
This module is part of the `OCA/account-payment <https://github.com/OCA/account-payment/tree/15.0/account_payment_batch_process>`_ project on GitHub.
106+
This module is part of the `OCA/account-payment <https://github.com/OCA/account-payment/tree/16.0/account_payment_batch_process>`_ project on GitHub.
104107

105108
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Diff for: account_payment_batch_process/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "Account Payment Batch Processing",
6-
"version": "15.0.1.0.0",
6+
"version": "16.0.1.0.0",
77
"license": "AGPL-3",
88
"author": "Open Source Integrators, Odoo Community Association (OCA)",
99
"summary": """

Diff for: account_payment_batch_process/static/description/index.html

+30-28
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
6+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
77
<title>Account Payment Batch Processing</title>
88
<style type="text/css">
99

1010
/*
1111
:Author: David Goodger ([email protected])
12-
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
12+
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
1313
:Copyright: This stylesheet has been placed in the public domain.
1414
1515
Default cascading style sheet for the HTML output of Docutils.
1616
17-
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
17+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
1919
*/
2020

@@ -366,64 +366,66 @@ <h1 class="title">Account Payment Batch Processing</h1>
366366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370+
!! source digest: sha256:f1b83c1fec8f245da7c650b886f95d6b2d2db91c7bab0a4408d3db1bf620bdf5
369371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<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/account-payment/tree/15.0/account_payment_batch_process"><img alt="OCA/account-payment" src="https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-payment-15-0/account-payment-15-0-account_payment_batch_process"><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/96/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-payment/tree/16.0/account_payment_batch_process"><img alt="OCA/account-payment" src="https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-payment-16-0/account-payment-16-0-account_payment_batch_process"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-payment&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371373
<p>Batch Payments Processing for Customers Invoices and Supplier Invoices/Vendor Bills.</p>
372374
<p>Payments to multiple vendors can be processed. Payments from multiple customers can be processed.</p>
373375
<p>Partial payments can be processed leaving invoice/bill open or writing off unpaid portion to a write-off account.</p>
374376
<p><strong>Table of contents</strong></p>
375377
<div class="contents local topic" id="contents">
376378
<ul class="simple">
377-
<li><a class="reference internal" href="#changelog" id="id3">Changelog</a><ul>
378-
<li><a class="reference internal" href="#id1" id="id4">12.0.1.1.0</a></li>
379-
<li><a class="reference internal" href="#id2" id="id5">12.0.1.0.0</a></li>
379+
<li><a class="reference internal" href="#changelog" id="toc-entry-1">Changelog</a><ul>
380+
<li><a class="reference internal" href="#section-1" id="toc-entry-2">12.0.1.1.0</a></li>
381+
<li><a class="reference internal" href="#section-2" id="toc-entry-3">12.0.1.0.0</a></li>
380382
</ul>
381383
</li>
382-
<li><a class="reference internal" href="#bug-tracker" id="id6">Bug Tracker</a></li>
383-
<li><a class="reference internal" href="#credits" id="id7">Credits</a><ul>
384-
<li><a class="reference internal" href="#authors" id="id8">Authors</a></li>
385-
<li><a class="reference internal" href="#contributors" id="id9">Contributors</a></li>
386-
<li><a class="reference internal" href="#other-credits" id="id10">Other credits</a></li>
387-
<li><a class="reference internal" href="#maintainers" id="id11">Maintainers</a></li>
384+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
385+
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
386+
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
387+
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
388+
<li><a class="reference internal" href="#other-credits" id="toc-entry-8">Other credits</a></li>
389+
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
388390
</ul>
389391
</li>
390392
</ul>
391393
</div>
392394
<div class="section" id="changelog">
393-
<h1><a class="toc-backref" href="#id3">Changelog</a></h1>
394-
<div class="section" id="id1">
395-
<h2><a class="toc-backref" href="#id4">12.0.1.1.0</a></h2>
395+
<h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1>
396+
<div class="section" id="section-1">
397+
<h2><a class="toc-backref" href="#toc-entry-2">12.0.1.1.0</a></h2>
396398
<p><strong>Features</strong></p>
397399
<ul class="simple">
398400
<li>Remove menu “Batch Payments” from Vendors and Customers</li>
399401
<li>Remove menu “Register Payment” from batch invoices.</li>
400402
</ul>
401403
</div>
402-
<div class="section" id="id2">
403-
<h2><a class="toc-backref" href="#id5">12.0.1.0.0</a></h2>
404+
<div class="section" id="section-2">
405+
<h2><a class="toc-backref" href="#toc-entry-3">12.0.1.0.0</a></h2>
404406
<ul class="simple">
405407
<li>Initial File</li>
406408
</ul>
407409
</div>
408410
</div>
409411
<div class="section" id="bug-tracker">
410-
<h1><a class="toc-backref" href="#id6">Bug Tracker</a></h1>
412+
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
411413
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-payment/issues">GitHub Issues</a>.
412414
In case of trouble, please check there if your issue has already been reported.
413-
If you spotted it first, help us smashing it by providing a detailed and welcomed
414-
<a class="reference external" href="https://github.com/OCA/account-payment/issues/new?body=module:%20account_payment_batch_process%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
415+
If you spotted it first, help us to smash it by providing a detailed and welcomed
416+
<a class="reference external" href="https://github.com/OCA/account-payment/issues/new?body=module:%20account_payment_batch_process%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
415417
<p>Do not contact contributors directly about support or help with technical issues.</p>
416418
</div>
417419
<div class="section" id="credits">
418-
<h1><a class="toc-backref" href="#id7">Credits</a></h1>
420+
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
419421
<div class="section" id="authors">
420-
<h2><a class="toc-backref" href="#id8">Authors</a></h2>
422+
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
421423
<ul class="simple">
422424
<li>Open Source Integrators</li>
423425
</ul>
424426
</div>
425427
<div class="section" id="contributors">
426-
<h2><a class="toc-backref" href="#id9">Contributors</a></h2>
428+
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
427429
<ul class="simple">
428430
<li>Balaji Kannan &lt;<a class="reference external" href="mailto:bkannan&#64;opensourceintegrators.com">bkannan&#64;opensourceintegrators.com</a>&gt;</li>
429431
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
@@ -435,19 +437,19 @@ <h2><a class="toc-backref" href="#id9">Contributors</a></h2>
435437
</ul>
436438
</div>
437439
<div class="section" id="other-credits">
438-
<h2><a class="toc-backref" href="#id10">Other credits</a></h2>
440+
<h2><a class="toc-backref" href="#toc-entry-8">Other credits</a></h2>
439441
<ul class="simple">
440442
<li>Open Source Integrators &lt;<a class="reference external" href="mailto:contact&#64;opensourceintegrators.com">contact&#64;opensourceintegrators.com</a>&gt;</li>
441443
</ul>
442444
</div>
443445
<div class="section" id="maintainers">
444-
<h2><a class="toc-backref" href="#id11">Maintainers</a></h2>
446+
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
445447
<p>This module is maintained by the OCA.</p>
446448
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
447449
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
448450
mission is to support the collaborative development of Odoo features and
449451
promote its widespread use.</p>
450-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-payment/tree/15.0/account_payment_batch_process">OCA/account-payment</a> project on GitHub.</p>
452+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-payment/tree/16.0/account_payment_batch_process">OCA/account-payment</a> project on GitHub.</p>
451453
<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>
452454
</div>
453455
</div>

Diff for: account_payment_batch_process/views/account_move.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<field name="model">account.move</field>
77
<field name="inherit_id" ref="account.view_in_invoice_tree" />
88
<field name="arch" type="xml">
9-
<field name="partner_id" position="after">
9+
<field name="invoice_partner_display_name" position="after">
1010
<field name="state" position="move" />
1111
</field>
1212
</field>

Diff for: account_payment_batch_process/wizard/account_payment_register.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,20 @@ def get_payment_values(self, group_data=None):
204204
"partner_id": int(group_data["partner_id"]),
205205
"partner_type": group_data["partner_type"],
206206
"check_amount_in_words": group_data["check_amount_in_words"],
207-
"write_off_line_vals": {
208-
"name": writeoff_name,
209-
"account_id": writeoff_account_id,
210-
"amount": writeoff_amount,
211-
},
212207
}
208+
if writeoff_amount > 0:
209+
res.update(
210+
{
211+
"write_off_line_vals": [
212+
{
213+
"name": writeoff_name,
214+
"account_id": writeoff_account_id,
215+
"amount_currency": int(writeoff_amount),
216+
"balance": group_data["total"],
217+
}
218+
]
219+
}
220+
)
213221
return res
214222

215223
def _check_amounts(self):
@@ -410,7 +418,7 @@ def make_payments(self):
410418
payment.action_post()
411419
# Reconciliation
412420
domain = [
413-
("account_internal_type", "in", ("receivable", "payable")),
421+
("account_type", "in", ("receivable", "payable")),
414422
("reconciled", "=", False),
415423
]
416424
payment_lines = payment.line_ids.filtered_domain(domain)

Diff for: account_payment_batch_process_discount/README.rst

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Discount on batch payments
33
==========================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:7c17d9c000b0c7ea83366b8152a1d91de9b8ca8e1932a7d2b0460c9cad09990a
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1114
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Discount on batch payments
1922
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
2023
:target: https://translation.odoo-community.org/projects/account-payment-16-0/account-payment-16-0-account_payment_batch_process_discount
2124
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/96/16.0
24-
:alt: Try me on Runbot
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-payment&target_branch=16.0
27+
:alt: Try me on Runboat
2528

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2730

2831
This module allows you to define discounts for early payment and apply them on batch
2932
payments.
@@ -57,7 +60,7 @@ Bug Tracker
5760

5861
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/issues>`_.
5962
In case of trouble, please check there if your issue has already been reported.
60-
If you spotted it first, help us smashing it by providing a detailed and welcomed
63+
If you spotted it first, help us to smash it by providing a detailed and welcomed
6164
`feedback <https://github.com/OCA/account-payment/issues/new?body=module:%20account_payment_batch_process_discount%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6265

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

0 commit comments

Comments
 (0)