Skip to content

Commit 4b14ed1

Browse files
[MIG] account_payment_credit_card: Migration to 18.0
1 parent 01f226c commit 4b14ed1

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

account_payment_credit_card/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Credit Card Payments",
66
"summary": "Add support for credit card payments",
7-
"version": "16.0.1.0.1",
7+
"version": "18.0.1.0.0",
88
"license": "AGPL-3",
99
"author": "Open Source Integrators, Odoo Community Association (OCA)",
1010
"category": "Accounting & Finance",

account_payment_credit_card/tests/test_payment_credit_card.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class TestPaymentCreditCard(common.TransactionCase):
1313
@classmethod
1414
def setUpClass(cls):
1515
super().setUpClass()
16-
if not cls.env.company.chart_template_id:
16+
if not cls.env["account.account"].search(
17+
[("company_ids", "in", cls.env.company.ids)], limit=1
18+
):
1719
# Load a CoA if there's none in current company
1820
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
1921
if not coa:
2022
# Load the first available CoA
21-
coa = cls.env["account.chart.template"].search(
22-
[("visible", "=", True)], limit=1
23-
)
23+
coa = cls.env["account.chart.template"].search([], limit=1)
2424
coa.try_loading(company=cls.env.company, install_demo=False)
2525
cls.account_invoice_obj = cls.env["account.move"]
2626
cls.account_move_line_obj = cls.env["account.move.line"]

account_payment_credit_card/views/account_view.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@
77
<field name="inherit_id" ref="account.view_account_journal_form" />
88
<field name="arch" type="xml">
99
<field name="default_account_id" position="after">
10-
<field
11-
name="credit_card"
12-
attrs="{'invisible':[('type', '!=', 'bank')]}"
13-
/>
10+
<field name="credit_card" invisible="type != 'bank'" />
1411
<field
1512
name="partner_id"
16-
attrs="{'invisible':[('type', '!=', 'bank'),
17-
('credit_card', '=', False)]}"
13+
invisible="type != 'bank' or not credit_card"
1814
/>
1915
</field>
2016
</field>

0 commit comments

Comments
 (0)