Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 32 additions & 35 deletions account_payment_order/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Account Payment Order
=====================
Expand All @@ -17,7 +13,7 @@ Account Payment Order
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
:target: https://odoo-community.org/page/development-status
:alt: Mature
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |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
Expand All @@ -44,9 +40,9 @@ Installation

This module depends on:

- account_payment_partner
- base_iban
- document
- account_payment_partner
- base_iban
- document

This modules is part of the OCA/bank-payment suite.

Expand Down Expand Up @@ -95,41 +91,42 @@ Authors
Contributors
------------

- Stéphane Bidoul <stephane.bidoul@acsone.eu>
- Alexis de Lattre <alexis.delattre@akretion.com>
- Adrien Peiffer <adrien.peiffer@acsone.eu>
- Stefan Rijnhart
- Laurent Mignon <laurent.mignon@acsone.eu>
- Alexandre Fayolle
- Danimar Ribeiro
- Erwin van der Ploeg
- Raphaël Valyi
- Sandy Carter
- Angel Moya <angel.moya@domatix.com>
- Jose María Alzaga <jose.alzaga@aselcis.com>
- Meyomesse Gilles <meyomesse.gilles@gmail.com>
- Denis Roussel <denis.roussel@acsone.eu>
- `DynApps <https://www.dynapps.be>`__:
- Stéphane Bidoul <stephane.bidoul@acsone.eu>
- Alexis de Lattre <alexis.delattre@akretion.com>
- Adrien Peiffer <adrien.peiffer@acsone.eu>
- Stefan Rijnhart
- Laurent Mignon <laurent.mignon@acsone.eu>
- Alexandre Fayolle
- Danimar Ribeiro
- Erwin van der Ploeg
- Raphaël Valyi
- Sandy Carter
- Angel Moya <angel.moya@domatix.com>
- Jose María Alzaga <jose.alzaga@aselcis.com>
- Meyomesse Gilles <meyomesse.gilles@gmail.com>
- Denis Roussel <denis.roussel@acsone.eu>
- `DynApps <https://www.dynapps.be>`__:

- Raf Ven <raf.ven@dynapps.be>
- Raf Ven <raf.ven@dynapps.be>

- Andrea Stirpe <a.stirpe@onestein.nl>
- `Jarsa <https://www.jarsa.com.mx>`__:
- Andrea Stirpe <a.stirpe@onestein.nl>
- `Jarsa <https://www.jarsa.com.mx>`__:

- Alan Ramos <alan.ramos@jarsa.com.mx>
- Alan Ramos <alan.ramos@jarsa.com.mx>

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

- Pedro M. Baeza
- Carlos Dauden
- Carlos Roca
- Carlos Lopez
- Pedro M. Baeza
- Carlos Dauden
- Carlos Roca
- Carlos Lopez

- `Open Source Integrators <https://www.opensourceintegrators.com>`__:
- `Open Source Integrators <https://www.opensourceintegrators.com>`__:

- Ammar Officewala <aofficewala@opensourceintegrators.com>
- Ammar Officewala <aofficewala@opensourceintegrators.com>

- Marçal Isern <marsal.isern@qubiq.es>
- Marçal Isern <marsal.isern@qubiq.es>
- Simone Rubino <simone.rubino88@gmail.com>

Maintainers
-----------
Expand Down
2 changes: 2 additions & 0 deletions account_payment_order/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
from . import models
from . import report
from . import wizard

from . import patch_tests
35 changes: 35 additions & 0 deletions account_payment_order/patch_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2025 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

"""
Some test classes inheriting from AccountTestInvoicingCommon
assume that the default users can create `res.partner.bank` records.
One example is the core module `l10n_it_edi`
in https://github.com/odoo/odoo/blob/
b1a91bac849871ec37510fa97747285fe373bd22/addons/l10n_it_edi/tests/common.py#L59.
Due to Odoo's modular architecture, these test classes' module
might not even have `account_payment_order` in their dependencies.

With this patch, default users in
test classes inheriting from AccountTestInvoicingCommon
are able to create `res.partner.bank` records.
"""

from odoo.tools import config

if config["test_enable"] or config["test_file"]:
from odoo.addons.account.tests.common import AccountTestInvoicingCommon

original_get_default_groups = AccountTestInvoicingCommon.get_default_groups

@classmethod
def patched_default_groups(cls):
groups = original_get_default_groups.__func__(cls)
if new_group := cls.env.ref(
"account_payment_order.group_account_payment",
raise_if_not_found=False,
):
groups |= new_group
return groups

AccountTestInvoicingCommon.get_default_groups = patched_default_groups
1 change: 1 addition & 0 deletions account_payment_order/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
- [Open Source Integrators](https://www.opensourceintegrators.com):
- Ammar Officewala \<<aofficewala@opensourceintegrators.com>\>
- Marçal Isern \<<marsal.isern@qubiq.es>\>
- Simone Rubino \<<simone.rubino88@gmail.com>\>
31 changes: 13 additions & 18 deletions account_payment_order/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Account Payment Order</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="account-payment-order">
<h1 class="title">Account Payment Order</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="account-payment-order">
<h1>Account Payment Order</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:72673b3679b6a9a9174d5a3d91206868d924cdcfde7226b60ede0f21b20f590d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-payment/tree/18.0/account_payment_order"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-payment-18-0/bank-payment-18-0-account_payment_order"><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/bank-payment&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/bank-payment/tree/18.0/account_payment_order"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-payment-18-0/bank-payment-18-0-account_payment_order"><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/bank-payment&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds support for payment orders and debit orders.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -392,7 +387,7 @@ <h1>Account Payment Order</h1>
</ul>
</div>
<div class="section" id="installation">
<h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<p>This module depends on:</p>
<ul class="simple">
<li>account_payment_partner</li>
Expand All @@ -402,12 +397,12 @@ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
<p>This modules is part of the OCA/bank-payment suite.</p>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<p>This module adds several options on Payment Modes, cf
Invoicing/Accounting &gt; Configuration &gt; Management &gt; Payment Modes.</p>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
<p>You can create a Payment order via the menu Invoicing/Accounting &gt;
Vendors &gt; Payment Orders and then select the move lines to pay.</p>
<p>You can create a Debit order via the menu Invoicing/Accounting &gt;
Expand All @@ -418,17 +413,17 @@ <h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
Vendors &gt; Payment Orders and then select the payment oder to print.</p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
<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/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 to smash 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%0Aversion:%2018.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">
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>ACSONE SA/NV</li>
<li>Therp BV</li>
Expand All @@ -437,7 +432,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Stéphane Bidoul &lt;<a class="reference external" href="mailto:stephane.bidoul&#64;acsone.eu">stephane.bidoul&#64;acsone.eu</a>&gt;</li>
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
Expand Down Expand Up @@ -474,10 +469,11 @@ <h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
</ul>
</li>
<li>Marçal Isern &lt;<a class="reference external" href="mailto:marsal.isern&#64;qubiq.es">marsal.isern&#64;qubiq.es</a>&gt;</li>
<li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino88&#64;gmail.com">simone.rubino88&#64;gmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-8">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" />
Expand All @@ -490,6 +486,5 @@ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions account_payment_order/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from . import test_payment_mode
from . import test_bank
from . import test_partner_bank
from . import test_payment_order_inbound
from . import test_payment_order_outbound
from . import test_account_payment
25 changes: 25 additions & 0 deletions account_payment_order/tests/test_partner_bank.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2025 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.tests import Form, tagged

from odoo.addons.account.tests.common import AccountTestInvoicingCommon


@tagged("post_install", "-at_install")
class TestPartnerBank(AccountTestInvoicingCommon):
def test_default_user_create(self):
"""The default user in tests can create partner bank accounts."""
# Arrange
partner_form = Form(self.env["res.partner"])
partner_form.name = "Test Partner"
partner = partner_form.save()

# Act
partner_bank_form = Form(self.env["res.partner.bank"])
partner_bank_form.acc_number = "Test Account Number"
partner_bank_form.partner_id = partner
partner_bank = partner_bank_form.save()

# Assert
self.assertTrue(partner_bank)