Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] account_payment_order: Migration to 18.0 #1414

Open
wants to merge 178 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
d8b6033
Start to port bank-payment to v9 (with a lot of improvements) during …
alexis-via Apr 29, 2016
4cd5b31
[FIX+IMP] account_payment_order: 2 things:
sbidoul Jun 25, 2016
36d859c
Add support for multi-currency in the generation of the account move.
alexis-via Jun 29, 2016
cd61d32
[IMP] account_payment_order: Remove useless migration script
pedrobaeza Jul 1, 2016
ead51c6
Move the account_payment_mode ir.rule in account_payment_mode module
yvaucher Jul 5, 2016
c1e7b69
[FIX+IMP] account_payment_order: 2 more things:
sbidoul Jul 19, 2016
2f8bfad
[FIX] account_payment_order: 4 things:
alexis-via Jul 22, 2016
457f172
[IMP] set partner on offsetting account move line if possible
sbidoul Aug 24, 2016
97a0ef8
Reactivate company rules in account_payment_order
yvaucher Sep 8, 2016
0548e20
Port almost all modules to v10 (#305)
Oct 19, 2016
4ccaf05
[FIX] account_payment_order: Use 'index' instead of 'select'
adrienpeiffer Nov 21, 2016
48e2905
Remove internal_type=other restriction for transfer account (#311)
jalzaga Dec 8, 2016
7d7d815
Creation/Modification of bank info only for Account Payment group
alexis-via Jan 12, 2017
be0a165
[FIX] fill date instead off maturity date on account move line generated
vrenaville Feb 2, 2017
adfbca1
Fix 2 issues on form view for payment order
mdietrichc2c Mar 6, 2017
dd4ef6c
[FIX+IMP] account_payment_order:
alexis-via Apr 4, 2017
6b70b15
[IMP] account_payment_order: Don't allow deletion of an uploaded paym…
mdietrichc2c Jul 26, 2017
f83727c
[IMP] account_payment_order: Restriction + tests
grindtildeath Jul 27, 2017
316cd6c
[FIX] account_payment_order: Adapt test to v10
pedrobaeza Aug 2, 2017
6011b48
[IMP] account_payment_order: select partner bank account automatically.
adrienpeiffer Aug 11, 2017
9418873
[10.0]Fix payment method onchange with multicompany (#374)
grindtildeath Aug 28, 2017
0fb6fb6
[ADD] description field for payment order
GillesTephaneMeyomesse Jun 26, 2017
6b46957
[ADD] report for payment order (#370)
GillesTephaneMeyomesse Oct 10, 2017
e69d39c
[MIG] account_payment_order
etobella Oct 17, 2017
5b27863
When the user looks for open payables or receivables, in the
JordiBForgeFlow Oct 27, 2017
1bdd8de
[FIX] account_payment_order: Correct domain definition on account.pay…
pedrobaeza Dec 11, 2017
88085ef
[11.0][FIX] account_payment_order: printing report
astirpe Jan 22, 2018
4c752dc
[FIX] account_payment_order: Take payment mode from move (#466)
pedrobaeza May 1, 2018
c8c4f96
[FIX] account_payment_order: Add bank payment line multi-company rule
carlosdauden May 3, 2018
b6fdd61
Several small usability improvements
alexis-via May 22, 2018
bc95e3c
[FIX] report should show the invoice number, not the move name (#477)
etobella May 23, 2018
ebc0d7e
[FIX] account_payment_order: Fix FR translation
pedrobaeza Jun 20, 2018
e3eaafb
Translated using Weblate (Español (España))
etobella Jul 13, 2018
5d5f85a
[FIX] default_partner_id added on partner_bank if it is created.
etobella Aug 29, 2018
4850470
[10.0] Add filter on partners on wizard "Create Payment Lines from Jo…
Sep 2, 2018
bd4f6b3
[IMP] account_payment_order: Use bank.payment.line reference in Payme…
ecino Sep 4, 2018
639bba4
Fix structured communication
Martronic-SA Oct 12, 2018
cf6edb0
[12.0][mig] account_payment_order: Migrate to v12.0
sergio-teruel Nov 5, 2018
fb2e317
[MIG] account_payment_order: Finish migration to v12
pedrobaeza Dec 13, 2018
8c0cde3
[MIG] account_banking_sepa_direct_debit: Finish migration to 12.0
pedrobaeza Dec 14, 2018
d7d4a76
[REF] Account Payment Order: add Admin in security group
ThomasBinsfeld Dec 17, 2018
98a356a
[REF] Payment Order: better performance of draft2open method
ThomasBinsfeld Jan 17, 2019
7348398
[FIX] account_payment_order: Fix journal domain
pedrobaeza Feb 2, 2019
3f06339
[REF+IMP] account_payment_order: invoice addition + move generation +…
ThomasBinsfeld Feb 6, 2019
36c283b
[FIX] account_payment_order: wrong function name + report totals + re…
rubencr7 Apr 9, 2019
eeb18af
[REF] Payment Order: move all move preparation code in _prepare_move
ThomasBinsfeld Apr 10, 2019
c860f40
[12.0] [FIX] Failing test test_account_payment_02
rven Apr 23, 2019
423b9e6
Add indexes on account payment models
guewen May 7, 2019
5c1603f
[FIX] account_payment_error: Avoid singleton error in allowed_journal…
pedrobaeza Jun 26, 2019
be2b5c7
[FIX+IMP] account_payment_order: Make tests resilient + inbound inher…
pedrobaeza Aug 22, 2019
b065b85
[IMP] account_payment_order: Select first partner bank
carlosdauden Sep 10, 2019
db82ac8
[FIX] account_payment_order: Fix payment order report. Adapt to boots…
sergio-teruel Oct 29, 2019
c94ea6d
[FIX] account_payment_order: Sequences must be noupdate=1
pedrobaeza Oct 30, 2019
5d7540a
[FIX] account_payment_order: Restore colors in payment order tree view
pedrobaeza Dec 18, 2019
4fea8e6
[IMP] account_payment_order: change 'bill reference' column value in …
Feb 20, 2020
8451779
[IMP] account_payment_order: black, isort
rven Mar 12, 2020
137f539
[MIG] account_payment_order: Migration to 13.0
rven Mar 12, 2020
6b29cd9
[FIX] multicompany rule
astirpe Apr 10, 2020
a04bb0f
[IMP] account_payment_order: Print payment order in user lang if not …
pedrobaeza Feb 12, 2020
89d7748
[FIX] Set priority on alternate view
StefanRijnhart May 15, 2020
e698c6f
[FIX] account_payment_order: set partner_bank_id + order generation f…
ValentinVinagre Apr 22, 2020
12ef15a
Fix state condition on invoice view
alexis-via Jun 6, 2020
94dcdc2
[IMP] account_payment_order: move payment order menus
luc-demeyer Jul 24, 2020
ef253e2
[FIX] avoid cache miss in compute
astirpe Sep 11, 2020
d5d60e9
[MIG] account_payment_order: Migration to 14.0
alan196 Nov 14, 2020
0d37b35
[MIG] account_payment_order: Migration to v14
CarlosRoca13 Jan 5, 2021
0fb8735
[FIX] account_payment_order: Fix tests
joao-p-marques Feb 25, 2021
6865ce8
[FIX] account_payment_order: Fix tests
joao-p-marques Apr 14, 2021
f81a9b3
[FIX] account_payment_order: Computed non-stored fields needs always …
pedrobaeza Apr 15, 2021
3302ffe
[FIX] account_payment_order: Remove old migration scripts
pedrobaeza Apr 26, 2021
4cb89bc
[13.0][IMP] account_payment_order - move date should be bank line dat…
baimont Apr 21, 2021
876d0c9
[FIX] account_payment_order: Change security group category + Make po…
joao-p-marques May 17, 2021
eb106c9
[IMP]account_payment_order: payment date when adding transaction line
manuelregidor Jun 2, 2021
0daf747
[IMP] account_payment_order: Add hook method for finding previous pay…
AmmarOfficewalaSerpentCS Jul 6, 2021
e5949f9
[FIX] account_payment_order: Bind report to model
iammiracle Aug 20, 2021
ecb7745
[FIX] account_payment_order: Fix multi-company issues in tests
joao-p-marques Sep 14, 2021
d188113
[IMP] account_payment_order: computation of sepa + remove done state …
alexis-via Jun 8, 2021
2883eee
[MIG] account_payment_order: Migration to 15.0
misern2 Dec 14, 2021
610b3bf
account_payment_order: communication required in form view
alexis-via Feb 16, 2022
e1f4003
[IMP] account_payment_order: don't requiere reference_type anymore
MiquelRForgeFlow Mar 8, 2022
1c64fd3
[IMP] account_payment_order: Promote to Mature
etobella Apr 21, 2022
98cb0fd
[FIX] account_payment_order: Don't fail due to tz
pedrobaeza Apr 22, 2022
c0e2101
[FIX] account_payment_order: Fix tests
ramiadavid Jul 6, 2022
a59d9e3
[FIX] account_payment_order: fix action returned by create_account_pa…
alexis-via Aug 10, 2022
894f4f4
[FIX] Restore payment order number in account move line label.
adrienpeiffer Sep 26, 2022
1ae083a
[IMP]account_payment_order: Add activities to account.payment.order m…
manuelregidor Oct 27, 2022
de82852
[FIX] account_payment_order: Error in Batch Payments when deleting a …
antony-psc Dec 15, 2022
7c34d00
Add pre_init_hook to add computed column
dannyadair Feb 22, 2023
b4dec11
[IMP] account_payment_order: outbound inheritable + SavepointCase
celm1990 Jan 16, 2022
a7ccded
[FIX] account_payment_order: Proper indentation for test + make it work
pedrobaeza Jan 17, 2022
8045365
[IMP] account_payment_order: Better communication field management
rousseldenis Apr 14, 2022
bd4e925
[FIX] account_payment_order: Fallback to payment_ref if ref is undefined
driehuis Mar 18, 2022
488bc68
[IMP] account_payment_order: add link to payment order in chatter
alexis-via Nov 8, 2022
7f9627f
[REF+IMP] account_payment_order: Use native payments
pedrobaeza Nov 6, 2022
9465f41
[FIX] account_payment_order: Do correctly the fix on tests
pedrobaeza Mar 4, 2023
58bb2de
[I18N] account_payment_order: Better translations for de_DE
wpichler Feb 22, 2023
09e63c9
[MIG] account_payment_order: Migration to 16.0
wpichler Oct 25, 2022
473c524
[FIX] account_payment_order: create lines with same sequence name
Reyes4711-S73 Apr 5, 2023
4c731ce
[IMP] account_payment_order: Concatenate all UserError messages
Feb 17, 2023
44c453f
[FIX] Fixed Payment Transaction view
Nikul-OSI Apr 25, 2023
7de1683
[FIX] account_payment_order: treet2 > street2
pedrobaeza Apr 25, 2023
e0f2275
[FIX] account_payment_order: Set payment method line for account.payment
pedrobaeza May 11, 2023
1b323e7
[FIX] account_payment_order Allow to download file in edit mode
Yadier-Tecnativa Jul 7, 2023
f28e936
[IMP] account_payment_order: Add a custom message if the invoice does…
victoralmau Jul 24, 2023
bda4cda
[FIX+IMP] account_payment_order: Better error messages on "Add to order"
pedrobaeza Aug 18, 2023
df15d96
[FIX] account_payment_order: change result_payorder_ids to list to sh…
celm1990 Jan 4, 2023
175bd0a
[FIX] account_payment_order: Add extra form view only to avoid open m…
victoralmau Sep 22, 2023
46a6504
[FIX] account_payment_order: Add colspan=2 to a correct visualization
victoralmau Sep 22, 2023
38049fb
[IMP] account_payment_order: Add payment_ref field to account.payment…
victoralmau Sep 19, 2023
c81edd4
[FIX] account_payment_order: Define the value of the communication fi…
victoralmau Sep 19, 2023
94bc876
Add warning when payment order is not SEPA
alexis-via Sep 27, 2023
1866e99
[IMP]grouped invoices: " - ".join in stead of "-".join
luc-demeyer Nov 4, 2023
40474f8
[IMP] account_payment_order: add payment lines smart button on invoice
luc-demeyer Jun 23, 2023
40fef3d
[FIX] account_payment_order: Restrict payment lines button to payment…
pedrobaeza Nov 14, 2023
f5d6a4e
[FIX] account_payment_order: Always return a string in the _get_payme…
victoralmau Nov 27, 2023
c0846e0
[IMP] account_payment_order: pre-commit auto fixes
ramiadavid Jan 13, 2024
72f0ecc
[MIG] account_payment_order: Migration to 17.0
ramiadavid Jan 13, 2024
94bcb37
[UPD] Update account_payment_order.pot
Feb 29, 2024
2f4a8f7
[BOT] post-merge updates
OCA-git-bot Feb 29, 2024
c31d4cc
Update translation files
weblate Feb 29, 2024
0435438
Translated using Weblate (Italian)
mymage Feb 29, 2024
07e60a5
Translated using Weblate (Italian)
mymage Mar 1, 2024
14df644
Translated using Weblate (Italian)
mymage Mar 1, 2024
0238d34
[IMP] account_banking_mandate: pre-commit auto fixes
ramiadavid Mar 2, 2024
afbf265
Translated using Weblate (Italian)
mymage Mar 4, 2024
7f7a83b
[FIX] account_payment_order: exclude cancel journal entries
alexis-via Apr 9, 2024
393ae27
[BOT] post-merge updates
OCA-git-bot Apr 9, 2024
08cb186
[FIX][17.0] Fix dynamic domain
ramiadavid Apr 7, 2024
1854e56
[UPD] Update account_payment_order.pot
Apr 10, 2024
87a52d0
[BOT] post-merge updates
OCA-git-bot Apr 10, 2024
d2a52d0
Update translation files
weblate Apr 10, 2024
c30fa34
Translated using Weblate (Italian)
mymage Apr 11, 2024
d9fb99b
Translated using Weblate (Italian)
mymage Apr 16, 2024
28f567f
Translated using Weblate (Spanish)
Ivorra78 Apr 23, 2024
f008f33
Translated using Weblate (Swedish)
jakobkrabbe Jun 5, 2024
eb17857
[IMP] account_payment_order: Mark invoices in a payment order as in p…
pedrobaeza May 28, 2024
f5a2ba7
[IMP] account_payment_order: update payment reference on open payment…
luc-demeyer Jun 23, 2023
ddc9e23
[UPD] Update account_payment_order.pot
Jun 10, 2024
43d341b
[BOT] post-merge updates
OCA-git-bot Jun 10, 2024
e6dd3f7
Update translation files
weblate Jun 10, 2024
4447986
Translated using Weblate (Italian)
mymage Jun 12, 2024
04ad740
[BOT] post-merge updates
OCA-git-bot Jul 1, 2024
c3b0073
[IMP] account_payment_order: Add Transfer moves dates
victoralmau Jun 12, 2024
f9a7880
[IMP] account_payment_order: Apply readonly=True to Payment Date fiel…
victoralmau Jun 17, 2024
69f57d0
[BOT] post-merge updates
OCA-git-bot Jul 3, 2024
82a000a
[FIX] account_payment_order: add missing option "structured" to payme…
sbejaoui Jul 9, 2024
770ee56
[IMP] account_payment_order*: Define the correct date in the files th…
victoralmau Jul 8, 2024
5bedc0f
[UPD] Update account_payment_order.pot
Jul 16, 2024
0a7fb5e
Update translation files
weblate Jul 16, 2024
d33c2c2
[UPD] Update account_payment_order.pot
Aug 9, 2024
1852aa2
[BOT] post-merge updates
OCA-git-bot Aug 9, 2024
674783d
Update translation files
weblate Aug 9, 2024
b01a2ad
Translated using Weblate (Italian)
mymage Aug 12, 2024
313a43d
[UPD] Update account_payment_order.pot
Aug 14, 2024
de00e77
[BOT] post-merge updates
OCA-git-bot Aug 14, 2024
9000fa2
Update translation files
weblate Aug 14, 2024
0592375
Translated using Weblate (Italian)
mymage Aug 16, 2024
5115318
[FIX] account_payment_order: Assure partner bank account in payments
pedrobaeza Sep 11, 2024
ea56ff5
[BOT] post-merge updates
OCA-git-bot Sep 17, 2024
b3a4c4f
[IMP] account_banking_mandate: test performance improvement
josep-tecnativa Oct 16, 2023
b220a40
[IMP] account_payment_order: test performance improvement
josep-tecnativa Oct 16, 2023
224368f
[BOT] post-merge updates
OCA-git-bot Sep 20, 2024
f93b804
account_payment_order: add button to view business document
sbidoul Aug 16, 2024
48a0b27
[MIG] account_payment_order: migration of view button
sbidoul Oct 1, 2024
7449591
[UPD] Update account_payment_order.pot
Oct 1, 2024
e7e61b3
[BOT] post-merge updates
OCA-git-bot Oct 1, 2024
f7c57ed
Update translation files
weblate Oct 1, 2024
bb0b77c
Translated using Weblate (Italian)
mymage Oct 3, 2024
e709781
Translated using Weblate (Italian)
mymage Oct 22, 2024
1f48202
[FIX] account_payment_order: add missing currency field on payment line
micheledic Nov 20, 2024
7357562
[BOT] post-merge updates
OCA-git-bot Nov 22, 2024
0f14368
[FIX] account_payment_order: fix ``TypeError``
SilvioC2C Nov 27, 2024
a30744d
[BOT] post-merge updates
OCA-git-bot Nov 28, 2024
3c1b085
[IMP] account_payment_order: Shorten the vertical used space
pedrobaeza Dec 4, 2024
b238dcf
[BOT] post-merge updates
OCA-git-bot Dec 5, 2024
8550469
[IMP] account_payment_order: Remove dependancies on demo data on tests
etobella Dec 23, 2024
15ff039
[IMP] account_payment_order: pre-commit auto fixes
absal-smile Feb 6, 2025
99c4600
[MIG] mig-account_payment_order: Migration to 18.0
absal-smile Feb 6, 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
144 changes: 144 additions & 0 deletions account_payment_order/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
=====================
Account Payment Order
=====================

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

.. |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/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/18.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-18-0/bank-payment-18-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=18.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:%2018.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

- `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/18.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": "18.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_partner", "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