Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
8ddb604
Add 4 new modules to handle payment type and bank accounts:
Feb 24, 2014
2517ac2
Launchpad automatic translations update.
Jun 27, 2014
cf59759
[MIG] account_payment_partner: Migration to v8
pedrobaeza Sep 10, 2014
c58f4c6
[FIX+IMP] account_payment_partner: 2 things:
rlizana Nov 27, 2014
e244f30
[IMP] account_payment_partner: Several things:
Jan 14, 2015
6193ed2
Portuguese translations
danimaribeiro Feb 13, 2015
d3d3012
Add read access on payment.mode to employees
Mar 16, 2015
56a2943
[FIX] account_payment_partner: Fix for finding account move lines wit…
pedrobaeza Mar 9, 2015
e70b36f
[IMP] Expand authors + manifest cleaning
pedrobaeza May 25, 2015
b785321
Add requested descriptions in an OCA README.rst file
phschmidt Jun 1, 2015
f997bf9
ADD description on payment mode and show it on invoice report
Jul 2, 2015
0e99948
[RFR] decorate overridable methods in wizard as api.multi
hbrunn Jul 8, 2015
a5425f8
[FIX+IMP] account_payment_partner: Several things:
alexis-via Oct 19, 2015
9fa50fa
[IMP] account_payment_partner: Several things
pedrobaeza Feb 15, 2016
0869cb6
[MIG] account_payment_partner: Start to port bank-payment to v9 (with…
alexis-via Apr 29, 2016
eb7bc8d
OCA Transbot updated translations from Transifex
oca-transbot Apr 9, 2016
4a5d841
Port almost all modules to v10 (#305)
Oct 19, 2016
75ed980
[IMP] account_payment_partner: Several things:
pedrobaeza Apr 2, 2017
61ff03c
OCA Transbot updated translations from Transifex
oca-transbot Sep 17, 2016
af30fb8
[MIG] account_payment_partner
etobella Oct 17, 2017
2c88bf3
add tests and small fixes
JordiBForgeFlow Oct 22, 2017
1dcf78f
OCA Transbot updated translations from Transifex
oca-transbot Nov 25, 2017
1313141
[FIX] account_payment_partner: impossible to define if there was no c…
oihane Jan 17, 2018
003a5c1
[FIX] Fix issue when the bank_id of partner_bank_id is not set (field…
acsonefho Feb 12, 2018
84565c0
[11.0][FIX] account_payment_partner: onchange if more than one bank
astirpe Jan 22, 2018
4d1f026
[CHG] account_payment_partner: Prevent to delete bank account linked …
Dec 4, 2017
e6896e6
OCA Transbot updated translations from Transifex
oca-transbot May 26, 2018
9639dac
Translated using Weblate (Español (España))
etobella Jul 13, 2018
49c46d7
[FIX+IMP] account_payment_partner: Fix invoice bank account assignati…
carlosdauden Mar 15, 2018
2aed5c3
[IMP] account_payment_partner: Add several tests
cubells Dec 3, 2018
077f218
[MIG] account_payment_partner: Adapt tests + code to latest version
pedrobaeza Dec 4, 2018
9c2a7b9
[MIG] account_payment_partner: migrate to 12.0
mourad-ehm Oct 2, 2018
9f57135
[MIG] account_payment_partner: Fix tests for new version
pedrobaeza Dec 13, 2018
0cd35ca
[UPD] Update account_payment_partner.pot
oca-travis Dec 13, 2018
12747f1
[MIG] account_banking_pain_base: Migration to 12.0
pedrobaeza Dec 14, 2018
9b40619
Update translation files
oca-transbot Dec 29, 2018
2daea35
Translated using Weblate (Catalan)
Mar 15, 2019
ff3e802
Update invoice_supplier_form view
altoch Jan 27, 2019
9a083ea
Add indexes on account payment models
guewen May 7, 2019
7c534e7
[FIX] test_invoice_refund
rven Jul 15, 2019
10c645d
Translated using Weblate (Catalan)
Oct 4, 2019
f64338f
[IMP] account_payment_partner: black, isort
rven Nov 8, 2019
fcefcf3
[MIG] account_payment_partner: Migration to 13.0
rven Dec 19, 2019
a3f02ee
Update translation files
oca-transbot Jan 31, 2020
313a74d
[MIG] account_payment_sale: Migration to 13.0
rven Jan 31, 2020
8497a1f
pre-commit update
OCA-git-bot Mar 14, 2020
b818e78
[IMP] account_payment_purchase: black, isort
MiquelRForgeFlow Jan 29, 2020
a6ba093
[MIG] account_payment_purchase: Migration to 13.0
MiquelRForgeFlow Jan 29, 2020
d7645e7
[FIX] account_payment_partner: payment_mode_id default not set for Re…
atchuthan Apr 2, 2020
b398878
Added translation using Weblate (Spanish (Argentina))
ibuioli Aug 6, 2020
76db01d
Update translation files
oca-transbot Aug 16, 2020
9c5f571
[IMP] account_payment_partner: black, isort, prettier
misern2 Oct 16, 2020
d6a114c
[MIG] account_payment_partner: Migration to 14.0
misern2 Oct 17, 2020
ad77ad1
account_payment_partner: FIX form view of account.move
alexis-via Dec 26, 2020
9a79565
Update translation files
oca-transbot Feb 4, 2021
c6eabe4
[FIX] account_payment_partner: Set correct journals in tests to preve…
victoralmau Mar 12, 2021
03971f9
Translated using Weblate (Spanish (Argentina))
ibuioli Apr 1, 2021
24c0357
Added translation using Weblate (French (France))
Yvesldff Apr 10, 2021
dc3221f
[FIX] account_payment_partner: Fix tests
joao-p-marques Apr 14, 2021
e443043
Translated using Weblate (Dutch)
bosd Apr 17, 2021
58b5ff2
Translated using Weblate (Spanish)
Apr 18, 2021
1df10c1
Added translation using Weblate (Spanish (Chile))
Apr 18, 2021
3300936
Translated using Weblate (Dutch)
bosd Apr 22, 2021
c176189
[IMP] account_payment_partner: Add refund_payment_mode_id to assign a…
victoralmau May 4, 2021
7b456f4
[IMP] account_payment_partner: Add refund_payment_mode_id to set in r…
victoralmau May 25, 2021
240150b
Update translation files
oca-transbot May 30, 2021
e10f571
Translated using Weblate (Spanish (Argentina))
ibuioli May 30, 2021
32cb321
[FIX] account_payment_partner: _compute_invoice_partner_bank isn't ex…
carlosdauden Jul 8, 2021
85c9488
[14.0][FIX] account_payment_partner: pass invoice_partner_bank_id cor…
JordiMForgeFlow Jul 30, 2021
88413d1
[IMP] account_payment_partner: Add Payment mode to Invoices Analysis
victoralmau Aug 18, 2021
ef88a61
Update translation files
oca-transbot Aug 23, 2021
ea97008
Translated using Weblate (Spanish (Argentina))
ibuioli Aug 29, 2021
d01e8ff
[FIX] account_payment_partner: Set the correct value of payment_mode_id
victoralmau Sep 17, 2021
22a7ce1
Added translation using Weblate (Portuguese)
pedrocs-exo Oct 25, 2021
94db786
account_payment_partner: add optional="hide" on payment mode in invoi…
alexis-via Jul 3, 2021
c101117
Update test suite
alexis-via Nov 2, 2021
077fbb0
Added translation using Weblate (Italian)
francesco-ooops Nov 4, 2021
8d5561a
Added translation using Weblate (Swedish)
simonstromb Nov 17, 2021
ce3a071
[IMP] account_payment_partner: black, isort, prettier
misern2 Nov 24, 2021
935f166
[MIG] account_payment_partner: Migration to 15.0
misern2 Dec 2, 2021
c539b61
[FIX] account_payment_partner: only use bank_account_required in bills
MiquelRForgeFlow Mar 8, 2022
fb548c4
Translated using Weblate (Catalan)
juliap98 Mar 29, 2022
2ad987d
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
e5d4767
[IMP] account_payment_partner: Promote to Mature
etobella Apr 21, 2022
957ee63
[FIX] account_payment_partner: Fix tests
ramiadavid Jul 6, 2022
4de05c8
[FIX] account_payment_partner: Fix multi-company issues
joao-p-marques Mar 26, 2021
384bb12
[FIX] company in payment_mode_id domain
felipemotter Jul 16, 2022
974834b
[MIG] account_payment_partner: Migration to 16.0
ThomasBinsfeld Oct 11, 2022
693d042
[FIX] account_payment_partner: fix error in _reverse_moves
ramiadavid Jan 2, 2023
3d94e56
Translated using Weblate (Croatian)
badbole Jan 4, 2023
2ac7039
[IMP] account_payment_partner: Make payment mode editable on journal …
pedrobaeza Oct 7, 2022
db35e7e
[IMP] account_payment_partner: Make payment mode editable on entry
pedrobaeza Jan 18, 2023
9a6e3ed
Update translation files
weblate Jan 25, 2023
a2ac8a1
Add pre_init_hook to add computed columns
dannyadair Feb 23, 2023
91f4cb0
Translated using Weblate (Spanish)
Gelo-fl Apr 12, 2023
fa7bf16
[FIX] account_payment_partner: bad application of attributes on the f…
RodrigoBM Apr 13, 2023
46ef729
account_payment_partner: Fix computation of partner_bank_id
grindtildeath Jun 6, 2023
77dccff
Translated using Weblate (French)
remi-filament Jun 29, 2023
5b5b0d6
[FIX] account_payment_partner: fetchPreloadedData bug using selection…
ljsalvatierra-factorlibre Jul 26, 2023
ccc926b
[IMP] account_payment_partner: pre-commit auto fixes
miquelalzanillas Nov 22, 2023
8771e7b
[MIG] account_payment_partner: Migration to 17.0
miquelalzanillas Nov 22, 2023
740076a
Translated using Weblate (Italian)
mymage Feb 13, 2024
d0a0b1c
[17.0][FIX] account_payment_partner: DeprecationWarning: XML declarat…
zuher83 May 27, 2024
5e8fcfe
Translated using Weblate (Swedish)
jakobkrabbe Jun 5, 2024
cf4e20d
[IMP] account_payment_partner: test performance improvement
josep-tecnativa Oct 16, 2023
ba8127f
[FIX] account_payment_partner: payment mode compute
ljsalvatierra-factorlibre Mar 19, 2024
2b97829
Translated using Weblate (Italian)
mymage Oct 17, 2024
7add41a
[FIX] account_payment_partner: Error when salesperson tries to print …
CarlosRoca13 Aug 5, 2021
52c0b1d
[FIX] account_payment_partner: Fix tests compatibility (hr_expense + …
victoralmau Nov 19, 2024
93f91dc
[IMP] account_payment_partner: Remove dependancies on demo data on tests
etobella Dec 23, 2024
c81a8e4
[FIX] account_payment_partner: Fix tests
etobella Jan 15, 2025
d402382
[IMP] account_payment_partner: pre-commit auto fixes
absal-smile Feb 7, 2025
0756390
[MIG] account_payment_partner: Migration to 18.0
absal-smile Mar 26, 2025
65f6964
[MIG] account_payment_partner: Migration to version 18.0
carlos-lopez-tecnativa Mar 26, 2025
5976f50
[IMP] account_payment_partner: Add a security group to display the de…
carlos-lopez-tecnativa Mar 26, 2025
3375872
[REM] account_payment_partner: remove code related to account_banking…
carlos-lopez-tecnativa Apr 16, 2025
1c98867
[UPD] Update account_payment_partner.pot
Apr 16, 2025
2fdf54c
[BOT] post-merge updates
OCA-git-bot Apr 16, 2025
82c5c03
[18.0][FIX] : fix column_invisible in list view view_move_line_tree
Apr 25, 2025
0bfe6a9
[BOT] post-merge updates
OCA-git-bot Apr 26, 2025
1401c77
[OU-ADD] account_payment_partner: add migration script for v18.0
remi-filament Aug 14, 2025
4ab9354
[ADD] acocunt_payment_mode: Start to port bank-payment to v9 (with a …
alexis-via Apr 29, 2016
73e057b
Move the account_payment_mode ir.rule in account_payment_mode module
yvaucher Jul 5, 2016
7c9c34b
OCA Transbot updated translations from Transifex
oca-transbot Jul 2, 2016
4dd3497
Port almost all modules to v10 (#305)
Oct 19, 2016
f7db811
OCA Transbot updated translations from Transifex
oca-transbot Sep 17, 2016
da3ec2b
[FIX] account_payment_*: 2 fixes
grindtildeath Aug 28, 2017
9c43d8d
[MIG] account_payment_mode
etobella Oct 11, 2017
58bc8cd
Better constraints for multicompany environments.
JordiBForgeFlow Oct 11, 2017
f742b42
[FIX+IMP] account_payment_mode: Several small usability improvements …
Apr 14, 2018
be7a5da
OCA Transbot updated translations from Transifex
oca-transbot Nov 25, 2017
4bbfacb
Translated using Weblate (Español (España))
etobella Jul 13, 2018
6c53a77
[MIG] account_payment_mode: migrate to 12.0
mourad-ehm Oct 2, 2018
ce3871f
[UPD] Update account_payment_mode.pot
oca-travis Dec 13, 2018
321bb5c
[FIX] account_payment_mode: Don't show 2 times acc_type in partner ba…
pedrobaeza Jan 27, 2019
15f6db3
[11.0][FIX] account_payment_mode res.partner view banks group attribute
Jan 22, 2019
62d97e1
[FIX] account_payment_mode: Don't change acc_type field type
pedrobaeza Feb 2, 2019
6452cd5
Translated using Weblate (Catalan)
May 27, 2019
57ffbab
[MIG] account_payment_mode: Migration to 13.0
lembregtse Oct 1, 2019
ae30092
[IMP] account_payment_mode: black, isort
rven Nov 8, 2019
0a2d5e1
[MIG] account_payment_mode: Migration to 13.0
rven Nov 8, 2019
f1cdcc4
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Dec 13, 2019
94f00c3
Update translation files
oca-transbot Jan 23, 2020
e1d33d2
pre-commit update
OCA-git-bot Mar 14, 2020
47ab2db
[IMP] account_payment_purchase: black, isort
MiquelRForgeFlow Jan 29, 2020
9306d64
[MIG] account_payment_purchase: Migration to 13.0
MiquelRForgeFlow Jan 29, 2020
3c02612
[FIX] multicompany rule
astirpe Apr 9, 2020
ef84613
Remove obsolete company_partner_id
May 14, 2020
99b4d9b
Update translation files
oca-transbot May 14, 2020
72f0c3e
Added translation using Weblate (Spanish (Argentina))
ibuioli Aug 7, 2020
d6b1ed5
Update "development_status": "Production/Stable"
rafaelbn Oct 15, 2020
001201c
[MIG] account_payment_mode from v13 to v14
alexis-via Oct 16, 2020
9f8c910
Added translation using Weblate (French (France))
Yvesldff Apr 10, 2021
0fe530d
Added translation using Weblate (Spanish (Chile))
Apr 18, 2021
41447ea
Translated using Weblate (Spanish)
Apr 18, 2021
33b5b54
account_payment_mode: use _check_company_auto = True on account.payme…
alexis-via Dec 26, 2020
85244b7
Update translation files
oca-transbot Apr 21, 2021
a0493e2
Translated using Weblate (Dutch)
bosd Apr 22, 2021
b094303
Translated using Weblate (Spanish (Argentina))
ibuioli Apr 24, 2021
e1b5f62
Translated using Weblate (French)
Yvesldff Apr 27, 2021
8c9c7b7
Translated using Weblate (Portuguese)
pedrocs-exo Oct 25, 2021
0f7b86b
account_payment_mode: allow cash journals
alexis-via Aug 27, 2021
a1b0f95
Update test suite
alexis-via Nov 2, 2021
e46a976
Translated using Weblate (Italian)
francesco-ooops Nov 4, 2021
1065728
Translated using Weblate (Catalan)
jabelchi Nov 8, 2021
dda9f21
Added translation using Weblate (Swedish)
simonstromb Nov 12, 2021
6cee73b
[MIG] account_payment_mode: Migration to 15.0
misern2 Nov 24, 2021
1a50511
[IMP] account_payment_mode: Promote to Mature
etobella Apr 21, 2022
140c545
[MIG] account_payment_mode: Migration to 16.0
ThomasBinsfeld Oct 10, 2022
7c63cd1
Update translation files
weblate Oct 20, 2022
2ba63fb
account_payment_mode: add sequence on payment mode
alexis-via Mar 2, 2023
877eca9
Update translation files
weblate Mar 3, 2023
1f78c4b
Translated using Weblate (Spanish)
Gelo-fl Jun 2, 2023
96ad999
Translated using Weblate (Italian)
mymage Jun 5, 2023
6ac5265
[FIX] account_payment_mode: increase note field size
pausanchezqubiq Jun 6, 2023
8e053ce
[FIX] account_payment_mode: filter out unique payment methods in _def…
astirpe Apr 28, 2023
a766ac7
Translated using Weblate (Italian)
mymage Jun 7, 2023
72cd95d
Translated using Weblate (French)
remi-filament Jun 29, 2023
5316bd3
Translated using Weblate (Italian)
francesco-ooops Jul 12, 2023
1e1ab34
Update translation files
weblate Oct 10, 2023
9e51495
[IMP] account_payment_mode: pre-commit auto fixes
miquelalzanillas Nov 22, 2023
d704395
[MIG] account_payment_mode: Migration to 17.0
miquelalzanillas Nov 22, 2023
674f7b3
Update translation files
weblate Feb 3, 2024
e519d82
Translated using Weblate (Swedish)
jakobkrabbe Jun 5, 2024
c60db4f
[FIX] account_payment_mode: Remove XML header in HTML
pedrobaeza Jul 17, 2024
e094a08
[17.0][FIX] account_payment_mode: error when payment mode
imlopes Jul 8, 2024
c41a647
Translated using Weblate (Italian)
mymage Feb 4, 2024
b1d2b2f
[IMP] account_payment_mode: test performance improvement
josep-tecnativa Oct 16, 2023
0a69b07
[MIG] account_payment_mode: Migration to 18.0
BertVGroenendael Oct 15, 2024
bb7b74b
[IMP] account_payment_mode: change type of payment_mode.note field fr…
clementthomas Sep 26, 2024
88b7d94
[UPD] Update account_payment_mode.pot
Apr 16, 2025
4f3de21
[BOT] post-merge updates
OCA-git-bot Apr 16, 2025
e3e8fa8
[FIX] account_payment_mode: test should only be executed after all mo…
xaviedoanhduy May 16, 2025
7f50971
[BOT] post-merge updates
OCA-git-bot May 17, 2025
ffcd12b
Translated using Weblate (Italian)
mymage Jun 5, 2025
e21d661
[MIG] account_payment_mode: Migration to 19.0 and Merged account_paym…
bizzappdev Oct 10, 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
151 changes: 151 additions & 0 deletions account_payment_mode/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================
Account Payment Mode
====================

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

.. |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_mode
: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_mode
: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 a new object *account.payment.mode*, that is used to
better classify and route incoming/outgoing payment orders with the
banks. This module adds several fields:

- the *Supplier Payment Mode* and *Customer Payment Mode* on Partners,
- the *Payment Mode* on Invoices.
- the *Show bank account* on Payment Mode.
- the *# of digits for customer bank account* on Payment Mode.
- the *Bank account from journals* on Payment Mode.
- the *Payment mode* on Invoices Analysis.

On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices
will be filtered per Payment Mode.

Allows to print in the invoice to which account number the payment (via
SEPA direct debit) is going to be charged so the customer knows that
information, but there are some customers that don't want that everyone
looking at the invoice sees the full account number (and even GDPR can
say a word about that), so that's the reason behind the several options.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to go to the menu
*Invoicing/Accounting > Configuration > Management > Payment Modes*.

Usage
=====

This module provides the foundation for managing payment modes and
integrates them directly with partners and invoices.

You are able to add a payment mode directly on a partner.

This payment mode is automatically associated to the invoice related to
the partner. This default value could be changed in a draft invoice.

When you create a payment order, only invoices related to chosen payment
mode are displayed.

Invoices without any payment mode are displayed too.

Changelog
=========

10.0.1.2.0 (2018-05-24)
-----------------------

- [IMP] Add options to show partner bank account in invoice report
(`#458 <https://github.com/OCA/bank-payment/issues/458>`__)

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_mode%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
-------

* Akretion
* Tecnativa

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

- Alexis de Lattre <[email protected]>
- Eric Lembregts <[email protected]>
- Andrea Stirpe <[email protected]>
- Bert Van Groenendael <[email protected]>
- Raphaël Valyi
- Stefan Rijnhart (Therp)
- Alexandre Fayolle
- Stéphane Bidoul <[email protected]>
- Danimar Ribeiro
- Angel Moya <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Carlos Dauden
- Víctor Martínez

- `DynApps <https://www.dynapps.be>`__:

- Raf Ven <[email protected]>

- Marçal Isern <[email protected]>
- Miquel Alzanillas <[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_mode>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions account_payment_mode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from .hooks import pre_init_hook
from . import models
from . import reports
31 changes: 31 additions & 0 deletions account_payment_mode/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2016-2020 Akretion France (<https://www.akretion.com>)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Account Payment Mode",
"version": "19.0.1.0.0",
"development_status": "Mature",
"license": "AGPL-3",
"summary": "Adds payment mode on partners and invoices",
"author": "Akretion, Tecnativa,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/bank-payment",
"category": "Banking addons",
"depends": ["account"],
"data": [
"security/account_payment_partner_security.xml",
"security/account_payment_mode.xml",
"security/ir.model.access.csv",
"views/res_partner_view.xml",
"views/account_move_view.xml",
"views/account_move_line.xml",
"views/account_payment_method.xml",
"views/account_payment_mode.xml",
"views/account_journal.xml",
"views/report_invoice.xml",
"reports/account_invoice_report_view.xml",
],
"demo": ["demo/payment_demo.xml", "demo/partner_demo.xml"],
"installable": True,
"pre_init_hook": "pre_init_hook",
}
25 changes: 25 additions & 0 deletions account_payment_mode/demo/partner_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<function
model="ir.default"
name="set"
eval="(
'res.partner',
'supplier_payment_mode_id',
ref('account_payment_mode.payment_mode_outbound_ct1'),
False,
ref('base.main_company')
)"
/>
<function
model="ir.default"
name="set"
eval="(
'res.partner',
'customer_payment_mode_id',
ref('account_payment_mode.payment_mode_inbound_ct1'),
False,
ref('base.main_company')
)"
/>
</odoo>
110 changes: 110 additions & 0 deletions account_payment_mode/demo/payment_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="bank_fiducial" model="res.bank">
<field name="name">Fiducial Banque</field>
<field name="bic">FIDCFR21XXX</field>
<field name="street">38 rue Sergent Michel Berthet</field>
<field name="zip">69009</field>
<field name="city">Lyon</field>
<field name="country" ref="base.fr" />
</record>
<record id="bank_la_banque_postale" model="res.bank">
<field name="name">La Banque Postale</field>
<field name="bic">PSSTFRPPXXX</field>
<field name="street">115 rue de Sèvres</field>
<field name="zip">75007</field>
<field name="city">Paris</field>
<field name="country" ref="base.fr" />
</record>
<record id="bank_societe_generale" model="res.bank">
<field name="name">Société Générale</field>
<field name="bic">SOGEFRPPXXX</field>
<field name="street">1 avenue du Roi Fabien 1er</field>
<field name="zip">75008</field>
<field name="city">Paris</field>
<field name="country" ref="base.fr" />
</record>
<record id="bank_fortis" model="res.bank">
<field name="name">BNP Paribas Fortis Charleroi</field>
<field name="bic">GEBABEBB03A</field>
<field name="city">Charleroi</field>
<field name="country" ref="base.be" />
</record>
<record id="main_company_iban" model="res.partner.bank">
<field name="acc_number">FR76 4242 4242 4242 4242 4242 424</field>
<field name="bank_id" ref="bank_la_banque_postale" />
<field name="partner_id" ref="base.main_partner" />
</record>
<record id="main_company_iban2" model="res.partner.bank">
<field name="acc_number">FR20 1242 1242 1242 1242 1242 124</field>
<field name="bank_id" ref="bank_societe_generale" />
<field name="partner_id" ref="base.main_partner" />
</record>
<record id="res_partner_12_iban" model="res.partner.bank">
<field name="acc_number">FR66 1212 1212 1212 1212 1212 121</field>
<field name="bank_id" ref="bank_fiducial" />
<field name="partner_id" ref="base.res_partner_12" />
</record>
<record id="res_partner_2_iban" model="res.partner.bank">
<field name="acc_number">BE96 9988 7766 5544</field>
<field name="bank_id" ref="bank_fortis" />
<field name="partner_id" ref="base.res_partner_2" />
</record>
<!-- Asustek already has a demo IBAN provided by base_iban -->
<record id="payment_mode_outbound_ct1" model="account.payment.mode">
<field name="name">Credit Transfer to Suppliers</field>
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<field
name="payment_method_id"
ref="account.account_payment_method_manual_out"
/>
</record>
<record id="payment_mode_outbound_dd1" model="account.payment.mode">
<field name="name">Direct Debit of suppliers from Société Générale</field>
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<field
name="payment_method_id"
ref="account.account_payment_method_manual_out"
/>
</record>
<record id="payment_mode_outbound_dd2" model="account.payment.mode">
<field name="name">Direct Debit of suppliers from La Banque Postale</field>
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<field
name="payment_method_id"
ref="account.account_payment_method_manual_out"
/>
</record>
<record id="payment_mode_inbound_ct1" model="account.payment.mode">
<field name="name">Inbound Credit Trf Société Générale</field>
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<!-- TODO: convert to fixed -->
<field
name="payment_method_id"
ref="account.account_payment_method_manual_in"
/>
</record>
<record id="payment_mode_inbound_ct2" model="account.payment.mode">
<field name="name">Inbound Credit Trf La Banque Postale</field>
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<!-- TODO: convert to fixed -->
<field
name="payment_method_id"
ref="account.account_payment_method_manual_in"
/>
</record>
<record id="payment_mode_inbound_dd1" model="account.payment.mode">
<field name="name">Direct Debit of customers</field>
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<field
name="payment_method_id"
ref="account.account_payment_method_manual_in"
/>
</record>
</odoo>
22 changes: 22 additions & 0 deletions account_payment_mode/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import logging

from odoo.tools import sql

logger = logging.getLogger(__name__)


def pre_init_hook(env):
"""Prepare new payment_mode fields.

Add columns to avoid Memory error on an existing Odoo instance
with lots of data.

The payment_mode_id fields are introduced by this module and computed only
from each other or the also newly introduced supplier_payment_mode_id and
customer_payment_mode_id on res.partner, so they can stay NULL, nothing
to compute.
"""
if not sql.column_exists(env.cr, "account_move", "payment_mode_id"):
sql.create_column(env.cr, "account_move", "payment_mode_id", "int4")
if not sql.column_exists(env.cr, "account_move_line", "payment_mode_id"):
sql.create_column(env.cr, "account_move_line", "payment_mode_id", "int4")
Loading