commit
e506103498
|
@ -7,7 +7,7 @@ Account Reconcile Oca
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:bc5ac758c54a958b23fe3962f890d737b6949c7054be36b79002f62095cfeffc
|
||||
!! source digest: sha256:3f6bc07a9963be4143fdb984d07e4b6a0542e791f082edb98e907cc000ea0617
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
|
@ -75,6 +75,7 @@ Authors
|
|||
~~~~~~~
|
||||
|
||||
* CreuBlanca
|
||||
* Dixmit
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2022 CreuBlanca
|
||||
# Copyright 2023 Dixmit
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
|||
Reconcile addons for Odoo CE accounting""",
|
||||
"version": "16.0.1.2.5",
|
||||
"license": "AGPL-3",
|
||||
"author": "CreuBlanca,Odoo Community Association (OCA)",
|
||||
"author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
|
||||
"maintainers": ["etobella"],
|
||||
"website": "https://github.com/OCA/account-reconcile",
|
||||
"depends": [
|
||||
|
|
|
@ -2,3 +2,4 @@ from . import account_reconcile_abstract
|
|||
from . import account_journal
|
||||
from . import account_bank_statement_line
|
||||
from . import account_account_reconcile
|
||||
from . import account_move_line
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2022 CreuBlanca
|
||||
# Copyright 2023 Dixmit
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
@ -84,6 +84,13 @@ class AccountAccountReconcile(models.Model):
|
|||
def _compute_reconcile_data_info(self):
|
||||
data_obj = self.env["account.account.reconcile.data"]
|
||||
for record in self:
|
||||
if self.env.context.get("default_account_move_lines"):
|
||||
data = {
|
||||
"data": [],
|
||||
"counterparts": self.env.context.get("default_account_move_lines"),
|
||||
}
|
||||
record.reconcile_data_info = self._recompute_data(data)
|
||||
continue
|
||||
data_record = data_obj.search(
|
||||
[("user_id", "=", self.env.user.id), ("reconcile_id", "=", record.id)]
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2022 CreuBlanca
|
||||
# Copyright 2023 Dixmit
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from collections import defaultdict
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2022 CreuBlanca
|
||||
# Copyright 2023 Dixmit
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, fields, models
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2023 Dixmit
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, models
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
|
||||
_inherit = "account.move.line"
|
||||
|
||||
def action_reconcile_manually(self):
|
||||
if not self:
|
||||
return {}
|
||||
self.mapped("account_id").ensure_one()
|
||||
partner = self.mapped("partner_id")
|
||||
if partner:
|
||||
partner.ensure_one()
|
||||
if self.filtered(lambda r: r.partner_id != partner):
|
||||
raise ValidationError(
|
||||
_("You must reconcile information on the same partner")
|
||||
)
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"account_reconcile_oca.account_account_reconcile_act_window"
|
||||
)
|
||||
action["domain"] = [
|
||||
("account_id", "=", self.mapped("account_id").id),
|
||||
("partner_id", "=", partner.id),
|
||||
]
|
||||
action["context"] = self.env.context.copy()
|
||||
action["context"]["default_account_move_lines"] = self.filtered(
|
||||
lambda r: not r.reconciled
|
||||
).ids
|
||||
return action
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2022 CreuBlanca
|
||||
# Copyright 2023 Dixmit
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<?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>
|
||||
|
@ -366,7 +367,7 @@ ul.auto-toc {
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:bc5ac758c54a958b23fe3962f890d737b6949c7054be36b79002f62095cfeffc
|
||||
!! source digest: sha256:3f6bc07a9963be4143fdb984d07e4b6a0542e791f082edb98e907cc000ea0617
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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&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>
|
||||
|
@ -423,6 +424,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
<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">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 CreuBlanca
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 CreuBlanca
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 CreuBlanca
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 CreuBlanca
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 CreuBlanca
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 CreuBlanca
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
|
@ -101,4 +101,13 @@
|
|||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_reconcile" model="ir.actions.server">
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="model_id" ref="account.model_account_move_line" />
|
||||
<field name="binding_model_id" ref="account.model_account_move_line" />
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_reconcile_manually()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue