Skip to content

Commit e4cd15c

Browse files
committed
Merge PR #1439 into 18.0
Signed-off-by pedrobaeza
2 parents 233f951 + 51f9bc4 commit e4cd15c

45 files changed

Lines changed: 6401 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

account_payment_partner/README.rst

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
=======================
2+
Account Payment Partner
3+
=======================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:72df3e94c91d7920a861905fd6e4cbf1a5428c096d3a60c8f2d93b8d9fb0b114
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Mature
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github
20+
:target: https://github.com/OCA/bank-payment/tree/18.0/account_payment_partner
21+
:alt: OCA/bank-payment
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/bank-payment-18-0/bank-payment-18-0-account_payment_partner
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module adds several fields:
32+
33+
- the *Supplier Payment Mode* and *Customer Payment Mode* on Partners,
34+
- the *Payment Mode* on Invoices.
35+
- the *Show bank account* on Payment Mode.
36+
- the *# of digits for customer bank account* on Payment Mode.
37+
- the *Bank account from journals* on Payment Mode.
38+
- the *Payment mode* on Invoices Analysis.
39+
40+
On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices
41+
will be filtered per Payment Mode.
42+
43+
Allows to print in the invoice to which account number the payment (via
44+
SEPA direct debit) is going to be charged so the customer knows that
45+
information, but there are some customers that don't want that everyone
46+
looking at the invoice sees the full account number (and even GDPR can
47+
say a word about that), so that's the reason behind the several options.
48+
49+
**Table of contents**
50+
51+
.. contents::
52+
:local:
53+
54+
Usage
55+
=====
56+
57+
You are able to add a payment mode directly on a partner.
58+
59+
This payment mode is automatically associated to the invoice related to
60+
the partner. This default value could be changed in a draft invoice.
61+
62+
When you create a payment order, only invoices related to chosen payment
63+
mode are displayed.
64+
65+
Invoices without any payment mode are displayed too.
66+
67+
Changelog
68+
=========
69+
70+
10.0.1.2.0 (2018-05-24)
71+
-----------------------
72+
73+
- [IMP] Add options to show partner bank account in invoice report
74+
(`#458 <https://github.com/OCA/bank-payment/issues/458>`__)
75+
76+
Bug Tracker
77+
===========
78+
79+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-payment/issues>`_.
80+
In case of trouble, please check there if your issue has already been reported.
81+
If you spotted it first, help us to smash it by providing a detailed and welcomed
82+
`feedback <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_partner%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
83+
84+
Do not contact contributors directly about support or help with technical issues.
85+
86+
Credits
87+
=======
88+
89+
Authors
90+
-------
91+
92+
* Akretion
93+
* Tecnativa
94+
95+
Contributors
96+
------------
97+
98+
- Alexis de Lattre <alexis.delattre@akretion.com>
99+
- Raphaël Valyi
100+
- Stefan Rijnhart (Therp)
101+
- Alexandre Fayolle
102+
- Stéphane Bidoul <stephane.bidoul@acsone.eu>
103+
- Danimar Ribeiro
104+
- Angel Moya <angel.moya@domatix.com>
105+
- `Tecnativa <https://www.tecnativa.com>`__:
106+
107+
- Pedro M. Baeza
108+
- Carlos Dauden
109+
- Víctor Martínez
110+
111+
- `DynApps <https://www.dynapps.be>`__:
112+
113+
- Raf Ven <raf.ven@dynapps.be>
114+
115+
- Marçal Isern <marsal.isern@qubiq.es>
116+
- Miquel Alzanillas <malzanillas@apsl.net>
117+
118+
Maintainers
119+
-----------
120+
121+
This module is maintained by the OCA.
122+
123+
.. image:: https://odoo-community.org/logo.png
124+
:alt: Odoo Community Association
125+
:target: https://odoo-community.org
126+
127+
OCA, or the Odoo Community Association, is a nonprofit organization whose
128+
mission is to support the collaborative development of Odoo features and
129+
promote its widespread use.
130+
131+
This module is part of the `OCA/bank-payment <https://github.com/OCA/bank-payment/tree/18.0/account_payment_partner>`_ project on GitHub.
132+
133+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
2+
3+
from .hooks import pre_init_hook
4+
from . import models
5+
from . import reports
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2014 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
2+
# Copyright 2014 Tecnativa - Pedro M. Baeza
3+
# Copyright 2018 Tecnativa - Carlos Dauden
4+
# Copyright 2021 Tecnativa - Víctor Martínez
5+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6+
7+
{
8+
"name": "Account Payment Partner",
9+
"version": "18.0.1.0.0",
10+
"category": "Banking addons",
11+
"license": "AGPL-3",
12+
"summary": "Adds payment mode on partners and invoices",
13+
"author": "Akretion, Tecnativa, Odoo Community Association (OCA)",
14+
"website": "https://github.com/OCA/bank-payment",
15+
"development_status": "Mature",
16+
"depends": ["account_payment_mode"],
17+
"data": [
18+
"security/account_payment_partner_security.xml",
19+
"views/res_partner_view.xml",
20+
"views/account_move_view.xml",
21+
"views/account_move_line.xml",
22+
"views/account_payment_mode.xml",
23+
"views/report_invoice.xml",
24+
"reports/account_invoice_report_view.xml",
25+
],
26+
"demo": ["demo/partner_demo.xml"],
27+
"installable": True,
28+
"pre_init_hook": "pre_init_hook",
29+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<function
4+
model="ir.default"
5+
name="set"
6+
eval="(
7+
'res.partner',
8+
'supplier_payment_mode_id',
9+
ref('account_payment_mode.payment_mode_outbound_ct1'),
10+
False,
11+
ref('base.main_company')
12+
)"
13+
/>
14+
<function
15+
model="ir.default"
16+
name="set"
17+
eval="(
18+
'res.partner',
19+
'customer_payment_mode_id',
20+
ref('account_payment_mode.payment_mode_inbound_ct1'),
21+
False,
22+
ref('base.main_company')
23+
)"
24+
/>
25+
</odoo>

account_payment_partner/hooks.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import logging
2+
3+
from odoo.tools import sql
4+
5+
logger = logging.getLogger(__name__)
6+
7+
8+
def pre_init_hook(env):
9+
"""Prepare new payment_mode fields.
10+
11+
Add columns to avoid Memory error on an existing Odoo instance
12+
with lots of data.
13+
14+
The payment_mode_id fields are introduced by this module and computed only
15+
from each other or the also newly introduced supplier_payment_mode_id and
16+
customer_payment_mode_id on res.partner, so they can stay NULL, nothing
17+
to compute.
18+
"""
19+
if not sql.column_exists(env.cr, "account_move", "payment_mode_id"):
20+
sql.create_column(env.cr, "account_move", "payment_mode_id", "int4")
21+
if not sql.column_exists(env.cr, "account_move_line", "payment_mode_id"):
22+
sql.create_column(env.cr, "account_move_line", "payment_mode_id", "int4")

0 commit comments

Comments
 (0)