Skip to content

Commit

Permalink
[16.0][MIG] account_payment_batch_process
Browse files Browse the repository at this point in the history
  • Loading branch information
Murtaza-OSI authored and BernatPForgeFlow committed Feb 22, 2024
1 parent e61d98d commit 0d6be62
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 73 deletions.
23 changes: 13 additions & 10 deletions account_payment_batch_process/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
Account Payment Batch Processing
================================

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

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

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

Expand Down Expand Up @@ -57,8 +60,8 @@ Bug Tracker

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

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

Expand Down Expand Up @@ -100,6 +103,6 @@ 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.

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.
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.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion account_payment_batch_process/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Account Payment Batch Processing",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"summary": """
Expand Down
58 changes: 30 additions & 28 deletions account_payment_batch_process/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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/" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Account Payment Batch Processing</title>
<style type="text/css">

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z 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
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

Expand Down Expand Up @@ -366,64 +366,66 @@ <h1 class="title">Account Payment Batch Processing</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f1b83c1fec8f245da7c650b886f95d6b2d2db91c7bab0a4408d3db1bf620bdf5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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>
<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>
<p>Batch Payments Processing for Customers Invoices and Supplier Invoices/Vendor Bills.</p>
<p>Payments to multiple vendors can be processed. Payments from multiple customers can be processed.</p>
<p>Partial payments can be processed leaving invoice/bill open or writing off unpaid portion to a write-off account.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#changelog" id="id3">Changelog</a><ul>
<li><a class="reference internal" href="#id1" id="id4">12.0.1.1.0</a></li>
<li><a class="reference internal" href="#id2" id="id5">12.0.1.0.0</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-1">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-2">12.0.1.1.0</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-3">12.0.1.0.0</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="id6">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id7">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id8">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id9">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id10">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id11">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-8">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#id3">Changelog</a></h1>
<div class="section" id="id1">
<h2><a class="toc-backref" href="#id4">12.0.1.1.0</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-2">12.0.1.1.0</a></h2>
<p><strong>Features</strong></p>
<ul class="simple">
<li>Remove menu “Batch Payments” from Vendors and Customers</li>
<li>Remove menu “Register Payment” from batch invoices.</li>
</ul>
</div>
<div class="section" id="id2">
<h2><a class="toc-backref" href="#id5">12.0.1.0.0</a></h2>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-3">12.0.1.0.0</a></h2>
<ul class="simple">
<li>Initial File</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id6">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-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/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>
If you spotted it first, help us to smash it by providing a detailed and welcomed
<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>
<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="#id7">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id8">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>Open Source Integrators</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id9">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Balaji Kannan &lt;<a class="reference external" href="mailto:bkannan&#64;opensourceintegrators.com">bkannan&#64;opensourceintegrators.com</a>&gt;</li>
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
Expand All @@ -435,19 +437,19 @@ <h2><a class="toc-backref" href="#id9">Contributors</a></h2>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id10">Other credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-8">Other credits</a></h2>
<ul class="simple">
<li>Open Source Integrators &lt;<a class="reference external" href="mailto:contact&#64;opensourceintegrators.com">contact&#64;opensourceintegrators.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id11">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-9">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>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>
<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>
<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>
Expand Down
2 changes: 1 addition & 1 deletion account_payment_batch_process/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_in_invoice_tree" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="invoice_partner_display_name" position="after">
<field name="state" position="move" />
</field>
</field>
Expand Down
20 changes: 14 additions & 6 deletions account_payment_batch_process/wizard/account_payment_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,20 @@ def get_payment_values(self, group_data=None):
"partner_id": int(group_data["partner_id"]),
"partner_type": group_data["partner_type"],
"check_amount_in_words": group_data["check_amount_in_words"],
"write_off_line_vals": {
"name": writeoff_name,
"account_id": writeoff_account_id,
"amount": writeoff_amount,
},
}
if writeoff_amount > 0:
res.update(
{
"write_off_line_vals": [
{
"name": writeoff_name,
"account_id": writeoff_account_id,
"amount_currency": int(writeoff_amount),
"balance": group_data["total"],
}
]
}
)
return res

def _check_amounts(self):
Expand Down Expand Up @@ -410,7 +418,7 @@ def make_payments(self):
payment.action_post()
# Reconciliation
domain = [
("account_internal_type", "in", ("receivable", "payable")),
("account_type", "in", ("receivable", "payable")),
("reconciled", "=", False),
]
payment_lines = payment.line_ids.filtered_domain(domain)
Expand Down
15 changes: 9 additions & 6 deletions account_payment_batch_process_discount/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
Discount on batch payments
==========================

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

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

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
If you spotted it first, help us to smash it by providing a detailed and welcomed
`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**>`_.

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

0 comments on commit 0d6be62

Please sign in to comment.