mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[ADD] account_reconciliation_widget: first working alpha
This commit is contained in:
86
account_reconciliation_widget/README.rst
Normal file
86
account_reconciliation_widget/README.rst
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
=============================
|
||||||
|
account_reconciliation_widget
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
:alt: Beta
|
||||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||||
|
: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_reconciliation_widget-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/account_reconciliation_widget/tree/14.0/account_reconciliation_widget
|
||||||
|
:alt: OCA/account_reconciliation_widget
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
|
:target: https://translation.odoo-community.org/projects/account_reconciliation_widget-14-0/account_reconciliation_widget-14-0-account_reconciliation_widget
|
||||||
|
:alt: Translate me on Weblate
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4|
|
||||||
|
|
||||||
|
This module restores account reconciliation widget moved from Odoo community to enterpise in V. 14.0
|
||||||
|
Provides two widgets designed to reconcile move lines in a easy way: one focused on bank statements and another for generic use.
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
With an user with full accounting features enabled:
|
||||||
|
|
||||||
|
Invoicing --> Accounting --> Actions --> Reconciliation.
|
||||||
|
|
||||||
|
From journal items list view you can select check of them and click Action --> Reconcile.
|
||||||
|
|
||||||
|
From accounting dashboard you can use reconcile button in Bank / Cash journals.
|
||||||
|
|
||||||
|
Also, you can navigate to statements and use the reconcile button.
|
||||||
|
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account_reconciliation_widget/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_reconciliation_widget/issues/new?body=module:%20account_reconciliation_widget%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.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Ozono Multimedia
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Tecnativa - Pedro M. Baeza
|
||||||
|
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
This module is part of the `OCA/account_reconciliation_widget <https://github.com/OCA/account_reconciliation_widget/tree/14.0/account_reconciliation_widget>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
1
account_reconciliation_widget/__init__.py
Normal file
1
account_reconciliation_widget/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
24
account_reconciliation_widget/__manifest__.py
Normal file
24
account_reconciliation_widget/__manifest__.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 2020 Ozono Multimedia - Iván Antón
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "account_reconciliation_widget",
|
||||||
|
"version": "14.0.1.0.0",
|
||||||
|
"category": "Accounting",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"summary": "Account reconciliation widget",
|
||||||
|
"author": "Odoo, Ozono Multimedia, Odoo Community Association (OCA)",
|
||||||
|
"website": "https://github.com/OCA/account-reconcile",
|
||||||
|
"depends": ["account"],
|
||||||
|
"data": [
|
||||||
|
"security/ir.model.access.csv",
|
||||||
|
"views/assets.xml",
|
||||||
|
"views/account_view.xml",
|
||||||
|
"views/account_bank_statement_view.xml",
|
||||||
|
"views/account_journal_dashboard_view.xml",
|
||||||
|
],
|
||||||
|
"qweb": [
|
||||||
|
"static/src/xml/account_reconciliation.xml",
|
||||||
|
],
|
||||||
|
"installable": True,
|
||||||
|
}
|
||||||
5
account_reconciliation_widget/models/__init__.py
Normal file
5
account_reconciliation_widget/models/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from . import account_move
|
||||||
|
from . import account_bank_statement
|
||||||
|
from . import account_journal
|
||||||
|
from . import reconciliation_widget
|
||||||
|
from . import res_company
|
||||||
@@ -33,6 +33,7 @@ class AccountBankStatementLine(models.Model):
|
|||||||
|
|
||||||
_inherit = "account.bank.statement.line"
|
_inherit = "account.bank.statement.line"
|
||||||
|
|
||||||
|
# FIXME: is this necessary now?
|
||||||
move_name = fields.Char(
|
move_name = fields.Char(
|
||||||
string="Journal Entry Name",
|
string="Journal Entry Name",
|
||||||
readonly=True,
|
readonly=True,
|
||||||
@@ -129,22 +130,23 @@ class AccountBankStatementLine(models.Model):
|
|||||||
and user_type_id not in account_types
|
and user_type_id not in account_types
|
||||||
):
|
):
|
||||||
account_types |= user_type_id
|
account_types |= user_type_id
|
||||||
if suspense_moves_mode:
|
# FIXME: review
|
||||||
if any(not line.journal_entry_ids for line in self):
|
# if suspense_moves_mode:
|
||||||
raise UserError(
|
# if any(not line.journal_entry_ids for line in self):
|
||||||
_(
|
# raise UserError(
|
||||||
"Some selected statement line were not already "
|
# _(
|
||||||
"reconciled with an account move."
|
# "Some selected statement line were not already "
|
||||||
)
|
# "reconciled with an account move."
|
||||||
)
|
# )
|
||||||
else:
|
# )
|
||||||
if any(line.journal_entry_ids for line in self):
|
# else:
|
||||||
raise UserError(
|
# if any(line.journal_entry_ids for line in self):
|
||||||
_(
|
# raise UserError(
|
||||||
"A selected statement line was already reconciled with "
|
# _(
|
||||||
"an account move."
|
# "A selected statement line was already reconciled with "
|
||||||
)
|
# "an account move."
|
||||||
)
|
# )
|
||||||
|
# )
|
||||||
|
|
||||||
# Fully reconciled moves are just linked to the bank statement
|
# Fully reconciled moves are just linked to the bank statement
|
||||||
total = self.amount
|
total = self.amount
|
||||||
@@ -171,7 +173,7 @@ class AccountBankStatementLine(models.Model):
|
|||||||
# it.
|
# it.
|
||||||
aml_rec.move_id.date = self.date
|
aml_rec.move_id.date = self.date
|
||||||
aml_rec.payment_id.payment_date = self.date
|
aml_rec.payment_id.payment_date = self.date
|
||||||
aml_rec.move_id.post()
|
aml_rec.move_id.action_post()
|
||||||
# We check the paid status of the invoices reconciled with this
|
# We check the paid status of the invoices reconciled with this
|
||||||
# payment
|
# payment
|
||||||
for invoice in aml_rec.payment_id.reconciled_invoice_ids:
|
for invoice in aml_rec.payment_id.reconciled_invoice_ids:
|
||||||
@@ -181,86 +183,10 @@ class AccountBankStatementLine(models.Model):
|
|||||||
# (eg. invoice), in which case we reconcile the existing and the new
|
# (eg. invoice), in which case we reconcile the existing and the new
|
||||||
# move lines together, or being a write-off.
|
# move lines together, or being a write-off.
|
||||||
if counterpart_aml_dicts or new_aml_dicts:
|
if counterpart_aml_dicts or new_aml_dicts:
|
||||||
|
counterpart_moves = self._create_counterpart_and_new_aml(
|
||||||
# Create the move
|
counterpart_moves, counterpart_aml_dicts, new_aml_dicts
|
||||||
self.sequence = self.statement_id.line_ids.ids.index(self.id) + 1
|
|
||||||
move_vals = self._prepare_reconciliation_move(self.statement_id.name)
|
|
||||||
if suspense_moves_mode:
|
|
||||||
self.button_cancel_reconciliation()
|
|
||||||
move = (
|
|
||||||
self.env["account.move"]
|
|
||||||
.with_context(default_journal_id=move_vals["journal_id"])
|
|
||||||
.create(move_vals)
|
|
||||||
)
|
)
|
||||||
counterpart_moves = counterpart_moves | move
|
|
||||||
|
|
||||||
# Create The payment
|
|
||||||
payment = self.env["account.payment"]
|
|
||||||
partner_id = (
|
|
||||||
self.partner_id
|
|
||||||
or (aml_dict.get("move_line") and aml_dict["move_line"].partner_id)
|
|
||||||
or self.env["res.partner"]
|
|
||||||
)
|
|
||||||
if abs(total) > 0.00001:
|
|
||||||
payment_vals = self._prepare_payment_vals(total)
|
|
||||||
if not payment_vals["partner_id"]:
|
|
||||||
payment_vals["partner_id"] = partner_id.id
|
|
||||||
if payment_vals["partner_id"] and len(account_types) == 1:
|
|
||||||
payment_vals["partner_type"] = (
|
|
||||||
"customer"
|
|
||||||
if account_types == receivable_account_type
|
|
||||||
else "supplier"
|
|
||||||
)
|
|
||||||
payment = payment.create(payment_vals)
|
|
||||||
|
|
||||||
# Complete dicts to create both counterpart move lines and write-offs
|
|
||||||
to_create = counterpart_aml_dicts + new_aml_dicts
|
|
||||||
date = self.date or fields.Date.today()
|
|
||||||
for aml_dict in to_create:
|
|
||||||
aml_dict["move_id"] = move.id
|
|
||||||
aml_dict["partner_id"] = self.partner_id.id
|
|
||||||
aml_dict["statement_line_id"] = self.id
|
|
||||||
self._prepare_move_line_for_currency(aml_dict, date)
|
|
||||||
|
|
||||||
# Create write-offs
|
|
||||||
for aml_dict in new_aml_dicts:
|
|
||||||
aml_dict["payment_id"] = payment and payment.id or False
|
|
||||||
aml_obj.with_context(check_move_validity=False).create(aml_dict)
|
|
||||||
|
|
||||||
# Create counterpart move lines and reconcile them
|
|
||||||
for aml_dict in counterpart_aml_dicts:
|
|
||||||
if (
|
|
||||||
aml_dict["move_line"].payment_id
|
|
||||||
and not aml_dict["move_line"].statement_line_id
|
|
||||||
):
|
|
||||||
aml_dict["move_line"].write({"statement_line_id": self.id})
|
|
||||||
if aml_dict["move_line"].partner_id.id:
|
|
||||||
aml_dict["partner_id"] = aml_dict["move_line"].partner_id.id
|
|
||||||
aml_dict["account_id"] = aml_dict["move_line"].account_id.id
|
|
||||||
aml_dict["payment_id"] = payment and payment.id or False
|
|
||||||
|
|
||||||
counterpart_move_line = aml_dict.pop("move_line")
|
|
||||||
new_aml = aml_obj.with_context(check_move_validity=False).create(
|
|
||||||
aml_dict
|
|
||||||
)
|
|
||||||
|
|
||||||
(new_aml | counterpart_move_line).reconcile()
|
|
||||||
|
|
||||||
self._check_invoice_state(counterpart_move_line.move_id)
|
|
||||||
|
|
||||||
# Balance the move
|
|
||||||
st_line_amount = -sum([x.balance for x in move.line_ids])
|
|
||||||
aml_dict = self._prepare_reconciliation_move_line(move, st_line_amount)
|
|
||||||
aml_dict["payment_id"] = payment and payment.id or False
|
|
||||||
aml_obj.with_context(check_move_validity=False).create(aml_dict)
|
|
||||||
|
|
||||||
# Needs to be called manually as lines were created 1 by 1
|
|
||||||
move.update_lines_tax_exigibility()
|
|
||||||
move.post()
|
|
||||||
# record the move name on the statement line to be able to retrieve
|
|
||||||
# it in case of unreconciliation
|
|
||||||
self.write({"move_name": move.name})
|
|
||||||
payment and payment.write({"payment_reference": move.name})
|
|
||||||
elif self.move_name:
|
elif self.move_name:
|
||||||
raise UserError(
|
raise UserError(
|
||||||
_(
|
_(
|
||||||
@@ -277,177 +203,71 @@ class AccountBankStatementLine(models.Model):
|
|||||||
if self.account_number and self.partner_id and not self.bank_account_id:
|
if self.account_number and self.partner_id and not self.bank_account_id:
|
||||||
# Search bank account without partner to handle the case the
|
# Search bank account without partner to handle the case the
|
||||||
# res.partner.bank already exists but is set on a different partner.
|
# res.partner.bank already exists but is set on a different partner.
|
||||||
self.bank_account_id = self._find_or_create_bank_account()
|
self.partner_bank_id = self._find_or_create_bank_account()
|
||||||
|
|
||||||
counterpart_moves._check_balanced()
|
counterpart_moves._check_balanced()
|
||||||
return counterpart_moves
|
return counterpart_moves
|
||||||
|
|
||||||
def _prepare_reconciliation_move(self, move_ref):
|
def _create_counterpart_and_new_aml(
|
||||||
"""Prepare the dict of values to create the move from a statement line.
|
self, counterpart_moves, counterpart_aml_dicts, new_aml_dicts
|
||||||
This method may be overridden to adapt domain logic through model
|
):
|
||||||
inheritance (make sure to call super() to establish a clean extension
|
|
||||||
chain).
|
|
||||||
|
|
||||||
:param char move_ref: will be used as the reference of the generated
|
aml_obj = self.env["account.move.line"]
|
||||||
account move
|
|
||||||
:return: dict of value to create() the account.move
|
|
||||||
"""
|
|
||||||
ref = move_ref or ""
|
|
||||||
if self.ref:
|
|
||||||
ref = move_ref + " - " + self.ref if move_ref else self.ref
|
|
||||||
data = {
|
|
||||||
"type": "entry",
|
|
||||||
"journal_id": self.statement_id.journal_id.id,
|
|
||||||
"currency_id": self.statement_id.currency_id.id,
|
|
||||||
"date": self.statement_id.accounting_date or self.date,
|
|
||||||
"partner_id": self.partner_id.id,
|
|
||||||
"ref": ref,
|
|
||||||
}
|
|
||||||
if self.move_name:
|
|
||||||
data.update(name=self.move_name)
|
|
||||||
return data
|
|
||||||
|
|
||||||
def _prepare_reconciliation_move_line(self, move, amount):
|
# Delete previous move_lines
|
||||||
"""Prepare the dict of values to balance the move.
|
self.move_id.line_ids.with_context(force_delete=True).unlink()
|
||||||
|
|
||||||
:param recordset move: the account.move to link the move line
|
# Create liquidity line
|
||||||
:param dict move: a dict of vals of a account.move which will be created
|
liquidity_aml_dict = self._prepare_liquidity_move_line_vals()
|
||||||
later
|
aml_obj.with_context(check_move_validity=False).create(liquidity_aml_dict)
|
||||||
:param float amount: the amount of transaction that wasn't already
|
|
||||||
reconciled
|
|
||||||
"""
|
|
||||||
company_currency = self.journal_id.company_id.currency_id
|
|
||||||
statement_currency = self.journal_id.currency_id or company_currency
|
|
||||||
st_line_currency = self.currency_id or statement_currency
|
|
||||||
amount_currency = False
|
|
||||||
st_line_currency_rate = (
|
|
||||||
self.currency_id and (self.amount_currency / self.amount) or False
|
|
||||||
)
|
|
||||||
if isinstance(move, dict):
|
|
||||||
amount_sum = sum(x[2].get("amount_currency", 0) for x in move["line_ids"])
|
|
||||||
else:
|
|
||||||
amount_sum = sum(x.amount_currency for x in move.line_ids)
|
|
||||||
# We have several use case here to compare the currency and amount
|
|
||||||
# currency of counterpart line to balance the move:
|
|
||||||
if (
|
|
||||||
st_line_currency != company_currency
|
|
||||||
and st_line_currency == statement_currency
|
|
||||||
):
|
|
||||||
# company in currency A, statement in currency B and transaction in
|
|
||||||
# currency B
|
|
||||||
# counterpart line must have currency B and correct amount is
|
|
||||||
# inverse of already existing lines
|
|
||||||
amount_currency = -amount_sum
|
|
||||||
elif (
|
|
||||||
st_line_currency != company_currency
|
|
||||||
and statement_currency == company_currency
|
|
||||||
):
|
|
||||||
# company in currency A, statement in currency A and transaction in
|
|
||||||
# currency B
|
|
||||||
# counterpart line must have currency B and correct amount is
|
|
||||||
# inverse of already existing lines
|
|
||||||
amount_currency = -amount_sum
|
|
||||||
elif (
|
|
||||||
st_line_currency != company_currency
|
|
||||||
and st_line_currency != statement_currency
|
|
||||||
):
|
|
||||||
# company in currency A, statement in currency B and transaction in
|
|
||||||
# currency C
|
|
||||||
# counterpart line must have currency B and use rate between B and
|
|
||||||
# C to compute correct amount
|
|
||||||
amount_currency = -amount_sum / st_line_currency_rate
|
|
||||||
elif (
|
|
||||||
st_line_currency == company_currency
|
|
||||||
and statement_currency != company_currency
|
|
||||||
):
|
|
||||||
# company in currency A, statement in currency B and transaction in
|
|
||||||
# currency A
|
|
||||||
# counterpart line must have currency B and amount is computed using
|
|
||||||
# the rate between A and B
|
|
||||||
amount_currency = amount / st_line_currency_rate
|
|
||||||
|
|
||||||
# last case is company in currency A, statement in currency A and
|
self.sequence = self.statement_id.line_ids.ids.index(self.id) + 1
|
||||||
# transaction in currency A
|
counterpart_moves = counterpart_moves | self.move_id
|
||||||
# and in this case counterpart line does not need any second currency
|
|
||||||
# nor amount_currency
|
|
||||||
|
|
||||||
# Check if default_debit or default_credit account are properly configured
|
# Complete dicts to create both counterpart move lines and write-offs
|
||||||
account_id = (
|
to_create = counterpart_aml_dicts + new_aml_dicts
|
||||||
amount >= 0
|
date = self.date or fields.Date.today()
|
||||||
and self.statement_id.journal_id.default_credit_account_id.id
|
for aml_dict in to_create:
|
||||||
or self.statement_id.journal_id.default_debit_account_id.id
|
aml_dict["move_id"] = self.move_id.id
|
||||||
)
|
aml_dict["partner_id"] = self.partner_id.id
|
||||||
|
aml_dict["statement_line_id"] = self.id
|
||||||
|
self._prepare_move_line_for_currency(aml_dict, date)
|
||||||
|
|
||||||
if not account_id:
|
# Create write-offs
|
||||||
raise UserError(
|
for aml_dict in new_aml_dicts:
|
||||||
_(
|
aml_obj.with_context(check_move_validity=False).create(aml_dict)
|
||||||
"No default debit and credit account defined on journal %s "
|
|
||||||
"(ids: %s)."
|
|
||||||
% (
|
|
||||||
self.statement_id.journal_id.name,
|
|
||||||
self.statement_id.journal_id.ids,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
aml_dict = {
|
# Create counterpart move lines and reconcile them
|
||||||
"name": self.name,
|
aml_to_reconcile = []
|
||||||
"partner_id": self.partner_id and self.partner_id.id or False,
|
for aml_dict in counterpart_aml_dicts:
|
||||||
"account_id": account_id,
|
if not aml_dict["move_line"].statement_line_id:
|
||||||
"credit": amount < 0 and -amount or 0.0,
|
aml_dict["move_line"].write({"statement_line_id": self.id})
|
||||||
"debit": amount > 0 and amount or 0.0,
|
if aml_dict["move_line"].partner_id.id:
|
||||||
"statement_line_id": self.id,
|
aml_dict["partner_id"] = aml_dict["move_line"].partner_id.id
|
||||||
"currency_id": statement_currency != company_currency
|
aml_dict["account_id"] = aml_dict["move_line"].account_id.id
|
||||||
and statement_currency.id
|
|
||||||
or (st_line_currency != company_currency and st_line_currency.id or False),
|
|
||||||
"amount_currency": amount_currency,
|
|
||||||
}
|
|
||||||
if isinstance(move, self.env["account.move"].__class__):
|
|
||||||
aml_dict["move_id"] = move.id
|
|
||||||
return aml_dict
|
|
||||||
|
|
||||||
def _get_communication(self, payment_method_id):
|
counterpart_move_line = aml_dict.pop("move_line")
|
||||||
return self.name or ""
|
new_aml = aml_obj.with_context(check_move_validity=False).create(aml_dict)
|
||||||
|
|
||||||
def _prepare_payment_vals(self, total):
|
aml_to_reconcile.append((new_aml, counterpart_move_line))
|
||||||
"""Prepare the dict of values to create the payment from a statement
|
|
||||||
line. This method may be overridden for update dict
|
|
||||||
through model inheritance (make sure to call super() to establish a
|
|
||||||
clean extension chain).
|
|
||||||
|
|
||||||
:param float total: will be used as the amount of the generated payment
|
# Post to allow reconcile
|
||||||
:return: dict of value to create() the account.payment
|
self.move_id.with_context(skip_account_move_synchronization=True).action_post()
|
||||||
"""
|
|
||||||
self.ensure_one()
|
# Reconcile new lines with counterpart
|
||||||
partner_type = False
|
for new_aml, counterpart_move_line in aml_to_reconcile:
|
||||||
if self.partner_id:
|
(new_aml | counterpart_move_line).reconcile()
|
||||||
if total < 0:
|
|
||||||
partner_type = "supplier"
|
self._check_invoice_state(counterpart_move_line.move_id)
|
||||||
else:
|
|
||||||
partner_type = "customer"
|
# Needs to be called manually as lines were created 1 by 1
|
||||||
if not partner_type and self.env.context.get("default_partner_type"):
|
self.move_id.update_lines_tax_exigibility()
|
||||||
partner_type = self.env.context["default_partner_type"]
|
self.move_id.with_context(skip_account_move_synchronization=True).action_post()
|
||||||
currency = self.journal_id.currency_id or self.company_id.currency_id
|
# record the move name on the statement line to be able to retrieve
|
||||||
payment_methods = (
|
# it in case of unreconciliation
|
||||||
(total > 0)
|
self.write({"move_name": self.move_id.name})
|
||||||
and self.journal_id.inbound_payment_method_ids
|
|
||||||
or self.journal_id.outbound_payment_method_ids
|
return counterpart_moves
|
||||||
)
|
|
||||||
return {
|
|
||||||
"payment_method_id": payment_methods and payment_methods[0].id or False,
|
|
||||||
"payment_type": total > 0 and "inbound" or "outbound",
|
|
||||||
"partner_id": self.partner_id.id,
|
|
||||||
"partner_type": partner_type,
|
|
||||||
"journal_id": self.statement_id.journal_id.id,
|
|
||||||
"payment_date": self.date,
|
|
||||||
"state": "reconciled",
|
|
||||||
"currency_id": currency.id,
|
|
||||||
"amount": abs(total),
|
|
||||||
"communication": self._get_communication(
|
|
||||||
payment_methods[0] if payment_methods else False
|
|
||||||
),
|
|
||||||
"name": self.statement_id.name or _("Bank Statement %s") % self.date,
|
|
||||||
}
|
|
||||||
|
|
||||||
def _prepare_move_line_for_currency(self, aml_dict, date):
|
def _prepare_move_line_for_currency(self, aml_dict, date):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
|||||||
@@ -20,3 +20,18 @@ class AccountJournal(models.Model):
|
|||||||
"company_ids": self.mapped("company_id").ids,
|
"company_ids": self.mapped("company_id").ids,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def action_open_reconcile_to_check(self):
|
||||||
|
self.ensure_one()
|
||||||
|
ids = self.to_check_ids().ids
|
||||||
|
action_context = {
|
||||||
|
"show_mode_selector": False,
|
||||||
|
"company_ids": self.mapped("company_id").ids,
|
||||||
|
}
|
||||||
|
action_context.update({"suspense_moves_mode": True})
|
||||||
|
action_context.update({"statement_line_ids": ids})
|
||||||
|
return {
|
||||||
|
"type": "ir.actions.client",
|
||||||
|
"tag": "bank_statement_reconciliation_view",
|
||||||
|
"context": action_context,
|
||||||
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class AccountMoveLine(models.Model):
|
|||||||
|
|
||||||
# post all the writeoff moves at once
|
# post all the writeoff moves at once
|
||||||
if writeoff_moves:
|
if writeoff_moves:
|
||||||
writeoff_moves.post()
|
writeoff_moves.action_post()
|
||||||
|
|
||||||
# Return the writeoff move.line which is to be reconciled
|
# Return the writeoff move.line which is to be reconciled
|
||||||
return line_to_reconcile
|
return line_to_reconcile
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
from psycopg2 import sql
|
||||||
|
|
||||||
from odoo import _, api, models
|
from odoo import _, api, models
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
from odoo.osv import expression
|
from odoo.osv import expression
|
||||||
@@ -86,8 +88,7 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
|
|
||||||
# Blue lines = payment on bank account not assigned to a statement yet
|
# Blue lines = payment on bank account not assigned to a statement yet
|
||||||
aml_accounts = [
|
aml_accounts = [
|
||||||
st_line.journal_id.default_credit_account_id.id,
|
st_line.journal_id.default_account_id.id,
|
||||||
st_line.journal_id.default_debit_account_id.id,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if partner_id is None:
|
if partner_id is None:
|
||||||
@@ -106,7 +107,8 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
from_clause, where_clause, where_clause_params = (
|
from_clause, where_clause, where_clause_params = (
|
||||||
self.env["account.move.line"]._where_calc(domain).get_sql()
|
self.env["account.move.line"]._where_calc(domain).get_sql()
|
||||||
)
|
)
|
||||||
query_str = """
|
query_str = sql.SQL(
|
||||||
|
"""
|
||||||
SELECT "account_move_line".id FROM {from_clause}
|
SELECT "account_move_line".id FROM {from_clause}
|
||||||
{where_str}
|
{where_str}
|
||||||
ORDER BY ("account_move_line".debit -
|
ORDER BY ("account_move_line".debit -
|
||||||
@@ -115,10 +117,11 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
"account_move_line".id ASC
|
"account_move_line".id ASC
|
||||||
{limit_str}
|
{limit_str}
|
||||||
""".format(
|
""".format(
|
||||||
from_clause=from_clause,
|
from_clause=from_clause,
|
||||||
where_str=where_clause and (" WHERE %s" % where_clause) or "",
|
where_str=where_clause and (" WHERE %s" % where_clause) or "",
|
||||||
amount=st_line.amount,
|
amount=st_line.amount,
|
||||||
limit_str=limit and " LIMIT %s" or "",
|
limit_str=limit and " LIMIT %s" or "",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
params = where_clause_params + (limit and [limit] or [])
|
params = where_clause_params + (limit and [limit] or [])
|
||||||
self.env["account.move"].flush()
|
self.env["account.move"].flush()
|
||||||
@@ -290,7 +293,6 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
"""
|
"""
|
||||||
if not bank_statement_line_ids:
|
if not bank_statement_line_ids:
|
||||||
return {}
|
return {}
|
||||||
suspense_moves_mode = self._context.get("suspense_moves_mode")
|
|
||||||
bank_statements = (
|
bank_statements = (
|
||||||
self.env["account.bank.statement.line"]
|
self.env["account.bank.statement.line"]
|
||||||
.browse(bank_statement_line_ids)
|
.browse(bank_statement_line_ids)
|
||||||
@@ -301,17 +303,13 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
SELECT line.id
|
SELECT line.id
|
||||||
FROM account_bank_statement_line line
|
FROM account_bank_statement_line line
|
||||||
LEFT JOIN res_partner p on p.id = line.partner_id
|
LEFT JOIN res_partner p on p.id = line.partner_id
|
||||||
WHERE line.account_id IS NULL
|
INNER JOIN account_bank_statement st ON line.statement_id = st.id
|
||||||
|
AND st.state = 'posted'
|
||||||
|
WHERE line.is_reconciled = FALSE
|
||||||
AND line.amount != 0.0
|
AND line.amount != 0.0
|
||||||
AND line.id IN %(ids)s
|
AND line.id IN %(ids)s
|
||||||
{cond}
|
|
||||||
GROUP BY line.id
|
GROUP BY line.id
|
||||||
""".format(
|
"""
|
||||||
cond=not suspense_moves_mode
|
|
||||||
and """AND NOT EXISTS (SELECT 1 from account_move_line aml
|
|
||||||
WHERE aml.statement_line_id = line.id)"""
|
|
||||||
or "",
|
|
||||||
)
|
|
||||||
self.env.cr.execute(query, {"ids": tuple(bank_statement_line_ids)})
|
self.env.cr.execute(query, {"ids": tuple(bank_statement_line_ids)})
|
||||||
|
|
||||||
domain = [["id", "in", [line.get("id") for line in self.env.cr.dictfetchall()]]]
|
domain = [["id", "in", [line.get("id") for line in self.env.cr.dictfetchall()]]]
|
||||||
@@ -327,6 +325,9 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
|
|
||||||
results.update(
|
results.update(
|
||||||
{
|
{
|
||||||
|
"statement_id": len(bank_statements_left) == 1
|
||||||
|
and bank_statements_left.id
|
||||||
|
or False,
|
||||||
"statement_name": len(bank_statements_left) == 1
|
"statement_name": len(bank_statements_left) == 1
|
||||||
and bank_statements_left.name
|
and bank_statements_left.name
|
||||||
or False,
|
or False,
|
||||||
@@ -403,7 +404,6 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
)
|
)
|
||||||
if aml_ids:
|
if aml_ids:
|
||||||
aml = MoveLine.browse(aml_ids)
|
aml = MoveLine.browse(aml_ids)
|
||||||
aml._check_reconcile_validity()
|
|
||||||
account = aml[0].account_id
|
account = aml[0].account_id
|
||||||
currency = account.currency_id or account.company_id.currency_id
|
currency = account.currency_id or account.company_id.currency_id
|
||||||
return {
|
return {
|
||||||
@@ -489,8 +489,7 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
WHERE l.account_id = a.id
|
WHERE l.account_id = a.id
|
||||||
{inner_where}
|
{inner_where}
|
||||||
AND l.amount_residual != 0
|
AND l.amount_residual != 0
|
||||||
AND (move.state = 'posted' OR (move.state = 'draft'
|
AND move.state = 'posted'
|
||||||
AND journal.post_at = 'bank_rec'))
|
|
||||||
)
|
)
|
||||||
""".format(
|
""".format(
|
||||||
inner_where=is_partner and "AND l.partner_id = p.id" or " "
|
inner_where=is_partner and "AND l.partner_id = p.id" or " "
|
||||||
@@ -504,8 +503,7 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
WHERE l.account_id = a.id
|
WHERE l.account_id = a.id
|
||||||
{inner_where}
|
{inner_where}
|
||||||
AND l.amount_residual > 0
|
AND l.amount_residual > 0
|
||||||
AND (move.state = 'posted'
|
AND move.state = 'posted'
|
||||||
OR (move.state = 'draft' AND journal.post_at = 'bank_rec'))
|
|
||||||
)
|
)
|
||||||
AND EXISTS (
|
AND EXISTS (
|
||||||
SELECT NULL
|
SELECT NULL
|
||||||
@@ -515,13 +513,13 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
WHERE l.account_id = a.id
|
WHERE l.account_id = a.id
|
||||||
{inner_where}
|
{inner_where}
|
||||||
AND l.amount_residual < 0
|
AND l.amount_residual < 0
|
||||||
AND (move.state = 'posted'
|
AND move.state = 'posted'
|
||||||
OR (move.state = 'draft' AND journal.post_at = 'bank_rec'))
|
|
||||||
)
|
)
|
||||||
""".format(
|
""".format(
|
||||||
inner_where=is_partner and "AND l.partner_id = p.id" or " "
|
inner_where=is_partner and "AND l.partner_id = p.id" or " "
|
||||||
)
|
)
|
||||||
query = """
|
query = sql.SQL(
|
||||||
|
"""
|
||||||
SELECT {select} account_id, account_name, account_code, max_date
|
SELECT {select} account_id, account_name, account_code, max_date
|
||||||
FROM (
|
FROM (
|
||||||
SELECT {inner_select}
|
SELECT {inner_select}
|
||||||
@@ -549,35 +547,36 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
) as s
|
) as s
|
||||||
{outer_where}
|
{outer_where}
|
||||||
""".format(
|
""".format(
|
||||||
select=is_partner
|
select=is_partner
|
||||||
and "partner_id, partner_name, to_char(last_time_entries_checked, "
|
and "partner_id, partner_name, to_char(last_time_entries_checked, "
|
||||||
"'YYYY-MM-DD') AS last_time_entries_checked,"
|
"'YYYY-MM-DD') AS last_time_entries_checked,"
|
||||||
or " ",
|
or " ",
|
||||||
inner_select=is_partner
|
inner_select=is_partner
|
||||||
and "p.id AS partner_id, p.name AS partner_name, "
|
and "p.id AS partner_id, p.name AS partner_name, "
|
||||||
"p.last_time_entries_checked AS last_time_entries_checked,"
|
"p.last_time_entries_checked AS last_time_entries_checked,"
|
||||||
or " ",
|
or " ",
|
||||||
inner_from=is_partner
|
inner_from=is_partner
|
||||||
and "RIGHT JOIN res_partner p ON (l.partner_id = p.id)"
|
and "RIGHT JOIN res_partner p ON (l.partner_id = p.id)"
|
||||||
or " ",
|
or " ",
|
||||||
where1=is_partner
|
where1=is_partner
|
||||||
and " "
|
and " "
|
||||||
or "AND ((at.type <> 'payable' AND at.type <> 'receivable') "
|
or "AND ((at.type <> 'payable' AND at.type <> 'receivable') "
|
||||||
"OR l.partner_id IS NULL)",
|
"OR l.partner_id IS NULL)",
|
||||||
where2=account_type and "AND at.type = %(account_type)s" or "",
|
where2=account_type and "AND at.type = %(account_type)s" or "",
|
||||||
where3=res_ids and "AND " + res_alias + ".id in %(res_ids)s" or "",
|
where3=res_ids and "AND " + res_alias + ".id in %(res_ids)s" or "",
|
||||||
company_id=self.env.company.id,
|
company_id=self.env.company.id,
|
||||||
where4=aml_ids and "AND l.id IN %(aml_ids)s" or " ",
|
where4=aml_ids and "AND l.id IN %(aml_ids)s" or " ",
|
||||||
where5=all_entries and all_entries_query or only_dual_entries_query,
|
where5=all_entries and all_entries_query or only_dual_entries_query,
|
||||||
group_by1=is_partner and "l.partner_id, p.id," or " ",
|
group_by1=is_partner and "l.partner_id, p.id," or " ",
|
||||||
group_by2=is_partner and ", p.last_time_entries_checked" or " ",
|
group_by2=is_partner and ", p.last_time_entries_checked" or " ",
|
||||||
order_by=is_partner
|
order_by=is_partner
|
||||||
and "ORDER BY p.last_time_entries_checked"
|
and "ORDER BY p.last_time_entries_checked"
|
||||||
or "ORDER BY a.code",
|
or "ORDER BY a.code",
|
||||||
outer_where=is_partner
|
outer_where=is_partner
|
||||||
and "WHERE (last_time_entries_checked IS NULL "
|
and "WHERE (last_time_entries_checked IS NULL "
|
||||||
"OR max_date > last_time_entries_checked)"
|
"OR max_date > last_time_entries_checked)"
|
||||||
or " ",
|
or " ",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
self.env["account.move.line"].flush()
|
self.env["account.move.line"].flush()
|
||||||
self.env["account.account"].flush()
|
self.env["account.account"].flush()
|
||||||
@@ -822,17 +821,6 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
# line
|
# line
|
||||||
domain = expression.AND([domain, [("company_id", "=", st_line.company_id.id)]])
|
domain = expression.AND([domain, [("company_id", "=", st_line.company_id.id)]])
|
||||||
|
|
||||||
# take only moves in valid state. Draft is accepted only when "Post At"
|
|
||||||
# is set to "Bank Reconciliation" in the associated journal
|
|
||||||
domain_post_at = [
|
|
||||||
"|",
|
|
||||||
"&",
|
|
||||||
("move_id.state", "=", "draft"),
|
|
||||||
("journal_id.post_at", "=", "bank_rec"),
|
|
||||||
("move_id.state", "not in", ["draft", "cancel"]),
|
|
||||||
]
|
|
||||||
domain = expression.AND([domain, domain_post_at])
|
|
||||||
|
|
||||||
if st_line.company_id.account_bank_reconciliation_start:
|
if st_line.company_id.account_bank_reconciliation_start:
|
||||||
domain = expression.AND(
|
domain = expression.AND(
|
||||||
[
|
[
|
||||||
@@ -858,11 +846,7 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
"&",
|
"&",
|
||||||
("reconciled", "=", False),
|
("reconciled", "=", False),
|
||||||
("account_id", "=", account_id),
|
("account_id", "=", account_id),
|
||||||
"|",
|
|
||||||
("move_id.state", "=", "posted"),
|
("move_id.state", "=", "posted"),
|
||||||
"&",
|
|
||||||
("move_id.state", "=", "draft"),
|
|
||||||
("move_id.journal_id.post_at", "=", "bank_rec"),
|
|
||||||
]
|
]
|
||||||
domain = expression.AND([domain, [("balance", "!=", 0.0)]])
|
domain = expression.AND([domain, [("balance", "!=", 0.0)]])
|
||||||
if partner_id:
|
if partner_id:
|
||||||
@@ -1046,7 +1030,8 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
data = {
|
data = {
|
||||||
"id": st_line.id,
|
"id": st_line.id,
|
||||||
"ref": st_line.ref,
|
"ref": st_line.ref,
|
||||||
"note": st_line.note or "",
|
# FIXME: where to fill?
|
||||||
|
# 'note': st_line.note or "",
|
||||||
"name": st_line.name,
|
"name": st_line.name,
|
||||||
"date": format_date(self.env, st_line.date),
|
"date": format_date(self.env, st_line.date),
|
||||||
"amount": amount,
|
"amount": amount,
|
||||||
@@ -1056,11 +1041,11 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
"journal_id": st_line.journal_id.id,
|
"journal_id": st_line.journal_id.id,
|
||||||
"statement_id": st_line.statement_id.id,
|
"statement_id": st_line.statement_id.id,
|
||||||
"account_id": [
|
"account_id": [
|
||||||
st_line.journal_id.default_debit_account_id.id,
|
st_line.journal_id.default_account_id.id,
|
||||||
st_line.journal_id.default_debit_account_id.display_name,
|
st_line.journal_id.default_account_id.display_name,
|
||||||
],
|
],
|
||||||
"account_code": st_line.journal_id.default_debit_account_id.code,
|
"account_code": st_line.journal_id.default_account_id.code,
|
||||||
"account_name": st_line.journal_id.default_debit_account_id.name,
|
"account_name": st_line.journal_id.default_account_id.name,
|
||||||
"partner_name": st_line.partner_id.name,
|
"partner_name": st_line.partner_id.name,
|
||||||
"communication_partner_name": st_line.partner_name,
|
"communication_partner_name": st_line.partner_name,
|
||||||
# Amount in the statement currency
|
# Amount in the statement currency
|
||||||
@@ -1091,20 +1076,19 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
where_str = where_clause and (" WHERE %s" % where_clause) or ""
|
where_str = where_clause and (" WHERE %s" % where_clause) or ""
|
||||||
|
|
||||||
# Get pairs
|
# Get pairs
|
||||||
query = """
|
query = sql.SQL(
|
||||||
|
"""
|
||||||
SELECT a.id, b.id
|
SELECT a.id, b.id
|
||||||
FROM account_move_line a, account_move_line b,
|
FROM account_move_line a, account_move_line b,
|
||||||
account_move move_a, account_move move_b,
|
account_move move_a, account_move move_b,
|
||||||
account_journal journal_a, account_journal journal_b
|
account_journal journal_a, account_journal journal_b
|
||||||
WHERE a.id != b.id
|
WHERE a.id != b.id
|
||||||
AND move_a.id = a.move_id
|
AND move_a.id = a.move_id
|
||||||
AND (move_a.state = 'posted'
|
AND move_a.state = 'posted'
|
||||||
OR (move_a.state = 'draft' AND journal_a.post_at = 'bank_rec'))
|
|
||||||
AND move_a.journal_id = journal_a.id
|
AND move_a.journal_id = journal_a.id
|
||||||
AND move_b.id = b.move_id
|
AND move_b.id = b.move_id
|
||||||
AND move_b.journal_id = journal_b.id
|
AND move_b.journal_id = journal_b.id
|
||||||
AND (move_b.state = 'posted'
|
AND move_b.state = 'posted'
|
||||||
OR (move_b.state = 'draft' AND journal_b.post_at = 'bank_rec'))
|
|
||||||
AND a.amount_residual = -b.amount_residual
|
AND a.amount_residual = -b.amount_residual
|
||||||
AND a.balance != 0.0
|
AND a.balance != 0.0
|
||||||
AND b.balance != 0.0
|
AND b.balance != 0.0
|
||||||
@@ -1118,7 +1102,8 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
ORDER BY a.date desc
|
ORDER BY a.date desc
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
""".format(
|
""".format(
|
||||||
from_clause + where_str
|
from_clause + where_str
|
||||||
|
)
|
||||||
)
|
)
|
||||||
move_line_id = self.env.context.get("move_line_id") or None
|
move_line_id = self.env.context.get("move_line_id") or None
|
||||||
params = (
|
params = (
|
||||||
|
|||||||
1
account_reconciliation_widget/readme/CONTRIBUTORS.rst
Normal file
1
account_reconciliation_widget/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* Tecnativa - Pedro M. Baeza
|
||||||
2
account_reconciliation_widget/readme/DESCRIPTION.rst
Normal file
2
account_reconciliation_widget/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
This module restores account reconciliation widget moved from Odoo community to enterpise in V. 14.0
|
||||||
|
Provides two widgets designed to reconcile move lines in a easy way: one focused on bank statements and another for generic use.
|
||||||
9
account_reconciliation_widget/readme/USAGE.rst
Normal file
9
account_reconciliation_widget/readme/USAGE.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
With an user with full accounting features enabled:
|
||||||
|
|
||||||
|
Invoicing --> Accounting --> Actions --> Reconciliation.
|
||||||
|
|
||||||
|
From journal items list view you can select check of them and click Action --> Reconcile.
|
||||||
|
|
||||||
|
From accounting dashboard you can use reconcile button in Bank / Cash journals.
|
||||||
|
|
||||||
|
Also, you can navigate to statements and use the reconcile button.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_account_reconciliation_widget_group_invoice,account_reconciliation_widget.group_invoice,model_account_reconciliation_widget,account.group_account_invoice,1,1,1,1
|
||||||
|
429
account_reconciliation_widget/static/description/index.html
Normal file
429
account_reconciliation_widget/static/description/index.html
Normal file
@@ -0,0 +1,429 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<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: http://docutils.sourceforge.net/" />
|
||||||
|
<title>account_reconciliation_widget</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
/*
|
||||||
|
:Author: David Goodger (goodger@python.org)
|
||||||
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||||
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
|
||||||
|
Default cascading style sheet for the HTML output of Docutils.
|
||||||
|
|
||||||
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||||
|
customize this style sheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* used to remove borders from tables and images */
|
||||||
|
.borderless, table.borderless td, table.borderless th {
|
||||||
|
border: 0 }
|
||||||
|
|
||||||
|
table.borderless td, table.borderless th {
|
||||||
|
/* Override padding for "table.docutils td" with "! important".
|
||||||
|
The right padding separates the table cells. */
|
||||||
|
padding: 0 0.5em 0 0 ! important }
|
||||||
|
|
||||||
|
.first {
|
||||||
|
/* Override more specific margin styles with "! important". */
|
||||||
|
margin-top: 0 ! important }
|
||||||
|
|
||||||
|
.last, .with-subtitle {
|
||||||
|
margin-bottom: 0 ! important }
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none }
|
||||||
|
|
||||||
|
.subscript {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
.superscript {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
a.toc-backref {
|
||||||
|
text-decoration: none ;
|
||||||
|
color: black }
|
||||||
|
|
||||||
|
blockquote.epigraph {
|
||||||
|
margin: 2em 5em ; }
|
||||||
|
|
||||||
|
dl.docutils dd {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||||
|
dl.docutils dt {
|
||||||
|
font-weight: bold }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.abstract {
|
||||||
|
margin: 2em 5em }
|
||||||
|
|
||||||
|
div.abstract p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||||
|
div.hint, div.important, div.note, div.tip, div.warning {
|
||||||
|
margin: 2em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||||
|
div.important p.admonition-title, div.note p.admonition-title,
|
||||||
|
div.tip p.admonition-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||||
|
div.danger p.admonition-title, div.error p.admonition-title,
|
||||||
|
div.warning p.admonition-title, .code .error {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||||
|
compound paragraphs.
|
||||||
|
div.compound .compound-first, div.compound .compound-middle {
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
div.compound .compound-last, div.compound .compound-middle {
|
||||||
|
margin-top: 0.5em }
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.dedication {
|
||||||
|
margin: 2em 5em ;
|
||||||
|
text-align: center ;
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
div.dedication p.topic-title {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-style: normal }
|
||||||
|
|
||||||
|
div.figure {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
div.footer, div.header {
|
||||||
|
clear: both;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
div.line-block {
|
||||||
|
display: block ;
|
||||||
|
margin-top: 1em ;
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
div.line-block div.line-block {
|
||||||
|
margin-top: 0 ;
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-left: 1.5em }
|
||||||
|
|
||||||
|
div.sidebar {
|
||||||
|
margin: 0 0 0.5em 1em ;
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em ;
|
||||||
|
background-color: #ffffee ;
|
||||||
|
width: 40% ;
|
||||||
|
float: right ;
|
||||||
|
clear: right }
|
||||||
|
|
||||||
|
div.sidebar p.rubric {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-size: medium }
|
||||||
|
|
||||||
|
div.system-messages {
|
||||||
|
margin: 5em }
|
||||||
|
|
||||||
|
div.system-messages h1 {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
div.system-message {
|
||||||
|
border: medium outset ;
|
||||||
|
padding: 1em }
|
||||||
|
|
||||||
|
div.system-message p.system-message-title {
|
||||||
|
color: red ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
div.topic {
|
||||||
|
margin: 2em }
|
||||||
|
|
||||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||||
|
margin-top: 0.4em }
|
||||||
|
|
||||||
|
h1.title {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
h2.subtitle {
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
hr.docutils {
|
||||||
|
width: 75% }
|
||||||
|
|
||||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||||
|
clear: left ;
|
||||||
|
float: left ;
|
||||||
|
margin-right: 1em }
|
||||||
|
|
||||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||||
|
clear: right ;
|
||||||
|
float: right ;
|
||||||
|
margin-left: 1em }
|
||||||
|
|
||||||
|
img.align-center, .figure.align-center, object.align-center {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-center {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left }
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
clear: both ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right }
|
||||||
|
|
||||||
|
/* reset inner alignment in figures */
|
||||||
|
div.align-right {
|
||||||
|
text-align: inherit }
|
||||||
|
|
||||||
|
/* div.align-center * { */
|
||||||
|
/* text-align: left } */
|
||||||
|
|
||||||
|
.align-top {
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
.align-middle {
|
||||||
|
vertical-align: middle }
|
||||||
|
|
||||||
|
.align-bottom {
|
||||||
|
vertical-align: bottom }
|
||||||
|
|
||||||
|
ol.simple, ul.simple {
|
||||||
|
margin-bottom: 1em }
|
||||||
|
|
||||||
|
ol.arabic {
|
||||||
|
list-style: decimal }
|
||||||
|
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style: lower-alpha }
|
||||||
|
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style: upper-alpha }
|
||||||
|
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style: lower-roman }
|
||||||
|
|
||||||
|
ol.upperroman {
|
||||||
|
list-style: upper-roman }
|
||||||
|
|
||||||
|
p.attribution {
|
||||||
|
text-align: right ;
|
||||||
|
margin-left: 50% }
|
||||||
|
|
||||||
|
p.caption {
|
||||||
|
font-style: italic }
|
||||||
|
|
||||||
|
p.credits {
|
||||||
|
font-style: italic ;
|
||||||
|
font-size: smaller }
|
||||||
|
|
||||||
|
p.label {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
p.rubric {
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger ;
|
||||||
|
color: maroon ;
|
||||||
|
text-align: center }
|
||||||
|
|
||||||
|
p.sidebar-title {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold ;
|
||||||
|
font-size: larger }
|
||||||
|
|
||||||
|
p.sidebar-subtitle {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
p.topic-title {
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
pre.address {
|
||||||
|
margin-bottom: 0 ;
|
||||||
|
margin-top: 0 ;
|
||||||
|
font: inherit }
|
||||||
|
|
||||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||||
|
margin-left: 2em ;
|
||||||
|
margin-right: 2em }
|
||||||
|
|
||||||
|
pre.code .ln { color: grey; } /* line numbers */
|
||||||
|
pre.code, code { background-color: #eeeeee }
|
||||||
|
pre.code .comment, code .comment { color: #5C6576 }
|
||||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||||
|
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||||
|
|
||||||
|
span.classifier {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-style: oblique }
|
||||||
|
|
||||||
|
span.classifier-delimiter {
|
||||||
|
font-family: sans-serif ;
|
||||||
|
font-weight: bold }
|
||||||
|
|
||||||
|
span.interpreted {
|
||||||
|
font-family: sans-serif }
|
||||||
|
|
||||||
|
span.option {
|
||||||
|
white-space: nowrap }
|
||||||
|
|
||||||
|
span.pre {
|
||||||
|
white-space: pre }
|
||||||
|
|
||||||
|
span.problematic {
|
||||||
|
color: red }
|
||||||
|
|
||||||
|
span.section-subtitle {
|
||||||
|
/* font-size relative to parent (h1..h6 element) */
|
||||||
|
font-size: 80% }
|
||||||
|
|
||||||
|
table.citation {
|
||||||
|
border-left: solid 1px gray;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docinfo {
|
||||||
|
margin: 2em 4em }
|
||||||
|
|
||||||
|
table.docutils {
|
||||||
|
margin-top: 0.5em ;
|
||||||
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
|
table.footnote {
|
||||||
|
border-left: solid 1px black;
|
||||||
|
margin-left: 1px }
|
||||||
|
|
||||||
|
table.docutils td, table.docutils th,
|
||||||
|
table.docinfo td, table.docinfo th {
|
||||||
|
padding-left: 0.5em ;
|
||||||
|
padding-right: 0.5em ;
|
||||||
|
vertical-align: top }
|
||||||
|
|
||||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||||
|
font-weight: bold ;
|
||||||
|
text-align: left ;
|
||||||
|
white-space: nowrap ;
|
||||||
|
padding-left: 0 }
|
||||||
|
|
||||||
|
/* "booktabs" style (no vertical lines) */
|
||||||
|
table.docutils.booktabs {
|
||||||
|
border: 0px;
|
||||||
|
border-top: 2px solid;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs * {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
table.docutils.booktabs th {
|
||||||
|
border-bottom: thin solid;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||||
|
font-size: 100% }
|
||||||
|
|
||||||
|
ul.auto-toc {
|
||||||
|
list-style-type: none }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="document" id="account-reconciliation-widget">
|
||||||
|
<h1 class="title">account_reconciliation_widget</h1>
|
||||||
|
|
||||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! 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="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_reconciliation_widget/tree/14.0/account_reconciliation_widget"><img alt="OCA/account_reconciliation_widget" src="https://img.shields.io/badge/github-OCA%2Faccount_reconciliation_widget-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account_reconciliation_widget-14-0/account_reconciliation_widget-14-0-account_reconciliation_widget"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a></p>
|
||||||
|
<p>This module restores account reconciliation widget moved from Odoo community to enterpise in V. 14.0
|
||||||
|
Provides two widgets designed to reconcile move lines in a easy way: one focused on bank statements and another for generic use.</p>
|
||||||
|
<p><strong>Table of contents</strong></p>
|
||||||
|
<div class="contents local topic" id="contents">
|
||||||
|
<ul class="simple">
|
||||||
|
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
||||||
|
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
|
||||||
|
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
|
||||||
|
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
|
||||||
|
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
|
||||||
|
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="usage">
|
||||||
|
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
||||||
|
<p>With an user with full accounting features enabled:</p>
|
||||||
|
<p>Invoicing –> Accounting –> Actions –> Reconciliation.</p>
|
||||||
|
<p>From journal items list view you can select check of them and click Action –> Reconcile.</p>
|
||||||
|
<p>From accounting dashboard you can use reconcile button in Bank / Cash journals.</p>
|
||||||
|
<p>Also, you can navigate to statements and use the reconcile button.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="bug-tracker">
|
||||||
|
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
|
||||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account_reconciliation_widget/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_reconciliation_widget/issues/new?body=module:%20account_reconciliation_widget%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>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="credits">
|
||||||
|
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
|
||||||
|
<div class="section" id="authors">
|
||||||
|
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Ozono Multimedia</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="contributors">
|
||||||
|
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>Tecnativa - Pedro M. Baeza</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="maintainers">
|
||||||
|
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
|
||||||
|
<p>This module is maintained by the OCA.</p>
|
||||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.</p>
|
||||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account_reconciliation_widget/tree/14.0/account_reconciliation_widget">OCA/account_reconciliation_widget</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>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -32,7 +32,6 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
close_statement: "_onCloseStatement",
|
close_statement: "_onCloseStatement",
|
||||||
load_more: "_onLoadMore",
|
load_more: "_onLoadMore",
|
||||||
reload: "reload",
|
reload: "reload",
|
||||||
search: "_onSearch",
|
|
||||||
navigation_move: "_onNavigationMove",
|
navigation_move: "_onNavigationMove",
|
||||||
},
|
},
|
||||||
config: _.extend({}, AbstractAction.prototype.config, {
|
config: _.extend({}, AbstractAction.prototype.config, {
|
||||||
@@ -52,6 +51,7 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
|
|
||||||
_onNavigationMove: function (ev) {
|
_onNavigationMove: function (ev) {
|
||||||
var non_reconciled_keys = _.keys(
|
var non_reconciled_keys = _.keys(
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_.pick(this.model.lines, function (value, key, object) {
|
_.pick(this.model.lines, function (value, key, object) {
|
||||||
return !value.reconciled;
|
return !value.reconciled;
|
||||||
})
|
})
|
||||||
@@ -86,7 +86,8 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.action_manager = parent;
|
this.action_manager = parent;
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.controlPanelParams.modelName = "account.bank.statement.line";
|
this.searchModelConfig.modelName = "account.bank.statement.line";
|
||||||
|
this.controlPanelProps.cp_content = {};
|
||||||
this.model = new this.config.Model(this, {
|
this.model = new this.config.Model(this, {
|
||||||
modelName: "account.reconciliation.widget",
|
modelName: "account.reconciliation.widget",
|
||||||
defaultDisplayQty:
|
defaultDisplayQty:
|
||||||
@@ -191,7 +192,10 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
initialState.valuenow = valuenow;
|
initialState.valuenow = valuenow;
|
||||||
initialState.context = self.model.getContext();
|
initialState.context = self.model.getContext();
|
||||||
self.renderer.showRainbowMan(initialState);
|
self.renderer.showRainbowMan(initialState);
|
||||||
self.remove_cp();
|
self.controlPanelProps.cp_content = {
|
||||||
|
$buttons: $(),
|
||||||
|
$pager: $(),
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
// Create a notification if some lines have been reconciled automatically.
|
// Create a notification if some lines have been reconciled automatically.
|
||||||
if (initialState.valuenow > 0)
|
if (initialState.valuenow > 0)
|
||||||
@@ -234,12 +238,11 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
this.$pager = $(
|
this.$pager = $(
|
||||||
QWeb.render("reconciliation.control.pager", {widget: this.renderer})
|
QWeb.render("reconciliation.control.pager", {widget: this.renderer})
|
||||||
);
|
);
|
||||||
this.updateControlPanel({
|
|
||||||
clear: true,
|
this.controlPanelProps.cp_content = {
|
||||||
cp_content: {
|
$buttons: $(),
|
||||||
$pager: this.$pager,
|
$pager: this.$pager,
|
||||||
},
|
};
|
||||||
});
|
|
||||||
this.renderer.$progress = this.$pager;
|
this.renderer.$progress = this.$pager;
|
||||||
$(this.renderer.$progress)
|
$(this.renderer.$progress)
|
||||||
.parent()
|
.parent()
|
||||||
@@ -248,12 +251,6 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
remove_cp: function () {
|
|
||||||
this.updateControlPanel({
|
|
||||||
clear: true,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// Private
|
// Private
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -384,12 +381,11 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {OdooEvent} ev
|
* @param {Object} searchQuery
|
||||||
*/
|
*/
|
||||||
_onSearch: function (ev) {
|
_onSearch: function (searchQuery) {
|
||||||
var self = this;
|
var self = this;
|
||||||
ev.stopPropagation();
|
this.model.domain = searchQuery.domain;
|
||||||
this.model.domain = ev.data.domain;
|
|
||||||
this.model.display_context = "search";
|
this.model.display_context = "search";
|
||||||
self.reload().then(function () {
|
self.reload().then(function () {
|
||||||
self.renderer._updateProgressBar({
|
self.renderer._updateProgressBar({
|
||||||
@@ -402,7 +398,6 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
_onActionPartialAmount: function (event) {
|
_onActionPartialAmount: function (event) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var handle = event.target.handle;
|
var handle = event.target.handle;
|
||||||
var line = this.model.getLine(handle);
|
|
||||||
var amount = this.model.getPartialReconcileAmount(handle, event.data);
|
var amount = this.model.getPartialReconcileAmount(handle, event.data);
|
||||||
self._getWidget(handle).updatePartialAmount(event.data.data, amount);
|
self._getWidget(handle).updatePartialAmount(event.data.data, amount);
|
||||||
},
|
},
|
||||||
@@ -413,12 +408,13 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
* @private
|
* @private
|
||||||
* @param {OdooEvent} event
|
* @param {OdooEvent} event
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_onCloseStatement: function (event) {
|
_onCloseStatement: function (event) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return this.model.closeStatement().then(function (result) {
|
return this.model.closeStatement().then(function (result) {
|
||||||
self.do_action({
|
self.do_action({
|
||||||
name: "Bank Statements",
|
name: "Bank Statements",
|
||||||
res_model: "account.bank.statement.line",
|
res_model: "account.bank.statement",
|
||||||
res_id: result,
|
res_id: result,
|
||||||
views: [[false, "form"]],
|
views: [[false, "form"]],
|
||||||
type: "ir.actions.act_window",
|
type: "ir.actions.act_window",
|
||||||
@@ -432,6 +428,7 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
*
|
*
|
||||||
* @param {OdooEvent} event
|
* @param {OdooEvent} event
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_onLoadMore: function (event) {
|
_onLoadMore: function (event) {
|
||||||
return this._loadMore(this.model.defaultDisplayQty);
|
return this._loadMore(this.model.defaultDisplayQty);
|
||||||
},
|
},
|
||||||
@@ -466,7 +463,7 @@ odoo.define("account.ReconciliationClientAction", function (require) {
|
|||||||
self.widgets.splice(index, 1);
|
self.widgets.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Get number of widget and if less than constant and if there are more to laod, load until constant
|
// Get number of widget and if less than constant and if there are more to load, load until constant
|
||||||
if (
|
if (
|
||||||
self.widgets.length < self.model.defaultDisplayQty &&
|
self.widgets.length < self.model.defaultDisplayQty &&
|
||||||
self.model.valuemax - self.model.valuenow >=
|
self.model.valuemax - self.model.valuenow >=
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
var field_utils = require("web.field_utils");
|
var field_utils = require("web.field_utils");
|
||||||
var utils = require("web.utils");
|
var utils = require("web.utils");
|
||||||
var session = require("web.session");
|
var session = require("web.session");
|
||||||
var WarningDialog = require("web.CrashManager").WarningDialog;
|
|
||||||
var core = require("web.core");
|
var core = require("web.core");
|
||||||
var _t = core._t;
|
var _t = core._t;
|
||||||
|
|
||||||
@@ -50,7 +49,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
* label: string
|
* label: string
|
||||||
* amount: number - real amount
|
* amount: number - real amount
|
||||||
* amount_str: string - formated amount
|
* amount_str: string - formated amount
|
||||||
* [already_paid]: boolean
|
* [is_liquidity_line]: boolean
|
||||||
* [partner_id]: integer
|
* [partner_id]: integer
|
||||||
* [partner_name]: string
|
* [partner_name]: string
|
||||||
* [account_code]: string
|
* [account_code]: string
|
||||||
@@ -140,7 +139,6 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
addProposition: function (handle, mv_line_id) {
|
addProposition: function (handle, mv_line_id) {
|
||||||
var self = this;
|
|
||||||
var line = this.getLine(handle);
|
var line = this.getLine(handle);
|
||||||
var prop = _.clone(_.find(line["mv_lines_" + line.mode], {id: mv_line_id}));
|
var prop = _.clone(_.find(line["mv_lines_" + line.mode], {id: mv_line_id}));
|
||||||
this._addProposition(line, prop);
|
this._addProposition(line, prop);
|
||||||
@@ -307,11 +305,11 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
closeStatement: function () {
|
closeStatement: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
model: "account.bank.statement.line",
|
model: "account.bank.statement",
|
||||||
method: "button_confirm_bank",
|
method: "button_validate",
|
||||||
args: [self.bank_statement_line_id.id],
|
args: [self.statement.statement_id],
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return self.bank_statement_line_id.id;
|
return self.statement.statement_id;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -807,6 +805,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
// Check if we have another line with to_check and if yes don't change value of this proposition
|
// Check if we have another line with to_check and if yes don't change value of this proposition
|
||||||
prop.to_check = line.reconciliation_proposition.some(function (
|
prop.to_check = line.reconciliation_proposition.some(function (
|
||||||
rec_prop,
|
rec_prop,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
index
|
index
|
||||||
) {
|
) {
|
||||||
return rec_prop.id !== prop.id && rec_prop.to_check;
|
return rec_prop.id !== prop.id && rec_prop.to_check;
|
||||||
@@ -928,7 +927,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
var props = _.filter(line.reconciliation_proposition, function (prop) {
|
var props = _.filter(line.reconciliation_proposition, function (prop) {
|
||||||
return !prop.invalid;
|
return !prop.invalid;
|
||||||
});
|
});
|
||||||
var computeLinePromise;
|
var computeLinePromise = null;
|
||||||
if (props.length === 0) {
|
if (props.length === 0) {
|
||||||
// Usability: if user has not chosen any lines and click validate, it has the same behavior
|
// Usability: if user has not chosen any lines and click validate, it has the same behavior
|
||||||
// as creating a write-off of the same amount.
|
// as creating a write-off of the same amount.
|
||||||
@@ -951,13 +950,13 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
partner_id: line.st_line.partner_id,
|
partner_id: line.st_line.partner_id,
|
||||||
counterpart_aml_dicts: _.map(
|
counterpart_aml_dicts: _.map(
|
||||||
_.filter(props, function (prop) {
|
_.filter(props, function (prop) {
|
||||||
return !isNaN(prop.id) && !prop.already_paid;
|
return !isNaN(prop.id) && !prop.is_liquidity_line;
|
||||||
}),
|
}),
|
||||||
self._formatToProcessReconciliation.bind(self, line)
|
self._formatToProcessReconciliation.bind(self, line)
|
||||||
),
|
),
|
||||||
payment_aml_ids: _.pluck(
|
payment_aml_ids: _.pluck(
|
||||||
_.filter(props, function (prop) {
|
_.filter(props, function (prop) {
|
||||||
return !isNaN(prop.id) && prop.already_paid;
|
return !isNaN(prop.id) && prop.is_liquidity_line;
|
||||||
}),
|
}),
|
||||||
"id"
|
"id"
|
||||||
),
|
),
|
||||||
@@ -1124,7 +1123,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!prop.already_paid && parseInt(prop.id)) {
|
if (!prop.is_liquidity_line && parseInt(prop.id)) {
|
||||||
prop.is_move_line = true;
|
prop.is_move_line = true;
|
||||||
}
|
}
|
||||||
reconciliation_proposition.push(prop);
|
reconciliation_proposition.push(prop);
|
||||||
@@ -1135,6 +1134,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
prop.__tax_to_recompute &&
|
prop.__tax_to_recompute &&
|
||||||
prop.base_amount
|
prop.base_amount
|
||||||
) {
|
) {
|
||||||
|
// (OZM) REVISAR
|
||||||
reconciliation_proposition = _.filter(
|
reconciliation_proposition = _.filter(
|
||||||
reconciliation_proposition,
|
reconciliation_proposition,
|
||||||
function (p) {
|
function (p) {
|
||||||
@@ -1170,10 +1170,10 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
tax_ids: tax.tax_ids,
|
tax_ids: tax.tax_ids,
|
||||||
tax_repartition_line_id:
|
tax_repartition_line_id:
|
||||||
tax.tax_repartition_line_id,
|
tax.tax_repartition_line_id,
|
||||||
tag_ids: tax.tag_ids,
|
tax_tag_ids: tax.tag_ids,
|
||||||
amount: tax.amount,
|
amount: tax.amount,
|
||||||
label: prop.label
|
name: prop.name
|
||||||
? prop.label + " " + tax.name
|
? prop.name + " " + tax.name
|
||||||
: tax.name,
|
: tax.name,
|
||||||
date: prop.date,
|
date: prop.date,
|
||||||
account_id: tax.account_id
|
account_id: tax.account_id
|
||||||
@@ -1205,7 +1205,9 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
reconciliation_proposition.push(tax_prop);
|
reconciliation_proposition.push(tax_prop);
|
||||||
});
|
});
|
||||||
|
|
||||||
prop.tag_ids = result.base_tags;
|
prop.tax_tag_ids = self._formatMany2ManyTagsTax(
|
||||||
|
result.base_tags || []
|
||||||
|
);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -1571,7 +1573,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
var formatOptions = {
|
var formatOptions = {
|
||||||
currency_id: line.st_line.currency_id,
|
currency_id: line.st_line.currency_id,
|
||||||
};
|
};
|
||||||
var amount;
|
var amount = 0;
|
||||||
switch (values.amount_type) {
|
switch (values.amount_type) {
|
||||||
case "percentage":
|
case "percentage":
|
||||||
amount = (line.balance.amount * values.amount) / 100;
|
amount = (line.balance.amount * values.amount) / 100;
|
||||||
@@ -1580,7 +1582,6 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
var matching = line.st_line.name.match(
|
var matching = line.st_line.name.match(
|
||||||
new RegExp(values.amount_from_label_regex)
|
new RegExp(values.amount_from_label_regex)
|
||||||
);
|
);
|
||||||
amount = 0;
|
|
||||||
if (matching && matching.length == 2) {
|
if (matching && matching.length == 2) {
|
||||||
matching = matching[1].replace(
|
matching = matching[1].replace(
|
||||||
new RegExp("\\D" + values.decimal_separator, "g"),
|
new RegExp("\\D" + values.decimal_separator, "g"),
|
||||||
@@ -1714,7 +1715,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
function (prop) {
|
function (prop) {
|
||||||
return _.isNumber(prop.id) ? prop.id : null;
|
return _.isNumber(prop.id) ? prop.id : null;
|
||||||
}
|
}
|
||||||
).filter((id) => id != null);
|
).filter((id) => id !== null);
|
||||||
var filter = line["filter_" + mode] || "";
|
var filter = line["filter_" + mode] || "";
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
model: "account.reconciliation.widget",
|
model: "account.reconciliation.widget",
|
||||||
@@ -1783,8 +1784,8 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
* @param {Object[]} data.moves list of processed account.move
|
* @param {Object[]} data.moves list of processed account.move
|
||||||
* @returns {Deferred}
|
* @returns {Deferred}
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_validatePostProcess: function (data) {
|
_validatePostProcess: function (data) {
|
||||||
var self = this;
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -2288,7 +2289,7 @@ odoo.define("account.ReconciliationModel", function (require) {
|
|||||||
function (prop) {
|
function (prop) {
|
||||||
return _.isNumber(prop.id) ? prop.id : null;
|
return _.isNumber(prop.id) ? prop.id : null;
|
||||||
}
|
}
|
||||||
).filter((id) => id != null);
|
).filter((id) => id !== null);
|
||||||
var filter = line.filter_match || "";
|
var filter = line.filter_match || "";
|
||||||
var args = [
|
var args = [
|
||||||
line.account_id.id,
|
line.account_id.id,
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
start: function () {
|
start: function () {
|
||||||
var self = this;
|
|
||||||
var defs = [this._super.apply(this, arguments)];
|
var defs = [this._super.apply(this, arguments)];
|
||||||
this.time = Date.now();
|
this.time = Date.now();
|
||||||
this.$progress = $("");
|
this.$progress = $("");
|
||||||
@@ -98,7 +97,6 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
* @param {[object]} [state.notifications]
|
* @param {[object]} [state.notifications]
|
||||||
*/
|
*/
|
||||||
update: function (state) {
|
update: function (state) {
|
||||||
var self = this;
|
|
||||||
this._updateProgressBar(state);
|
this._updateProgressBar(state);
|
||||||
|
|
||||||
if (state.valuenow === state.valuemax && !this.$(".done_message").length) {
|
if (state.valuenow === state.valuemax && !this.$(".done_message").length) {
|
||||||
@@ -147,6 +145,7 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
* close and then open form view of bank statement
|
* close and then open form view of bank statement
|
||||||
* @param {MouseEvent} event
|
* @param {MouseEvent} event
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_onCloseBankStatement: function (e) {
|
_onCloseBankStatement: function (e) {
|
||||||
this.trigger_up("close_statement");
|
this.trigger_up("close_statement");
|
||||||
},
|
},
|
||||||
@@ -215,6 +214,7 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
* @private
|
* @private
|
||||||
* @param {MouseEvent} event
|
* @param {MouseEvent} event
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_onLoadMore: function (e) {
|
_onLoadMore: function (e) {
|
||||||
this.trigger_up("load_more");
|
this.trigger_up("load_more");
|
||||||
},
|
},
|
||||||
@@ -428,7 +428,6 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
|
|
||||||
// Search propositions that could be a partial credit/debit.
|
// Search propositions that could be a partial credit/debit.
|
||||||
var props = [];
|
var props = [];
|
||||||
var balance = state.balance.amount_currency;
|
|
||||||
_.each(state.reconciliation_proposition, function (prop) {
|
_.each(state.reconciliation_proposition, function (prop) {
|
||||||
if (prop.display) {
|
if (prop.display) {
|
||||||
props.push(prop);
|
props.push(prop);
|
||||||
@@ -460,8 +459,6 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
var matching_modes = self.model.modes.filter((x) => x.startsWith("match"));
|
var matching_modes = self.model.modes.filter((x) => x.startsWith("match"));
|
||||||
for (let i = 0; i < matching_modes.length; i++) {
|
for (let i = 0; i < matching_modes.length; i++) {
|
||||||
var stateMvLines = state["mv_lines_" + matching_modes[i]] || [];
|
var stateMvLines = state["mv_lines_" + matching_modes[i]] || [];
|
||||||
var recs_count =
|
|
||||||
stateMvLines.length > 0 ? stateMvLines[0].recs_count : 0;
|
|
||||||
var remaining = state["remaining_" + matching_modes[i]];
|
var remaining = state["remaining_" + matching_modes[i]];
|
||||||
var $mv_lines = this.$(
|
var $mv_lines = this.$(
|
||||||
'div[id*="notebook_page_' +
|
'div[id*="notebook_page_' +
|
||||||
@@ -517,7 +514,7 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
|
|
||||||
// Create form
|
// Create form
|
||||||
if (state.createForm) {
|
if (state.createForm) {
|
||||||
var createPromise;
|
var createPromise = null;
|
||||||
if (!this.fields.account_id) {
|
if (!this.fields.account_id) {
|
||||||
createPromise = this._renderCreate(state);
|
createPromise = this._renderCreate(state);
|
||||||
}
|
}
|
||||||
@@ -822,6 +819,11 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
group_acc: self.group_acc,
|
group_acc: self.group_acc,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function addRequiredStyle(widget) {
|
||||||
|
widget.$el.addClass("o_required_modifier");
|
||||||
|
}
|
||||||
|
|
||||||
self.fields.account_id
|
self.fields.account_id
|
||||||
.appendTo($create.find(".create_account_id .o_td_field"))
|
.appendTo($create.find(".create_account_id .o_td_field"))
|
||||||
.then(addRequiredStyle.bind(self, self.fields.account_id));
|
.then(addRequiredStyle.bind(self, self.fields.account_id));
|
||||||
@@ -851,10 +853,6 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
$create.find(".create_to_check .o_td_field")
|
$create.find(".create_to_check .o_td_field")
|
||||||
);
|
);
|
||||||
self.$(".create").append($create);
|
self.$(".create").append($create);
|
||||||
|
|
||||||
function addRequiredStyle(widget) {
|
|
||||||
widget.$el.addClass("o_required_modifier");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1060,7 +1058,9 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
* @param {MouseEvent} event
|
* @param {MouseEvent} event
|
||||||
*/
|
*/
|
||||||
_onQuickCreateProposition: function (event) {
|
_onQuickCreateProposition: function (event) {
|
||||||
document.activeElement && document.activeElement.blur();
|
if (document.activeElement) {
|
||||||
|
document.activeElement.blur();
|
||||||
|
}
|
||||||
this.trigger_up("quick_create_proposition", {
|
this.trigger_up("quick_create_proposition", {
|
||||||
data: $(event.target).data("reconcile-model-id"),
|
data: $(event.target).data("reconcile-model-id"),
|
||||||
});
|
});
|
||||||
@@ -1069,7 +1069,9 @@ odoo.define("account.ReconciliationRenderer", function (require) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_onCreateProposition: function () {
|
_onCreateProposition: function () {
|
||||||
document.activeElement && document.activeElement.blur();
|
if (document.activeElement) {
|
||||||
|
document.activeElement.blur();
|
||||||
|
}
|
||||||
var invalid = [];
|
var invalid = [];
|
||||||
_.each(this.fields, function (field) {
|
_.each(this.fields, function (field) {
|
||||||
if (!field.isValid()) {
|
if (!field.isValid()) {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
rel="do_action"
|
rel="do_action"
|
||||||
data-action_name="Unpaid Customer Invoices"
|
data-action_name="Unpaid Customer Invoices"
|
||||||
data-model="account.move"
|
data-model="account.move"
|
||||||
data-domain="[('type', 'in', ('out_invoice', 'out_refund'))]"
|
data-domain="[('move_type', 'in', ('out_invoice', 'out_refund'))]"
|
||||||
data-context="{'search_default_unpaid': 1}"
|
data-context="{'search_default_unpaid': 1}"
|
||||||
>unpaid invoices</a> and follow-up customers</li>
|
>unpaid invoices</a> and follow-up customers</li>
|
||||||
<li>Pay your <a
|
<li>Pay your <a
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
rel="do_action"
|
rel="do_action"
|
||||||
data-action_name="Unpaid Vendor Bills"
|
data-action_name="Unpaid Vendor Bills"
|
||||||
data-model="account.move"
|
data-model="account.move"
|
||||||
data-domain="[('type', 'in', ('in_invoice', 'in_refund'))]"
|
data-domain="[('move_type', 'in', ('in_invoice', 'in_refund'))]"
|
||||||
data-context="{'search_default_unpaid': 1}"
|
data-context="{'search_default_unpaid': 1}"
|
||||||
>vendor bills</a></li>
|
>vendor bills</a></li>
|
||||||
<li>Check all <a
|
<li>Check all <a
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
odoo.define("account.reconciliation_tests.data", function () {
|
/* global QUnit*/
|
||||||
|
|
||||||
|
odoo.define("account_reconciliation_widget.reconciliation_tests.data", function (
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
require
|
||||||
|
) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -11,6 +16,15 @@ odoo.define("account.reconciliation_tests.data", function () {
|
|||||||
|
|
||||||
var Datas = {};
|
var Datas = {};
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
context: {
|
||||||
|
statement_line_ids: [4],
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
limitMoveLines: 5,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
var db = {
|
var db = {
|
||||||
"res.company": {
|
"res.company": {
|
||||||
fields: {
|
fields: {
|
||||||
@@ -2016,15 +2030,6 @@ odoo.define("account.reconciliation_tests.data", function () {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var options = {
|
|
||||||
context: {
|
|
||||||
statement_line_ids: [4],
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
limitMoveLines: 5,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
Datas.params = {
|
Datas.params = {
|
||||||
data: db,
|
data: db,
|
||||||
data_preprocess: data_preprocess,
|
data_preprocess: data_preprocess,
|
||||||
@@ -2043,19 +2048,19 @@ odoo.define("account.reconciliation_tests.data", function () {
|
|||||||
return Datas;
|
return Datas;
|
||||||
});
|
});
|
||||||
|
|
||||||
odoo.define("account.reconciliation_tests", function (require) {
|
odoo.define("account_reconciliation_widget.reconciliation_tests", function (require) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var ReconciliationClientAction = require("account.ReconciliationClientAction");
|
var ReconciliationClientAction = require("account.ReconciliationClientAction");
|
||||||
var ReconciliationRenderer = require("account.ReconciliationRenderer");
|
var ReconciliationRenderer = require("account.ReconciliationRenderer");
|
||||||
var demoData = require("account.reconciliation_tests.data");
|
var demoData = require("account_reconciliation_widget.reconciliation_tests.data");
|
||||||
|
|
||||||
var testUtils = require("web.test_utils");
|
var testUtils = require("web.test_utils");
|
||||||
var testUtilsDom = require("web.test_utils_dom");
|
var testUtilsDom = require("web.test_utils_dom");
|
||||||
var testUtilsMock = require("web.test_utils_mock");
|
var testUtilsMock = require("web.test_utils_mock");
|
||||||
|
|
||||||
QUnit.module(
|
QUnit.module(
|
||||||
"account",
|
"account_reconciliation_widget",
|
||||||
{
|
{
|
||||||
beforeEach: function () {
|
beforeEach: function () {
|
||||||
this.params = demoData.getParams();
|
this.params = demoData.getParams();
|
||||||
@@ -2413,7 +2418,9 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
"Should call process_bank_statement_line with args"
|
"Should call process_bank_statement_line with args"
|
||||||
);
|
);
|
||||||
var def = testUtils.makeTestPromise();
|
var def = testUtils.makeTestPromise();
|
||||||
def.abort = function () {};
|
def.abort = function () {
|
||||||
|
// Do nothing.
|
||||||
|
};
|
||||||
event.data.callback(def);
|
event.data.callback(def);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -2469,7 +2476,6 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
to_check: false,
|
to_check: false,
|
||||||
counterpart_aml_dicts: [],
|
counterpart_aml_dicts: [],
|
||||||
payment_aml_ids: [],
|
payment_aml_ids: [],
|
||||||
to_check: false,
|
|
||||||
new_aml_dicts: [
|
new_aml_dicts: [
|
||||||
{
|
{
|
||||||
account_id: 287,
|
account_id: 287,
|
||||||
@@ -2485,7 +2491,9 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
"Should call process_bank_statement_line with ids"
|
"Should call process_bank_statement_line with ids"
|
||||||
);
|
);
|
||||||
var def = testUtils.makeTestPromise();
|
var def = testUtils.makeTestPromise();
|
||||||
def.abort = function () {};
|
def.abort = function () {
|
||||||
|
// Do nothing.
|
||||||
|
};
|
||||||
event.data.callback(def);
|
event.data.callback(def);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2575,7 +2583,9 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
"Should call process_bank_statement_line with ids"
|
"Should call process_bank_statement_line with ids"
|
||||||
);
|
);
|
||||||
var def = testUtils.makeTestPromise();
|
var def = testUtils.makeTestPromise();
|
||||||
def.abort = function () {};
|
def.abort = function () {
|
||||||
|
// Do nothing.
|
||||||
|
};
|
||||||
event.data.callback(def);
|
event.data.callback(def);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2759,8 +2769,6 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
await clientAction.appendTo($("#qunit-fixture"));
|
await clientAction.appendTo($("#qunit-fixture"));
|
||||||
await testUtils.nextTick();
|
await testUtils.nextTick();
|
||||||
|
|
||||||
var widget = clientAction.widgets[0];
|
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
clientAction
|
clientAction
|
||||||
.$(
|
.$(
|
||||||
@@ -2771,7 +2779,6 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
"$ 1,175.00$ 32.58$ 2,000.00",
|
"$ 1,175.00$ 32.58$ 2,000.00",
|
||||||
"should display the different amounts with the currency"
|
"should display the different amounts with the currency"
|
||||||
);
|
);
|
||||||
// Await testUtils.dom.click(widget.$('.accounting_view thead .mv_line td:first'));
|
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
clientAction
|
clientAction
|
||||||
@@ -4818,7 +4825,9 @@ odoo.define("account.reconciliation_tests", function (require) {
|
|||||||
"Should call process_bank_statement_line with to_check set to true"
|
"Should call process_bank_statement_line with to_check set to true"
|
||||||
);
|
);
|
||||||
var def = testUtils.makeTestPromise();
|
var def = testUtils.makeTestPromise();
|
||||||
def.abort = function () {};
|
def.abort = function () {
|
||||||
|
// Do nothing.
|
||||||
|
};
|
||||||
event.data.callback(def);
|
event.data.callback(def);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
1
account_reconciliation_widget/tests/__init__.py
Normal file
1
account_reconciliation_widget/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import test_reconciliation_widget
|
||||||
@@ -0,0 +1,239 @@
|
|||||||
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
import odoo.tests
|
||||||
|
|
||||||
|
from odoo.addons.account.tests.common import TestAccountReconciliationCommon
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@odoo.tests.tagged("post_install", "-at_install")
|
||||||
|
class TestUi(odoo.tests.HttpCase):
|
||||||
|
def test_01_admin_bank_statement_reconciliation(self):
|
||||||
|
bank_stmt_name = "BNK/%s/0001" % time.strftime("%Y")
|
||||||
|
bank_stmt_line = (
|
||||||
|
self.env["account.bank.statement"]
|
||||||
|
.search([("name", "=", bank_stmt_name)])
|
||||||
|
.mapped("line_ids")
|
||||||
|
)
|
||||||
|
if not bank_stmt_line:
|
||||||
|
_logger.info(
|
||||||
|
"Tour bank_statement_reconciliation skipped: bank statement %s "
|
||||||
|
"not found." % bank_stmt_name
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
admin = self.env.ref("base.user_admin")
|
||||||
|
|
||||||
|
# Tour can't be run if the setup if not the generic one.
|
||||||
|
generic_coa = self.env.ref(
|
||||||
|
"l10n_generic_coa.configurable_chart_template", raise_if_not_found=False
|
||||||
|
)
|
||||||
|
if (
|
||||||
|
not admin.company_id.chart_template_id
|
||||||
|
or admin.company_id.chart_template_id != generic_coa
|
||||||
|
):
|
||||||
|
_logger.info(
|
||||||
|
"Tour bank_statement_reconciliation skipped: generic coa not found."
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
# To be able to test reconciliation, admin user must have access to
|
||||||
|
# accounting features, so we give him the right group for that
|
||||||
|
admin.write({"groups_id": [(4, self.env.ref("account.group_account_user").id)]})
|
||||||
|
|
||||||
|
payload = {
|
||||||
|
"action": "bank_statement_reconciliation_view",
|
||||||
|
"statement_line_ids[]": bank_stmt_line.ids,
|
||||||
|
}
|
||||||
|
prep = requests.models.PreparedRequest()
|
||||||
|
prep.prepare_url(url="http://localhost/web#", params=payload)
|
||||||
|
|
||||||
|
self.start_tour(
|
||||||
|
prep.url.replace("http://localhost", "").replace("?", "#"),
|
||||||
|
"bank_statement_reconciliation",
|
||||||
|
login="admin",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@odoo.tests.tagged("post_install", "-at_install")
|
||||||
|
class TestReconciliationWidget(TestAccountReconciliationCommon):
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls, chart_template_ref=None):
|
||||||
|
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||||
|
|
||||||
|
cls.acc_bank_stmt_model = cls.env["account.bank.statement"]
|
||||||
|
cls.acc_bank_stmt_line_model = cls.env["account.bank.statement.line"]
|
||||||
|
|
||||||
|
def test_statement_suggestion_other_currency(self):
|
||||||
|
# company currency is EUR
|
||||||
|
# payment in USD
|
||||||
|
invoice = self.create_invoice(
|
||||||
|
invoice_amount=50, currency_id=self.currency_usd_id
|
||||||
|
)
|
||||||
|
|
||||||
|
# journal currency in USD
|
||||||
|
|
||||||
|
bank_stmt = self.acc_bank_stmt_model.create(
|
||||||
|
{
|
||||||
|
"journal_id": self.bank_journal_usd.id,
|
||||||
|
"date": time.strftime("%Y-07-15"),
|
||||||
|
"name": "payment %s" % invoice.name,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
||||||
|
{
|
||||||
|
"payment_ref": "payment",
|
||||||
|
"statement_id": bank_stmt.id,
|
||||||
|
"partner_id": self.partner_agrolait_id,
|
||||||
|
"amount": 50,
|
||||||
|
"date": time.strftime("%Y-07-15"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
result = self.env["account.reconciliation.widget"].get_bank_statement_line_data(
|
||||||
|
bank_stmt_line.ids
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
result["lines"][0]["reconciliation_proposition"][0]["amount_str"], "$ 50.00"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_filter_partner1(self):
|
||||||
|
inv1 = self.create_invoice(currency_id=self.currency_euro_id)
|
||||||
|
inv2 = self.create_invoice(currency_id=self.currency_euro_id)
|
||||||
|
partner = inv1.partner_id
|
||||||
|
|
||||||
|
receivable1 = inv1.line_ids.filtered(
|
||||||
|
lambda l: l.account_id.internal_type == "receivable"
|
||||||
|
)
|
||||||
|
receivable2 = inv2.line_ids.filtered(
|
||||||
|
lambda l: l.account_id.internal_type == "receivable"
|
||||||
|
)
|
||||||
|
|
||||||
|
bank_stmt = self.acc_bank_stmt_model.create(
|
||||||
|
{
|
||||||
|
"company_id": self.env.ref("base.main_company").id,
|
||||||
|
"journal_id": self.bank_journal_euro.id,
|
||||||
|
"date": time.strftime("%Y-07-15"),
|
||||||
|
"name": "test",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
||||||
|
{
|
||||||
|
"name": "testLine",
|
||||||
|
"statement_id": bank_stmt.id,
|
||||||
|
"amount": 100,
|
||||||
|
"date": time.strftime("%Y-07-15"),
|
||||||
|
"payment_ref": "test",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# This is like input a partner in the widget
|
||||||
|
mv_lines_rec = self.env[
|
||||||
|
"account.reconciliation.widget"
|
||||||
|
].get_move_lines_for_bank_statement_line(
|
||||||
|
bank_stmt_line.id,
|
||||||
|
partner_id=partner.id,
|
||||||
|
excluded_ids=[],
|
||||||
|
search_str=False,
|
||||||
|
mode="rp",
|
||||||
|
)
|
||||||
|
mv_lines_ids = [line["id"] for line in mv_lines_rec]
|
||||||
|
|
||||||
|
self.assertIn(receivable1.id, mv_lines_ids)
|
||||||
|
self.assertIn(receivable2.id, mv_lines_ids)
|
||||||
|
|
||||||
|
# With a partner set, type the invoice reference in the filter
|
||||||
|
mv_lines_rec = self.env[
|
||||||
|
"account.reconciliation.widget"
|
||||||
|
].get_move_lines_for_bank_statement_line(
|
||||||
|
bank_stmt_line.id,
|
||||||
|
partner_id=partner.id,
|
||||||
|
excluded_ids=[],
|
||||||
|
search_str=inv1.payment_reference,
|
||||||
|
mode="rp",
|
||||||
|
)
|
||||||
|
mv_lines_ids = [line["id"] for line in mv_lines_rec]
|
||||||
|
|
||||||
|
self.assertIn(receivable1.id, mv_lines_ids)
|
||||||
|
self.assertNotIn(receivable2.id, mv_lines_ids)
|
||||||
|
|
||||||
|
# Without a partner set, type "deco" in the filter
|
||||||
|
mv_lines_rec = self.env[
|
||||||
|
"account.reconciliation.widget"
|
||||||
|
].get_move_lines_for_bank_statement_line(
|
||||||
|
bank_stmt_line.id,
|
||||||
|
partner_id=False,
|
||||||
|
excluded_ids=[],
|
||||||
|
search_str="deco",
|
||||||
|
mode="rp",
|
||||||
|
)
|
||||||
|
mv_lines_ids = [line["id"] for line in mv_lines_rec]
|
||||||
|
|
||||||
|
self.assertIn(receivable1.id, mv_lines_ids)
|
||||||
|
self.assertIn(receivable2.id, mv_lines_ids)
|
||||||
|
|
||||||
|
# With a partner set, type "deco" in the filter and click on the first
|
||||||
|
# receivable
|
||||||
|
mv_lines_rec = self.env[
|
||||||
|
"account.reconciliation.widget"
|
||||||
|
].get_move_lines_for_bank_statement_line(
|
||||||
|
bank_stmt_line.id,
|
||||||
|
partner_id=partner.id,
|
||||||
|
excluded_ids=[receivable1.id],
|
||||||
|
search_str="deco",
|
||||||
|
mode="rp",
|
||||||
|
)
|
||||||
|
mv_lines_ids = [line["id"] for line in mv_lines_rec]
|
||||||
|
|
||||||
|
self.assertNotIn(receivable1.id, mv_lines_ids)
|
||||||
|
self.assertIn(receivable2.id, mv_lines_ids)
|
||||||
|
|
||||||
|
def test_partner_name_with_parent(self):
|
||||||
|
parent_partner = self.env["res.partner"].create(
|
||||||
|
{
|
||||||
|
"name": "test",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
child_partner = self.env["res.partner"].create(
|
||||||
|
{
|
||||||
|
"name": "test",
|
||||||
|
"parent_id": parent_partner.id,
|
||||||
|
"type": "delivery",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
self.create_invoice_partner(
|
||||||
|
currency_id=self.currency_euro_id, partner_id=child_partner.id
|
||||||
|
)
|
||||||
|
|
||||||
|
bank_stmt = self.acc_bank_stmt_model.create(
|
||||||
|
{
|
||||||
|
"company_id": self.env.ref("base.main_company").id,
|
||||||
|
"journal_id": self.bank_journal_euro.id,
|
||||||
|
"date": time.strftime("%Y-07-15"),
|
||||||
|
"name": "test",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
||||||
|
{
|
||||||
|
"name": "testLine",
|
||||||
|
"statement_id": bank_stmt.id,
|
||||||
|
"amount": 100,
|
||||||
|
"date": time.strftime("%Y-07-15"),
|
||||||
|
"payment_ref": "test",
|
||||||
|
"partner_name": "test",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
bkstmt_data = self.env[
|
||||||
|
"account.reconciliation.widget"
|
||||||
|
].get_bank_statement_line_data(bank_stmt_line.ids)
|
||||||
|
|
||||||
|
self.assertEqual(len(bkstmt_data["lines"]), 1)
|
||||||
|
self.assertEqual(bkstmt_data["lines"][0]["partner_id"], parent_partner.id)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||||
|
<field name="name">account.bank.statement.inherit.view.form</field>
|
||||||
|
<field name="model">account.bank.statement</field>
|
||||||
|
<field name="inherit_id" ref="account.view_bank_statement_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//button[@name='button_post']" position="before">
|
||||||
|
<button
|
||||||
|
name="action_bank_reconcile_bank_statements"
|
||||||
|
string="Reconcile"
|
||||||
|
type="object"
|
||||||
|
class="oe_highlight"
|
||||||
|
attrs="{'invisible':['|','|',('all_lines_reconciled','=',True),('line_ids','=',[]),('state', '!=', 'posted')]}"
|
||||||
|
/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='date']" position="after">
|
||||||
|
<field name="accounting_date" groups="base.group_no_one" />
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
|
||||||
|
<field name="name">account.journal.inherit.dashboard.kanban</field>
|
||||||
|
<field name="model">account.journal</field>
|
||||||
|
<field
|
||||||
|
name="inherit_id"
|
||||||
|
ref="account.account_journal_dashboard_kanban_view"
|
||||||
|
/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath
|
||||||
|
expr="//kanban/templates//div[@id='dashboard_bank_cash_left']/t[1]"
|
||||||
|
position="before"
|
||||||
|
>
|
||||||
|
<t t-if="dashboard.number_to_reconcile > 0">
|
||||||
|
<button
|
||||||
|
type="object"
|
||||||
|
name="action_open_reconcile"
|
||||||
|
class="btn btn-primary"
|
||||||
|
> Reconcile <t
|
||||||
|
t-esc="dashboard.number_to_reconcile"
|
||||||
|
/> Items</button>
|
||||||
|
</t>
|
||||||
|
</xpath>
|
||||||
|
<xpath
|
||||||
|
expr="//kanban/templates//div[@id='dashboard_bank_cash_right']"
|
||||||
|
position="inside"
|
||||||
|
>
|
||||||
|
<t t-if="dashboard.number_to_check > 0">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col overflow-hidden text-left">
|
||||||
|
<a type="object" name="action_open_reconcile_to_check">
|
||||||
|
<t t-esc="dashboard.number_to_check" /> to check</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto text-right">
|
||||||
|
<span>
|
||||||
|
<t t-esc="dashboard.to_check_balance" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
30
account_reconciliation_widget/views/account_view.xml
Normal file
30
account_reconciliation_widget/views/account_view.xml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<record id="action_bank_reconcile" model="ir.actions.client">
|
||||||
|
<field name="name">Reconciliation on Bank Statements</field>
|
||||||
|
<field name="res_model">account.bank.statement.line</field>
|
||||||
|
<field name="tag">bank_statement_reconciliation_view</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_view_account_move_line_reconcile" model="ir.actions.client">
|
||||||
|
<field name="name">Reconcile</field>
|
||||||
|
<field name="tag">manual_reconciliation_view</field>
|
||||||
|
<field name="binding_model_id" ref="account.model_account_move_line" />
|
||||||
|
<field name="binding_type">action</field>
|
||||||
|
<field name="binding_view_types">list</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_manual_reconciliation" model="ir.actions.client">
|
||||||
|
<field name="name">Reconciliation</field>
|
||||||
|
<field name="tag">manual_reconciliation_view</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
id="menu_action_manual_reconciliation"
|
||||||
|
parent="account.menu_finance_entries_actions"
|
||||||
|
action="action_manual_reconciliation"
|
||||||
|
sequence="25"
|
||||||
|
/>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
42
account_reconciliation_widget/views/assets.xml
Normal file
42
account_reconciliation_widget/views/assets.xml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<template
|
||||||
|
id="assets_backend"
|
||||||
|
name="account_reconciliation_widget assets"
|
||||||
|
inherit_id="web.assets_backend"
|
||||||
|
>
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
type="text/scss"
|
||||||
|
href="/account_reconciliation_widget/static/src/scss/account_reconciliation.scss"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_action.js"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_model.js"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_renderer.js"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="qunit_suite" name="account tests" inherit_id="web.qunit_suite_tests">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/account_reconciliation_widget/static/tests/account_reconciliation_tests.js"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../account_reconciliation_widget
|
||||||
6
setup/account_reconciliation_widget/setup.py
Normal file
6
setup/account_reconciliation_widget/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user