Skip to content

Commit f2423e4

Browse files
absal-smilecarlos-lopez-tecnativa
authored andcommitted
[MIG] account_payment_partner: Migration to 18.0
1 parent de6380a commit f2423e4

5 files changed

Lines changed: 39 additions & 69 deletions

File tree

account_payment_partner/README.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ Account Payment Partner
3030

3131
This module adds several fields:
3232

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.
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.
3939

4040
On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices
4141
will be filtered per Payment Mode.
@@ -70,8 +70,8 @@ Changelog
7070
10.0.1.2.0 (2018-05-24)
7171
-----------------------
7272

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

7676
Bug Tracker
7777
===========
@@ -95,25 +95,25 @@ Authors
9595
Contributors
9696
------------
9797

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>`__:
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>`__:
106106

107-
- Pedro M. Baeza
108-
- Carlos Dauden
109-
- Víctor Martínez
107+
- Pedro M. Baeza
108+
- Carlos Dauden
109+
- Víctor Martínez
110110

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

113-
- Raf Ven <raf.ven@dynapps.be>
113+
- Raf Ven <raf.ven@dynapps.be>
114114

115-
- Marçal Isern <marsal.isern@qubiq.es>
116-
- Miquel Alzanillas <malzanillas@apsl.net>
115+
- Marçal Isern <marsal.isern@qubiq.es>
116+
- Miquel Alzanillas <malzanillas@apsl.net>
117117

118118
Maintainers
119119
-----------
Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo noupdate="1">
3-
<record
4-
id="default_supplier_payment_mode_id"
5-
model="ir.property"
6-
forcecreate="True"
7-
>
8-
<field name="name">Default Supplier Payment Mode</field>
9-
<field
10-
name="fields_id"
11-
search="[('model','=','res.partner'),('name','=','supplier_payment_mode_id')]"
12-
/>
13-
<field
14-
name="value"
15-
eval="'account.payment.mode,'+str(ref('account_payment_mode.payment_mode_outbound_ct1'))"
16-
/>
17-
<field name="company_id" ref="base.main_company" />
18-
</record>
19-
<record
20-
id="default_customer_payment_mode_id"
21-
model="ir.property"
22-
forcecreate="True"
23-
>
24-
<field name="name">Default Customer Payment Mode</field>
25-
<field
26-
name="fields_id"
27-
search="[('model','=','res.partner'),('name','=','customer_payment_mode_id')]"
28-
/>
29-
<field
30-
name="value"
31-
eval="'account.payment.mode,'+str(ref('account_payment_mode.payment_mode_inbound_ct1'))"
32-
/>
33-
<field name="company_id" ref="base.main_company" />
34-
</record>
3+
<function
4+
model="ir.default"
5+
name="set"
6+
eval="('res.partner', 'supplier_payment_mode_id', ref('account_payment_mode.payment_mode_outbound_ct1'))"
7+
/>
8+
<function
9+
model="ir.default"
10+
name="set"
11+
eval="('res.partner', 'customer_payment_mode_id', ref('account_payment_mode.payment_mode_inbound_ct1'))"
12+
/>
3513
</odoo>

account_payment_partner/tests/test_account_payment_partner.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from odoo import _, fields
66
from odoo.exceptions import UserError, ValidationError
77
from odoo.fields import Date
8-
from odoo.tests.common import Form, TransactionCase, tagged
8+
from odoo.tests import Form, TransactionCase, tagged
99

1010
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
1111

@@ -124,7 +124,7 @@ def setUpClass(cls):
124124
.create(
125125
{
126126
"name": "Test customer",
127-
"customer_payment_mode_id": cls.customer_payment_mode,
127+
"customer_payment_mode_id": cls.customer_payment_mode.id,
128128
}
129129
)
130130
)
@@ -135,7 +135,7 @@ def setUpClass(cls):
135135
.create(
136136
{
137137
"name": "Test supplier",
138-
"supplier_payment_mode_id": cls.supplier_payment_mode,
138+
"supplier_payment_mode_id": cls.supplier_payment_mode.id,
139139
}
140140
)
141141
)
@@ -152,14 +152,14 @@ def setUpClass(cls):
152152
cls.invoice_account = cls.env["account.account"].search(
153153
[
154154
("account_type", "=", "liability_payable"),
155-
("company_id", "=", cls.company.id),
155+
("company_id", "in", cls.company.id),
156156
],
157157
limit=1,
158158
)
159159
cls.invoice_line_account = cls.env["account.account"].search(
160160
[
161161
("account_type", "=", "expense"),
162-
("company_id", "=", cls.company.id),
162+
("company_id", "in", cls.company.id),
163163
],
164164
limit=1,
165165
)
@@ -227,7 +227,7 @@ def test_create_partner(self):
227227
.create(
228228
{
229229
"name": "Test customer",
230-
"customer_payment_mode_id": self.customer_payment_mode,
230+
"customer_payment_mode_id": self.customer_payment_mode.id,
231231
}
232232
)
233233
)

account_payment_partner/views/account_move_line.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<field name="arch" type="xml">
1212
<xpath expr="//field[@name='analytic_distribution']/.." position="after">
1313
<group name="payments" string="Payments">
14-
<field name="account_type" invisible="1" />
15-
<field name="reconciled" invisible="1" />
1614
<field
1715
name="payment_mode_id"
1816
force_save="1"
@@ -29,8 +27,6 @@
2927
<field name="inherit_id" ref="account.view_move_line_tree" />
3028
<field name="arch" type="xml">
3129
<field name="date_maturity" position="after">
32-
<field name="account_type" invisible="1" />
33-
<field name="reconciled" invisible="1" />
3430
<field
3531
name="payment_mode_id"
3632
optional="hide"

account_payment_partner/views/account_move_view.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
readonly="has_reconciled_items"
3232
invisible="move_type not in ['out_invoice','out_refund','in_invoice','in_refund']"
3333
/>
34-
<field name="has_reconciled_items" invisible="1" />
35-
<field name="bank_account_required" invisible="1" />
36-
<field name="payment_mode_filter_type_domain" invisible="1" />
37-
<field name="partner_bank_filter_type_domain" invisible="1" />
3834
</field>
3935
<xpath
4036
expr="//group[@id='header_right_group']//field[@name='partner_bank_id']"

0 commit comments

Comments
 (0)