Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions account_reconcile_oca/README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Account Reconcile Oca
Account Reconcile OCA
=====================

..
Expand All @@ -17,7 +13,7 @@ Account Reconcile Oca
.. |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/license-AGPL--3-blue.png
.. |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--reconcile-lightgray.png?logo=github
Expand Down
2 changes: 1 addition & 1 deletion account_reconcile_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Reconcile Oca",
"name": "Account Reconcile OCA",
"summary": """
Reconcile addons for Odoo CE accounting""",
"version": "16.0.2.4.8",
Expand Down
34 changes: 14 additions & 20 deletions account_reconcile_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Account Reconcile OCA</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="account-reconcile-oca">
<h1 class="title">Account Reconcile OCA</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="account-reconcile-oca">
<h1>Account Reconcile Oca</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:52279504ff8530aea4120abf601e7c0c6d6b7ccddeeeb5c02791c939603eeac6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_oca"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_reconcile_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-reconcile&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_oca"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_reconcile_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-reconcile&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon allows to reconcile bank statements and account marked as <cite>reconcile</cite>.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -396,14 +391,14 @@ <h1>Account Reconcile Oca</h1>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<div class="section" id="bank-reconcile">
<h3><a class="toc-backref" href="#toc-entry-2">Bank reconcile</a></h3>
<h2><a class="toc-backref" href="#toc-entry-2">Bank reconcile</a></h2>
<p>Access <cite>Invoicing / Dashboard</cite> with a user with Full Acounting capabilities.
Select reconcile on the journal of your choice.</p>
</div>
<div class="section" id="account-reconcile">
<h3><a class="toc-backref" href="#toc-entry-3">Account reconcile</a></h3>
<h2><a class="toc-backref" href="#toc-entry-3">Account reconcile</a></h2>
<p>Access <cite>Invoicing / Accounting / Actions / Reconcile</cite>
All the possible reconcile options will show and you will be able to reconcile properly.
You can access the same widget from accounts and Partners.</p>
Expand All @@ -413,41 +408,41 @@ <h3><a class="toc-backref" href="#toc-entry-3">Account reconcile</a></h3>
</div>
</div>
<div class="section" id="known-issues-roadmap">
<h2><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h2>
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
<p>The following bugs are already detected:</p>
<ul class="simple">
<li>Creation of activities on the chatter do show automatically</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_oca%0Aversion:%2016.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">
<h2><a class="toc-backref" href="#toc-entry-6">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-6">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-7">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-7">Authors</a></h2>
<ul class="simple">
<li>CreuBlanca</li>
<li>Dixmit</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella</li>
</ul>
</div>
<div class="section" id="other-credits">
<h3><a class="toc-backref" href="#toc-entry-9">Other credits</a></h3>
<h2><a class="toc-backref" href="#toc-entry-9">Other credits</a></h2>
<p>The system has been improved to handle currency amounts more effectively with the financial support of Sygel Technology.</p>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-10">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" />
Expand All @@ -462,6 +457,5 @@ <h3><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @odoo-module **/

import fieldUtils from "web.field_utils";
import {float_is_zero} from "web.utils";
import {registry} from "@web/core/registry";
import session from "web.session";
import {useService} from "@web/core/utils/hooks";
Expand All @@ -24,6 +25,10 @@ export class AccountReconcileDataWidget extends Component {
}
getReconcileLines() {
var data = this.props.record.data[this.props.name].data;
const totals = {debit: 0, credit: 0};
if (!data || !data.length) {
return {lines: [], totals};
}
for (var line in data) {
data[line].amount_format = fieldUtils.format.monetary(
data[line].amount,
Expand Down Expand Up @@ -64,8 +69,26 @@ export class AccountReconcileDataWidget extends Component {
data[line].date_format = fieldUtils.format.date(
fieldUtils.parse.date(data[line].date, undefined, {isUTC: true})
);
totals.debit += data[line].debit || 0;
totals.credit += data[line].credit || 0;
}
totals.balance = totals.debit - totals.credit;
const firstLine = Object.values(data)[0] || {};
const currency = session.get_currency(firstLine.currency_id);
const decimals = currency.digits[1];
const hasOpenBalance = !float_is_zero(totals.balance, decimals);
let openDebitFmt = null;
let openCreditFmt = null;
if (totals.balance < 0) {
openDebitFmt = fieldUtils.format.monetary(Math.abs(totals.balance), {
currency: currency,
});
} else {
openCreditFmt = fieldUtils.format.monetary(totals.balance, {
currency: currency,
});
}
return data;
return {lines: data, hasOpenBalance, openDebitFmt, openCreditFmt};
}
onTrashLine(ev, line) {
ev.stopPropagation();
Expand Down
3 changes: 3 additions & 0 deletions account_reconcile_oca/static/src/scss/reconcile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
&.selected {
background-color: rgba($o-brand-primary, 0.2);
}
&.suspense {
color: $o-gray-500;
}
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion account_reconcile_oca/static/src/xml/reconcile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@
<th class="text-end">Credit</th>
<th t-if="! props.record.data.is_reconciled" />
</thead>
<t t-set="rec" t-value="getReconcileLines()" />
<tbody>
<t
t-foreach="getReconcileLines()"
t-foreach="rec.lines"
t-as="reconcile_line"
t-key="reconcile_line_index"
>
Expand Down Expand Up @@ -183,6 +184,12 @@
</td>
</tr>
</t>
<tr class="text-muted" t-if="rec.hasOpenBalance">
<td colspan="5">Open Balance</td>
<td class="text-end" t-esc="rec.openDebitFmt" />
<td class="text-end" t-esc="rec.openCreditFmt" />
<td />
</tr>
</tbody>
</table>
</t>
Expand Down