mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MIG] account_reconciliation_widget_due_date: Migration to 15.0
TT36434
This commit is contained in:
@@ -14,13 +14,13 @@ Account Reconciliation Widget Due Date
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/account-reconcile/tree/13.0/account_reconciliation_widget_due_date
|
||||
:target: https://github.com/OCA/account-reconcile/tree/15.0/account_reconciliation_widget_due_date
|
||||
:alt: OCA/account-reconcile
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/account-reconcile-13-0/account-reconcile-13-0-account_reconciliation_widget_due_date
|
||||
:target: https://translation.odoo-community.org/projects/account-reconcile-15-0/account-reconcile-15-0-account_reconciliation_widget_due_date
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/98/13.0
|
||||
:target: https://runbot.odoo-community.org/runbot/98/15.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -48,7 +48,7 @@ Bug Tracker
|
||||
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.
|
||||
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_reconciliation_widget_due_date%0Aversion:%2013.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_reconciliation_widget_due_date%0Aversion:%2015.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.
|
||||
|
||||
@@ -89,6 +89,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-victoralmau|
|
||||
|
||||
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/13.0/account_reconciliation_widget_due_date>`_ project on GitHub.
|
||||
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/15.0/account_reconciliation_widget_due_date>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,14 +3,19 @@
|
||||
|
||||
{
|
||||
"name": "Account Reconciliation Widget Due Date",
|
||||
"version": "13.0.1.0.1",
|
||||
"version": "15.0.1.0.0",
|
||||
"website": "https://github.com/OCA/account-reconcile",
|
||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"depends": ["account"],
|
||||
"depends": ["account_reconciliation_widget"],
|
||||
"maintainers": ["victoralmau"],
|
||||
"development_status": "Production/Stable",
|
||||
"data": ["views/account_bank_statement_line_view.xml", "views/assets.xml"],
|
||||
"data": ["views/account_bank_statement_line_view.xml"],
|
||||
"assets": {
|
||||
"web.assets_backend": [
|
||||
"/account_reconciliation_widget_due_date/static/src/js/*",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Account Reconciliation Widget Due Date</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/13.0/account_reconciliation_widget_due_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-13-0/account-reconcile-13-0-account_reconciliation_widget_due_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/13.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="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/15.0/account_reconciliation_widget_due_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-15-0/account-reconcile-15-0-account_reconciliation_widget_due_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/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds “Due date” field in Bank Statements Lines.
|
||||
In reconciliation process add “Due date” field to use in validation process (use these date in Journal Items.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
@@ -398,7 +398,7 @@ In reconciliation process add “Due date” field to use in validation process
|
||||
<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.
|
||||
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_reconciliation_widget_due_date%0Aversion:%2013.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_reconciliation_widget_due_date%0Aversion:%2015.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>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -428,7 +428,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/victoralmau"><img alt="victoralmau" src="https://github.com/victoralmau.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/13.0/account_reconciliation_widget_due_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/15.0/account_reconciliation_widget_due_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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,24 +38,26 @@ class TestAccountReconciliationWidgetDueDate(TransactionCase):
|
||||
statement_form.balance_end_real = 600.00
|
||||
with statement_form.line_ids.new() as line_form:
|
||||
line_form.date = "2021-01-01"
|
||||
line_form.name = "LINE_A"
|
||||
line_form.payment_ref = "LINE_A"
|
||||
line_form.partner_id = self.partner_a
|
||||
line_form.amount = 100.00
|
||||
with statement_form.line_ids.new() as line_form:
|
||||
line_form.date = "2021-02-01"
|
||||
line_form.date_due = "2021-02-05"
|
||||
line_form.name = "LINE_B"
|
||||
line_form.payment_ref = "LINE_B"
|
||||
line_form.partner_id = self.partner_b
|
||||
line_form.amount = 200.00
|
||||
with statement_form.line_ids.new() as line_form:
|
||||
line_form.date = "2021-03-01"
|
||||
line_form.name = "LINE_C"
|
||||
line_form.payment_ref = "LINE_C"
|
||||
line_form.partner_id = self.partner_c
|
||||
line_form.amount = 300.00
|
||||
return statement_form.save()
|
||||
|
||||
def test_account_reconciliation_widget(self):
|
||||
self.assertEqual(self.statement.state, "open")
|
||||
self.statement.button_post()
|
||||
self.assertEqual(self.statement.state, "posted")
|
||||
self.assertEqual(len(self.statement.line_ids), 3)
|
||||
reconciliation_widget = self.env["account.reconciliation.widget"]
|
||||
account_move_model = self.env["account.move"]
|
||||
@@ -77,7 +79,7 @@ class TestAccountReconciliationWidgetDueDate(TransactionCase):
|
||||
)
|
||||
self.assertEqual(len(res["moves"]), 1)
|
||||
move = account_move_model.browse(res["moves"][0])
|
||||
self.assertEqual(move.line_ids, line_a.journal_entry_ids)
|
||||
self.assertEqual(move.line_ids, line_a.line_ids)
|
||||
move_line_credit = move.line_ids.filtered(lambda x: x.debit > 0)
|
||||
self.assertFalse(move_line_credit.date_maturity)
|
||||
self.assertEqual(move_line_credit.partner_id, self.partner_a)
|
||||
@@ -112,7 +114,7 @@ class TestAccountReconciliationWidgetDueDate(TransactionCase):
|
||||
)
|
||||
self.assertEqual(len(res["moves"]), 1)
|
||||
move = account_move_model.browse(res["moves"][0])
|
||||
self.assertEqual(move.line_ids, line_b.journal_entry_ids)
|
||||
self.assertEqual(move.line_ids, line_b.line_ids)
|
||||
move_line_credit = move.line_ids.filtered(lambda x: x.debit > 0)
|
||||
self.assertEqual(move_line_credit.date_maturity, date(2021, 2, 5))
|
||||
self.assertEqual(move_line_credit.partner_id, self.partner_b)
|
||||
@@ -140,10 +142,10 @@ class TestAccountReconciliationWidgetDueDate(TransactionCase):
|
||||
self.assertEqual(line_c.date_due, date(2021, 2, 5))
|
||||
self.assertEqual(len(res["moves"]), 1)
|
||||
move = account_move_model.browse(res["moves"][0])
|
||||
self.assertEqual(move.line_ids, line_c.journal_entry_ids)
|
||||
self.assertEqual(move.line_ids, line_c.line_ids)
|
||||
move_line_credit = move.line_ids.filtered(lambda x: x.debit > 0)
|
||||
self.assertEqual(move_line_credit.date_maturity, date(2021, 2, 5))
|
||||
self.assertEqual(move_line_credit.partner_id, self.partner_c)
|
||||
# Confirm statement
|
||||
self.statement.check_confirm_bank()
|
||||
self.statement.button_validate_or_action()
|
||||
self.assertEqual(self.statement.state, "confirm")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree/field[@name='date']" position="after">
|
||||
<field name="date_due" />
|
||||
<field name="date_due" optional="show" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="assets_backend" name="account assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/account_reconciliation_widget_due_date/static/src/js/reconciliation_renderer.js"
|
||||
/>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/account_reconciliation_widget_due_date/static/src/js/reconciliation_model.js"
|
||||
/>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/account_reconciliation_widget_due_date/static/src/js/reconciliation_action.js"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user