Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
1b10df9
Start to port bank-payment to v9 (with a lot of improvements) during …
alexis-via Apr 29, 2016
b32e8ba
[FIX+IMP] account_payment_order: 2 things:
sbidoul Jun 25, 2016
ba3037d
Add support for multi-currency in the generation of the account move.
alexis-via Jun 29, 2016
108e932
[IMP] account_payment_order: Remove useless migration script
pedrobaeza Jul 1, 2016
16c78e8
Move the account_payment_mode ir.rule in account_payment_mode module
yvaucher Jul 5, 2016
51ced3e
[FIX+IMP] account_payment_order: 2 more things:
sbidoul Jul 19, 2016
1dcbad7
[FIX] account_payment_order: 4 things:
alexis-via Jul 22, 2016
e886713
[IMP] set partner on offsetting account move line if possible
sbidoul Aug 24, 2016
e4ff132
Reactivate company rules in account_payment_order
yvaucher Sep 8, 2016
f6e80cb
Port almost all modules to v10 (#305)
Oct 19, 2016
ff45965
[FIX] account_payment_order: Use 'index' instead of 'select'
Nov 21, 2016
1d73874
Remove internal_type=other restriction for transfer account (#311)
jalzaga Dec 8, 2016
d4eb841
Creation/Modification of bank info only for Account Payment group
alexis-via Jan 12, 2017
75c7614
[FIX] fill date instead off maturity date on account move line generated
vrenaville Feb 2, 2017
88cffd0
Fix 2 issues on form view for payment order
mdietrichc2c Mar 6, 2017
75a5116
[FIX+IMP] account_payment_order:
alexis-via Apr 4, 2017
e03eb3a
[IMP] account_payment_order: Don't allow deletion of an uploaded paym…
mdietrichc2c Jul 26, 2017
95585b8
[IMP] account_payment_order: Restriction + tests
grindtildeath Jul 27, 2017
75b4c20
[FIX] account_payment_order: Adapt test to v10
pedrobaeza Aug 2, 2017
74ee80b
[IMP] account_payment_order: select partner bank account automatically.
Aug 11, 2017
81277fa
[10.0]Fix payment method onchange with multicompany (#374)
grindtildeath Aug 28, 2017
c05ecd5
[ADD] description field for payment order
GillesTephaneMeyomesse Jun 26, 2017
959e622
[ADD] report for payment order (#370)
GillesTephaneMeyomesse Oct 10, 2017
d3110f7
[MIG] account_payment_order
etobella Oct 17, 2017
97572ad
When the user looks for open payables or receivables, in the
JordiBForgeFlow Oct 27, 2017
9652ba3
[FIX] account_payment_order: Correct domain definition on account.pay…
pedrobaeza Dec 11, 2017
826d8c5
[11.0][FIX] account_payment_order: printing report
astirpe Jan 22, 2018
fbe9ffb
[FIX] account_payment_order: Take payment mode from move (#466)
pedrobaeza May 1, 2018
83b7030
[FIX] account_payment_order: Add bank payment line multi-company rule
carlosdauden May 3, 2018
80c59c3
Several small usability improvements
alexis-via May 22, 2018
ba37d65
[FIX] report should show the invoice number, not the move name (#477)
etobella May 23, 2018
f66bf46
[FIX] account_payment_order: Fix FR translation
pedrobaeza Jun 20, 2018
201326a
Translated using Weblate (Español (España))
etobella Jul 13, 2018
2102e5e
[FIX] default_partner_id added on partner_bank if it is created.
etobella Aug 29, 2018
dc6a575
[10.0] Add filter on partners on wizard "Create Payment Lines from Jo…
Sep 2, 2018
d91dff4
[IMP] account_payment_order: Use bank.payment.line reference in Payme…
ecino Sep 4, 2018
bb1d51e
Fix structured communication
Martronic-SA Oct 12, 2018
e47aef2
[12.0][mig] account_payment_order: Migrate to v12.0
sergio-teruel Nov 5, 2018
09b7dc7
[MIG] account_payment_order: Finish migration to v12
pedrobaeza Dec 13, 2018
0e63fa9
[MIG] account_banking_sepa_direct_debit: Finish migration to 12.0
pedrobaeza Dec 14, 2018
b2592fa
[REF] Account Payment Order: add Admin in security group
ThomasBinsfeld Dec 17, 2018
8a44e6b
[REF] Payment Order: better performance of draft2open method
ThomasBinsfeld Jan 17, 2019
84ba5d1
[FIX] account_payment_order: Fix journal domain
pedrobaeza Feb 2, 2019
28282ea
[REF+IMP] account_payment_order: invoice addition + move generation +…
ThomasBinsfeld Feb 6, 2019
957d8f9
[FIX] account_payment_order: wrong function name + report totals + re…
Apr 9, 2019
0a30b6b
[REF] Payment Order: move all move preparation code in _prepare_move
ThomasBinsfeld Apr 10, 2019
fd83eae
[12.0] [FIX] Failing test test_account_payment_02
rven Apr 23, 2019
6e286cc
Add indexes on account payment models
guewen May 7, 2019
deb5e04
[FIX] account_payment_error: Avoid singleton error in allowed_journal…
pedrobaeza Jun 26, 2019
e5aca6c
[FIX+IMP] account_payment_order: Make tests resilient + inbound inher…
pedrobaeza Aug 22, 2019
0f035f5
[IMP] account_payment_order: Select first partner bank
carlosdauden Sep 10, 2019
5517b11
[FIX] account_payment_order: Fix payment order report. Adapt to boots…
sergio-teruel Oct 29, 2019
ed5b6d8
[FIX] account_payment_order: Sequences must be noupdate=1
pedrobaeza Oct 30, 2019
388c516
[FIX] account_payment_order: Restore colors in payment order tree view
pedrobaeza Dec 18, 2019
e488667
[IMP] account_payment_order: change 'bill reference' column value in …
Feb 20, 2020
c8906e6
[IMP] account_payment_order: black, isort
rven Mar 12, 2020
056310e
[MIG] account_payment_order: Migration to 13.0
rven Mar 12, 2020
d527209
[FIX] multicompany rule
astirpe Apr 10, 2020
bf7450f
[IMP] account_payment_order: Print payment order in user lang if not …
pedrobaeza Feb 12, 2020
edf39a5
[FIX] Set priority on alternate view
StefanRijnhart May 15, 2020
d510790
[FIX] account_payment_order: set partner_bank_id + order generation f…
ValentinVinagre Apr 22, 2020
3e15918
Fix state condition on invoice view
alexis-via Jun 6, 2020
ed3f3c4
[IMP] account_payment_order: move payment order menus
luc-demeyer Jul 24, 2020
de83b7e
[FIX] avoid cache miss in compute
astirpe Sep 11, 2020
939f78d
[MIG] account_payment_order: Migration to 14.0
alan196 Nov 14, 2020
6d9c77a
[MIG] account_payment_order: Migration to v14
CarlosRoca13 Jan 5, 2021
e0d102d
[FIX] account_payment_order: Fix tests
joao-p-marques Feb 25, 2021
34b8f78
[FIX] account_payment_order: Fix tests
joao-p-marques Apr 14, 2021
639e189
[FIX] account_payment_order: Computed non-stored fields needs always …
pedrobaeza Apr 15, 2021
35ffd68
[FIX] account_payment_order: Remove old migration scripts
pedrobaeza Apr 26, 2021
cfdd39a
[13.0][IMP] account_payment_order - move date should be bank line dat…
baimont Apr 21, 2021
12a13b2
[FIX] account_payment_order: Change security group category + Make po…
joao-p-marques May 17, 2021
15109b9
[IMP]account_payment_order: payment date when adding transaction line
manuelregidor Jun 2, 2021
896e3ba
[IMP] account_payment_order: Add hook method for finding previous pay…
AmmarOfficewalaSerpentCS Jul 6, 2021
9f08e57
[FIX] account_payment_order: Bind report to model
iammiracle Aug 20, 2021
1f550e4
[FIX] account_payment_order: Fix multi-company issues in tests
joao-p-marques Sep 14, 2021
58dbbdf
[IMP] account_payment_order: computation of sepa + remove done state …
alexis-via Jun 8, 2021
f0ae1db
[MIG] account_payment_order: Migration to 15.0
misern2 Dec 14, 2021
5fa2ec4
account_payment_order: communication required in form view
alexis-via Feb 16, 2022
9b1c05b
[IMP] account_payment_order: don't requiere reference_type anymore
MiquelRForgeFlow Mar 8, 2022
cf43f16
[IMP] account_payment_order: Promote to Mature
etobella Apr 21, 2022
cf36194
[FIX] account_payment_order: Don't fail due to tz
pedrobaeza Apr 22, 2022
3f3ea06
[FIX] account_payment_order: Fix tests
ramiadavid Jul 6, 2022
49e62f6
[FIX] account_payment_order: fix action returned by create_account_pa…
alexis-via Aug 10, 2022
9789883
[FIX] Restore payment order number in account move line label.
Sep 26, 2022
2440f31
[IMP]account_payment_order: Add activities to account.payment.order m…
manuelregidor Oct 27, 2022
b3fee7e
[FIX] account_payment_order: Error in Batch Payments when deleting a …
antony-psc Dec 15, 2022
15ee34f
Add pre_init_hook to add computed column
dannyadair Feb 22, 2023
d0604ac
[IMP] account_payment_order: outbound inheritable + SavepointCase
celm1990 Jan 16, 2022
e6ea555
[FIX] account_payment_order: Proper indentation for test + make it work
pedrobaeza Jan 17, 2022
a83c2a0
[IMP] account_payment_order: Better communication field management
rousseldenis Apr 14, 2022
9daae55
[FIX] account_payment_order: Fallback to payment_ref if ref is undefined
driehuis Mar 18, 2022
c091fa9
[IMP] account_payment_order: add link to payment order in chatter
alexis-via Nov 8, 2022
13bbaf7
[REF+IMP] account_payment_order: Use native payments
pedrobaeza Nov 6, 2022
2942e8f
[FIX] account_payment_order: Do correctly the fix on tests
pedrobaeza Mar 4, 2023
1b45e8e
[I18N] account_payment_order: Better translations for de_DE
wpichler Feb 22, 2023
5ad74bb
[MIG] account_payment_order: Migration to 16.0
wpichler Oct 25, 2022
451a109
[FIX] account_payment_order: create lines with same sequence name
Reyes4711-S73 Apr 5, 2023
d0ce5f7
[IMP] account_payment_order: Concatenate all UserError messages
Feb 17, 2023
1441bf3
[FIX] Fixed Payment Transaction view
Nikul-OSI Apr 25, 2023
22c999f
[FIX] account_payment_order: treet2 > street2
pedrobaeza Apr 25, 2023
97f08e5
[FIX] account_payment_order: Set payment method line for account.payment
pedrobaeza May 11, 2023
fba0cb4
[FIX] account_payment_order Allow to download file in edit mode
Yadier-Tecnativa Jul 7, 2023
2576ab2
[IMP] account_payment_order: Add a custom message if the invoice does…
victoralmau Jul 24, 2023
434d377
[FIX+IMP] account_payment_order: Better error messages on "Add to order"
pedrobaeza Aug 18, 2023
ba32b29
[FIX] account_payment_order: change result_payorder_ids to list to sh…
celm1990 Jan 4, 2023
71964c2
[FIX] account_payment_order: Add extra form view only to avoid open m…
victoralmau Sep 22, 2023
f83f8c1
[FIX] account_payment_order: Add colspan=2 to a correct visualization
victoralmau Sep 22, 2023
7fbfa37
[IMP] account_payment_order: Add payment_ref field to account.payment…
victoralmau Sep 19, 2023
bb6d9c9
[FIX] account_payment_order: Define the value of the communication fi…
victoralmau Sep 19, 2023
4dbf4d9
Add warning when payment order is not SEPA
alexis-via Sep 27, 2023
37d3ab0
[IMP]grouped invoices: " - ".join in stead of "-".join
luc-demeyer Nov 4, 2023
05e5239
[IMP] account_payment_order: add payment lines smart button on invoice
luc-demeyer Jun 23, 2023
6bf4a5f
[FIX] account_payment_order: Restrict payment lines button to payment…
pedrobaeza Nov 14, 2023
acb888c
[FIX] account_payment_order: Always return a string in the _get_payme…
victoralmau Nov 27, 2023
bca40e6
[IMP] account_payment_order: pre-commit auto fixes
ramiadavid Jan 13, 2024
3833e85
[MIG] account_payment_order: Migration to 17.0
ramiadavid Jan 13, 2024
b178c73
Translated using Weblate (Italian)
mymage Feb 29, 2024
1d56e6b
[IMP] account_banking_mandate: pre-commit auto fixes
ramiadavid Mar 2, 2024
179a6c9
Translated using Weblate (Italian)
mymage Mar 4, 2024
f9612ce
[FIX] account_payment_order: exclude cancel journal entries
alexis-via Apr 9, 2024
f965e5b
[FIX][17.0] Fix dynamic domain
ramiadavid Apr 7, 2024
608e82c
Update translation files
weblate Apr 10, 2024
3a89f7f
Translated using Weblate (Italian)
mymage Apr 11, 2024
3805f85
Translated using Weblate (Spanish)
Ivorra78 Apr 23, 2024
be0ddeb
Translated using Weblate (Swedish)
jakobkrabbe Jun 5, 2024
7fe6b44
[IMP] account_payment_order: Mark invoices in a payment order as in p…
pedrobaeza May 28, 2024
93704af
[IMP] account_payment_order: update payment reference on open payment…
luc-demeyer Jun 23, 2023
8ee6fd7
Translated using Weblate (Italian)
mymage Jun 12, 2024
f6cfca4
[IMP] account_payment_order: Add Transfer moves dates
victoralmau Jun 12, 2024
f7ee423
[IMP] account_payment_order: Apply readonly=True to Payment Date fiel…
victoralmau Jun 17, 2024
820c413
[FIX] account_payment_order: add missing option "structured" to payme…
sbejaoui Jul 9, 2024
28f419c
[IMP] account_payment_order*: Define the correct date in the files th…
victoralmau Jul 8, 2024
19c2601
Translated using Weblate (Italian)
mymage Aug 12, 2024
3953f57
[FIX] account_payment_order: Assure partner bank account in payments
pedrobaeza Sep 11, 2024
b9d6dd5
[IMP] account_payment_order: test performance improvement
josep-tecnativa Oct 16, 2023
ea17677
account_payment_order: add button to view business document
sbidoul Aug 16, 2024
fbc3117
Translated using Weblate (Italian)
mymage Oct 3, 2024
eeedbae
[FIX] account_payment_order: add missing currency field on payment line
micheledic Nov 20, 2024
7c06e9e
[FIX] account_payment_order: fix ``TypeError``
SilvioC2C Nov 27, 2024
e8465f3
[IMP] account_payment_order: Shorten the vertical used space
pedrobaeza Dec 4, 2024
194bf61
[IMP] account_payment_order: Remove dependancies on demo data on tests
etobella Dec 23, 2024
43b8714
[MIG] account_payment_order: Migration to version 18.0
carlos-lopez-tecnativa Feb 6, 2025
f4962b0
[REM] account_payment_order: Removed unused fields.
carlos-lopez-tecnativa Mar 27, 2025
00d9634
[UPD] Update account_payment_order.pot
Apr 17, 2025
735a25a
[BOT] post-merge updates
OCA-git-bot Apr 17, 2025
de474cb
Translated using Weblate (French)
bonninguer Apr 19, 2025
329946b
Translated using Weblate (Italian)
mymage May 6, 2025
8d862db
Translated using Weblate (Italian)
mymage Jun 5, 2025
d5e6f22
[IMP] account_payment_order: read access for group_account_readonly
glitchov Feb 20, 2025
9fa183b
[BOT] post-merge updates
OCA-git-bot Jun 13, 2025
7d8253d
[UPD] Update account_payment_order.pot
Jun 30, 2025
ca00bbd
Update translation files
weblate Jun 30, 2025
7a53239
Translated using Weblate (Italian)
mymage Jul 1, 2025
f4eb651
[IMP] account_payment_order - Due on field in payment line wizard
baimont Jul 23, 2025
0fe9d51
[IMP] account_payment_order - one filter date in payment line wizard
baimont Jul 24, 2025
be6571e
[UPD] Update account_payment_order.pot
Jul 29, 2025
a8b0659
[BOT] post-merge updates
OCA-git-bot Jul 29, 2025
64cb6be
Update translation files
weblate Jul 29, 2025
5e23ecf
Translated using Weblate (Italian)
mymage Jul 30, 2025
9caee30
[IMP] account_payment_order: make part of generated2uploaded inheritable
baimont Sep 10, 2025
13a8aad
[BOT] post-merge updates
OCA-git-bot Sep 15, 2025
59551ed
[IMP] account_payment_order: pre-commit auto fixes
Alexgars73 Oct 14, 2025
5e83221
[MIG] account_payment_order : Migration to 19.0
Alexgars73 Oct 14, 2025
9830aa5
[DON'T MERGE] test-requirements.txt
Alexgars73 Oct 14, 2025
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
149 changes: 149 additions & 0 deletions account_payment_order/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
.. 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
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:72673b3679b6a9a9174d5a3d91206868d924cdcfde7226b60ede0f21b20f590d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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
: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/19.0/account_payment_order
: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-19-0/bank-payment-19-0-account_payment_order
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=19.0
:alt: Try me on Runboat

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

This module adds support for payment orders and debit orders.

**Table of contents**

.. contents::
:local:

Installation
============

This module depends on:

- account_payment_partner
- base_iban
- document

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

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

This module adds several options on Payment Modes, cf
Invoicing/Accounting > Configuration > Management > Payment Modes.

Usage
=====

You can create a Payment order via the menu Invoicing/Accounting >
Vendors > Payment Orders and then select the move lines to pay.

You can create a Debit order via the menu Invoicing/Accounting >
Customers > Debit Orders and then select the move lines to debit.

This module also adds an action *Add to Payment Order* on supplier
invoices and *Add to Debit Order* on customer invoices.

You can print a Payment order via the menu Invoicing/Accounting >
Vendors > Payment Orders and then select the payment oder to print.

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

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

* ACSONE SA/NV
* Therp BV
* Tecnativa
* Akretion

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

- Stéphane Bidoul <[email protected]>
- Alexis de Lattre <[email protected]>
- Adrien Peiffer <[email protected]>
- Stefan Rijnhart
- Laurent Mignon <[email protected]>
- Alexandre Fayolle
- Danimar Ribeiro
- Erwin van der Ploeg
- Raphaël Valyi
- Sandy Carter
- Angel Moya <[email protected]>
- Jose María Alzaga <[email protected]>
- Meyomesse Gilles <[email protected]>
- Denis Roussel <[email protected]>
- `DynApps <https://www.dynapps.be>`__:

- Raf Ven <[email protected]>

- Andrea Stirpe <[email protected]>
- `Jarsa <https://www.jarsa.com.mx>`__:

- Alan Ramos <[email protected]>

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

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

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

- Ammar Officewala <[email protected]>

- Marçal Isern <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_payment_order/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .hooks import pre_init_hook
from . import models
from . import report
from . import wizard
44 changes: 44 additions & 0 deletions account_payment_order/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<https://therp.nl>)
# © 2013-2014 ACSONE SA (<https://acsone.eu>).
# © 2016 Akretion (<https://www.akretion.com>).
# © 2016 Aselcis (<https://www.aselcis.com>).
# © 2014-2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).


{
"name": "Account Payment Order",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV, "
"Therp BV, "
"Tecnativa, "
"Akretion, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/bank-payment",
"development_status": "Mature",
"category": "Banking addons",
"depends": ["account_payment_mode", "base_iban"], # for manual_bank_tranfer
"data": [
"views/account_payment_method.xml",
"security/payment_security.xml",
"security/ir.model.access.csv",
"wizard/account_payment_line_create_view.xml",
"wizard/account_invoice_payment_line_multi_view.xml",
"wizard/account_payment_update_views.xml",
"views/account_payment_mode.xml",
"views/account_payment_views.xml",
"views/account_payment_order.xml",
"views/account_payment_line.xml",
"views/account_move_line.xml",
"views/ir_attachment.xml",
"views/account_invoice_view.xml",
"data/payment_seq.xml",
"report/print_account_payment_order.xml",
"report/account_payment_order.xml",
],
"demo": ["demo/payment_demo.xml"],
"installable": True,
"pre_init_hook": "pre_init_hook",
}
22 changes: 22 additions & 0 deletions account_payment_order/data/payment_seq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2015-2016 Akretion - Alexis de Lattre
Copyright 2019-2022 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="account_payment_line_seq" model="ir.sequence">
<field name="name">Payment Line</field>
<field name="code">account.payment.line</field>
<field name="prefix">P</field>
<field name="padding">5</field>
<field name="company_id" eval="False" />
</record>
<record id="account_payment_order_seq" model="ir.sequence">
<field name="name">Payment Order</field>
<field name="code">account.payment.order</field>
<field name="prefix">PAY</field>
<field name="padding">4</field>
<field name="company_id" eval="False" />
</record>
</odoo>
47 changes: 47 additions & 0 deletions account_payment_order/demo/payment_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record
id="account_payment_mode.payment_mode_outbound_dd1"
model="account.payment.mode"
>
<field name="payment_order_ok" eval="False" />
</record>
<record
id="account_payment_mode.payment_mode_outbound_dd2"
model="account.payment.mode"
>
<field name="payment_order_ok" eval="False" />
</record>
<record
id="account_payment_mode.payment_mode_inbound_ct1"
model="account.payment.mode"
>
<field name="payment_order_ok" eval="False" />
</record>
<record
id="account_payment_mode.payment_mode_inbound_ct2"
model="account.payment.mode"
>
<field name="payment_order_ok" eval="False" />
</record>
<record
id="account_payment_mode.payment_mode_outbound_ct1"
model="account.payment.mode"
>
<!-- Credit Transfer to Suppliers -->
<field
name="default_journal_ids"
search="[('type', 'in', ('purchase', 'purchase_refund'))]"
/>
</record>
<record
id="account_payment_mode.payment_mode_inbound_dd1"
model="account.payment.mode"
>
<!-- Direct Debit of customers -->
<field
name="default_journal_ids"
search="[('type', 'in', ('sale', 'sale_refund'))]"
/>
</record>
</odoo>
16 changes: 16 additions & 0 deletions account_payment_order/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from odoo.tools import sql


def pre_init_hook(env):
"""Prepare new partner_bank_id computed field.

Add column to avoid MemoryError on an existing Odoo instance
with lots of data.

partner_bank_id on account.move.line requires payment_order_ok to be True
which it won't be as it's newly introduced - nothing to compute.
(see AccountMoveLine._compute_partner_bank_id() in models/account_move_line.py
and AccountMove._compute_payment_order_ok() in models/account_move.py)
"""
if not sql.column_exists(env.cr, "account_move_line", "partner_bank_id"):
sql.create_column(env.cr, "account_move_line", "partner_bank_id", "int4")
Loading
Loading