[MIG][14.0] Migrated a account_reconcile_reconciliation_date.

Prettier
This commit is contained in:
AmmarOfficewalaSerpentCS
2021-05-28 17:17:46 +05:30
committed by Patrick Wilson
parent aec6522a58
commit 44fb43d6e0
15 changed files with 87 additions and 136 deletions

View File

@@ -14,13 +14,13 @@ Account Reconciliation Date
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
:target: https://github.com/OCA/account-reconcile/tree/12.0/account_reconcile_reconciliation_date :target: https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_reconciliation_date
:alt: OCA/account-reconcile :alt: OCA/account-reconcile
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_reconcile_reconciliation_date :target: https://translation.odoo-community.org/projects/account-reconcile-14-0/account-reconcile-14-0-account_reconcile_reconciliation_date
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/98/12.0 :target: https://runbot.odoo-community.org/runbot/98/14.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -38,7 +38,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/issues>`_.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_reconciliation_date%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_reconciliation_date%0Aversion:%2014.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. Do not contact contributors directly about support or help with technical issues.
@@ -54,6 +54,7 @@ Contributors
~~~~~~~~~~~~ ~~~~~~~~~~~~
* Steven Campbell <scampbell@opensourceintegrators.com> * Steven Campbell <scampbell@opensourceintegrators.com>
* Ammar Officewala <aofficewala@opensourceintegrators.com>
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@@ -68,6 +69,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/12.0/account_reconcile_reconciliation_date>`_ project on GitHub. This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_reconciliation_date>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models from . import models

View File

@@ -1,15 +1,15 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
"name": "Account Reconciliation Date", "name": "Account Reconciliation Date",
"summary": "Track Reconciliation Date of Payments and Invoices", "summary": "Track Reconciliation Date of Payments and Invoices",
"version": "12.0.1.1.0", "version": "14.0.1.0.0",
"depends": ["account"], "depends": ["account"],
"author": "Open Source Integrators, Odoo Community Association (OCA)", "author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-reconcile", "website": "https://github.com/OCA/account-reconcile",
"category": "Finance", "category": "Finance",
"license": "AGPL-3", "license": "AGPL-3",
"data": ["views/account_invoice.xml", "views/account_payment.xml"], "data": ["views/account_move.xml", "views/account_payment.xml"],
"installable": True, "installable": True,
} }

View File

@@ -1,39 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_reconcile_reconciliation_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-03-01 23:45+0000\n"
"Last-Translator: Nelson Ramírez Sánchez <info@konos.cl>\n"
"Language-Team: none\n"
"Language: es_CL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"
#. module: account_reconcile_reconciliation_date
#: model:ir.model,name:account_reconcile_reconciliation_date.model_account_full_reconcile
msgid "Full Reconcile"
msgstr "Reconciliación Completa"
#. module: account_reconcile_reconciliation_date
#: model:ir.model,name:account_reconcile_reconciliation_date.model_account_invoice
msgid "Invoice"
msgstr "Factura"
#. module: account_reconcile_reconciliation_date
#: model:ir.model,name:account_reconcile_reconciliation_date.model_account_payment
msgid "Payments"
msgstr "Pagos"
#. module: account_reconcile_reconciliation_date
#: model:ir.model.fields,field_description:account_reconcile_reconciliation_date.field_account_full_reconcile__reconciliation_date
#: model:ir.model.fields,field_description:account_reconcile_reconciliation_date.field_account_invoice__reconciliation_date
#: model:ir.model.fields,field_description:account_reconcile_reconciliation_date.field_account_payment__reconciliation_date
msgid "Reconciliation Date"
msgstr "Fecha de Reconciliación"

View File

@@ -1,6 +1,6 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_full_reconcile from . import account_full_reconcile
from . import account_invoice from . import account_move
from . import account_payment from . import account_payment

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import date from datetime import date
@@ -23,8 +23,8 @@ class AccountFullReconcile(models.Model):
line_id.payment_id.reconciliation_date = ( line_id.payment_id.reconciliation_date = (
reconcile_id.reconciliation_date reconcile_id.reconciliation_date
) )
if line_id.invoice_id: if line_id.move_id:
line_id.invoice_id.reconciliation_date = ( line_id.move_id.reconciliation_date = (
reconcile_id.reconciliation_date reconcile_id.reconciliation_date
) )
return res return res

View File

@@ -1,10 +1,10 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models from odoo import fields, models
class AccountInvoice(models.Model): class AccountMove(models.Model):
_inherit = "account.invoice" _inherit = "account.move"
reconciliation_date = fields.Date(string="Reconciliation Date") reconciliation_date = fields.Date(string="Reconciliation Date")

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models from odoo import fields, models

View File

@@ -1 +1,2 @@
* Steven Campbell <scampbell@opensourceintegrators.com> * Steven Campbell <scampbell@opensourceintegrators.com>
* Ammar Officewala <aofficewala@opensourceintegrators.com>

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/12.0/account_reconcile_reconciliation_date"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_reconcile_reconciliation_date"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/98/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_reconciliation_date"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-reconcile-14-0/account-reconcile-14-0-account_reconcile_reconciliation_date"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/98/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module is designed to help users track when invoices and payments are reconciled</p> <p>This module is designed to help users track when invoices and payments are reconciled</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
@@ -386,7 +386,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_reconciliation_date%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_reconciliation_date%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@@ -401,6 +401,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<h2><a class="toc-backref" href="#id4">Contributors</a></h2> <h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Steven Campbell &lt;<a class="reference external" href="mailto:scampbell&#64;opensourceintegrators.com">scampbell&#64;opensourceintegrators.com</a>&gt;</li> <li>Steven Campbell &lt;<a class="reference external" href="mailto:scampbell&#64;opensourceintegrators.com">scampbell&#64;opensourceintegrators.com</a>&gt;</li>
<li>Ammar Officewala &lt;<a class="reference external" href="mailto:aofficewala&#64;opensourceintegrators.com">aofficewala&#64;opensourceintegrators.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
@@ -410,7 +411,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/12.0/account_reconcile_reconciliation_date">OCA/account-reconcile</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_reconciliation_date">OCA/account-reconcile</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_account_reconcile_reconciliation_date from . import test_account_reconcile_reconciliation_date

View File

@@ -1,20 +1,20 @@
# Copyright (C) 2019, Open Source Integrators # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import time import time
from odoo.addons.account.tests.account_test_classes import AccountingTestCase from odoo.addons.account.tests.common import AccountTestInvoicingCommon
class TestAccountReconcileReconciliationDate(AccountingTestCase): class TestAccountReconcileReconciliationDate(AccountTestInvoicingCommon):
def setUp(self): def setUp(self):
super(TestAccountReconcileReconciliationDate, self).setUp() super(TestAccountReconcileReconciliationDate, self).setUp()
self.register_payments_model = self.env[ self.register_payments_model = self.env[
"account.register.payments" "account.payment.register"
].with_context(active_model="account.invoice") ].with_context(active_model="account.move")
self.payment_model = self.env["account.payment"] self.payment_model = self.env["account.payment"]
self.invoice_model = self.env["account.invoice"] self.invoice_model = self.env["account.move"]
self.invoice_line_model = self.env["account.invoice.line"] self.invoice_line_model = self.env["account.move.line"]
self.acc_bank_stmt_model = self.env["account.bank.statement"] self.acc_bank_stmt_model = self.env["account.bank.statement"]
self.acc_bank_stmt_line_model = self.env["account.bank.statement.line"] self.acc_bank_stmt_line_model = self.env["account.bank.statement.line"]
@@ -68,10 +68,10 @@ class TestAccountReconcileReconciliationDate(AccountingTestCase):
limit=1, limit=1,
) )
self.bank_journal_euro = self.env["account.journal"].create( self.bank_journal_euro = self.env["account.journal"].search(
{"name": "Bank", "type": "bank", "code": "BNK67"} [("type", "=", "bank")], limit=1
) )
self.account_eur = self.bank_journal_euro.default_debit_account_id self.account_eur = self.bank_journal_euro.default_account_id
self.bank_journal_usd = self.env["account.journal"].create( self.bank_journal_usd = self.env["account.journal"].create(
{ {
@@ -81,8 +81,10 @@ class TestAccountReconcileReconciliationDate(AccountingTestCase):
"currency_id": self.currency_usd_id, "currency_id": self.currency_usd_id,
} }
) )
self.account_usd = self.bank_journal_usd.default_debit_account_id self.account_usd = self.bank_journal_usd.default_account_id
self.journal_id = self.env["account.journal"].search(
[("type", "=", "sale")], limit=1
)
self.transfer_account = ( self.transfer_account = (
self.env["res.users"].browse(self.env.uid).company_id.transfer_account_id self.env["res.users"].browse(self.env.uid).company_id.transfer_account_id
) )
@@ -100,7 +102,7 @@ class TestAccountReconcileReconciliationDate(AccountingTestCase):
def create_invoice( def create_invoice(
self, self,
amount=100, amount=100,
type="out_invoice", move_type="out_invoice",
currency_id=None, currency_id=None,
partner=None, partner=None,
account_id=None, account_id=None,
@@ -110,23 +112,25 @@ class TestAccountReconcileReconciliationDate(AccountingTestCase):
{ {
"partner_id": partner or self.partner_agrolait.id, "partner_id": partner or self.partner_agrolait.id,
"currency_id": currency_id or self.currency_eur_id, "currency_id": currency_id or self.currency_eur_id,
"name": type, "journal_id": self.journal_id.id,
"account_id": account_id or self.account_receivable.id, "move_type": move_type,
"type": type, "invoice_date": time.strftime("%Y") + "-06-26",
"date_invoice": time.strftime("%Y") + "-06-26", "invoice_line_ids": [
} (
) 0,
self.invoice_line_model.create( 0,
{ {
"product_id": self.product.id, "product_id": self.product.id,
"quantity": 1, "quantity": 1,
"price_unit": amount, "price_unit": amount,
"invoice_id": invoice.id,
"name": "something", "name": "something",
"account_id": self.account_revenue.id, "account_id": self.journal_id.default_account_id.id,
},
)
],
} }
) )
invoice.action_invoice_open() invoice.action_post()
return invoice return invoice
def reconcile( def reconcile(
@@ -169,56 +173,39 @@ class TestAccountReconcileReconciliationDate(AccountingTestCase):
partner=self.partner_agrolait.id, partner=self.partner_agrolait.id,
) )
ctx = {"active_model": "account.invoice", "active_ids": [inv_1.id, inv_2.id]} ctx = {"active_model": "account.move", "active_ids": [inv_1.id, inv_2.id]}
register_payments = self.register_payments_model.with_context(ctx).create( register_payments = self.register_payments_model.with_context(ctx).create(
{ {
"payment_date": time.strftime("%Y") + "-07-15", "payment_date": time.strftime("%Y") + "-07-15",
"journal_id": self.bank_journal_euro.id, "journal_id": self.bank_journal_euro.id,
"payment_method_id": self.payment_method_manual_in.id, "payment_method_id": self.payment_method_manual_in.id,
"group_invoices": True,
} }
) )
register_payments.create_payments() register_payments.flush()
register_payments.action_create_payments()
payment = self.payment_model.search([], order="id desc", limit=1) payment = self.payment_model.search([], order="id desc", limit=1)
self.assertAlmostEquals(payment.amount, 300) self.assertAlmostEqual(payment.amount, 200)
self.assertEqual(payment.state, "posted") self.assertEqual(payment.state, "posted")
self.assertEqual(payment.state, "posted") self.assertEqual(payment.state, "posted")
self.assertEqual(inv_1.state, "paid") self.assertEqual(inv_1.payment_state, "paid")
self.assertEqual(inv_2.state, "paid") self.assertEqual(inv_2.payment_state, "paid")
self.assertRecordValues( self.assertRecordValues(
payment.move_line_ids, payment.line_ids,
[ [
{ {
"account_id": self.account_eur.id, "journal_id": self.bank_journal_euro.id,
"debit": 300.0, "debit": 200.0,
"credit": 0.0, "credit": 0.0,
"amount_currency": 0,
"currency_id": False,
}, },
{ {
"account_id": inv_1.account_id.id, "journal_id": self.bank_journal_euro.id,
"debit": 0.0, "debit": 0.0,
"credit": 300.0, "credit": 200.0,
"amount_currency": 0,
"currency_id": False,
}, },
], ],
) )
self.assertTrue(
payment.move_line_ids.filtered(lambda l: l.account_id == inv_1.account_id)[
0
].full_reconcile_id
)
liquidity_aml = payment.move_line_ids.filtered( self.assertEqual(payment.state, "posted")
lambda r: r.account_id == self.account_eur
)
bank_statement = self.reconcile(liquidity_aml, 200, 0, False)
self.assertEqual(liquidity_aml.statement_id, bank_statement)
self.assertEqual(liquidity_aml.statement_line_id, bank_statement.line_ids[0])
self.assertEqual(payment.state, "reconciled")
self.assertEqual(payment.reconciliation_date, inv_1.reconciliation_date) self.assertEqual(payment.reconciliation_date, inv_1.reconciliation_date)

View File

@@ -1,17 +0,0 @@
<odoo>
<record id="account_invoice_reconciliation_date" model="ir.ui.view">
<field name="name">account.invoice.reconciliation.date</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="arch" type="xml">
<field name="date_due" position="after">
<field
name="reconciliation_date"
attrs="{'invisible': [('reconciliation_date', '=', False)]}"
/>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,17 @@
<odoo>
<record id="account_move_reconciliation_date" model="ir.ui.view">
<field name="name">account.move.reconciliation.date</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<field name="invoice_date" position="after">
<field
name="reconciliation_date"
attrs="{'invisible': [('reconciliation_date', '=', False)]}"
/>
</field>
</field>
</record>
</odoo>

View File

@@ -5,7 +5,7 @@
<field name="model">account.payment</field> <field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form" /> <field name="inherit_id" ref="account.view_account_payment_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="payment_date" position="after"> <field name="date" position="after">
<field <field
name="reconciliation_date" name="reconciliation_date"
attrs="{'invisible': [('reconciliation_date', '=', False)]}" attrs="{'invisible': [('reconciliation_date', '=', False)]}"