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
81 changes: 81 additions & 0 deletions account_compensate_advance_unlock_reconcile/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
========================================
Account Compensate Advance Closed Period
========================================
.. |badge1| image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

|badge1|

This module extends the functionality of account_compensate_advance by allowing reconciliation in closed accounting periods

**Table of contents**

.. contents::
:local:

Configuration
=============

To Configure...

Usage
=====

To usage...

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/Escodoo/{project_repo}/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Escodoo

Contributors
~~~~~~~~~~~~

* Marcel Savegnago <marcel.savegnago@escodoo.com.br>

Other credits
~~~~~~~~~~~~~

The development of this module has been financially supported by:

* Escodoo - `https://www.escodoo.com.br <https://www.escodoo.com.br>`_

Maintainers
~~~~~~~~~~~

This module is maintained by the Escodoo.

.. |maintainer-escodoo| image:: https://github.com/escodoo.png?size=80px
:target: https://github.com/Escodoo
:alt: escodoo

|maintainer-escodoo|

We at Escodoo are exclusively dedicated to deploying the Odoo Platform and are
focused on providing solutions that make our customers more competitive, lowering
costs, making technology more accessible and ensuring it is used strategically to
add even more value to the business.

.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px
:target: https://github.com/marcelsavegnago
:alt: marcelsavegnago

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-marcelsavegnago|

To contribute to this module, please visit https://www.escodoo.com.br.
2 changes: 2 additions & 0 deletions account_compensate_advance_unlock_reconcile/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
16 changes: 16 additions & 0 deletions account_compensate_advance_unlock_reconcile/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 - TODAY, Escodoo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Compensate Advance - Unlock Reconcile in compensate",
"summary": """
This module allowing reconciliation in lock accounting periods""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Escodoo",
"website": "https://github.com/Escodoo/account-addons",
"depends": [
"account_invoice_advance_compensation",
"account_lock_to_date",
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_compensate_advance_unlock_reconcile
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_compensate_advance_unlock_reconcile
#: model:ir.model.fields,field_description:account_compensate_advance_unlock_reconcile.field_account_compensate_advance_journal__display_name
#: model:ir.model.fields,field_description:account_compensate_advance_unlock_reconcile.field_account_move__display_name
msgid "Display Name"
msgstr ""

#. module: account_compensate_advance_unlock_reconcile
#: model:ir.model.fields,field_description:account_compensate_advance_unlock_reconcile.field_account_compensate_advance_journal__id
#: model:ir.model.fields,field_description:account_compensate_advance_unlock_reconcile.field_account_move__id
msgid "ID"
msgstr ""

#. module: account_compensate_advance_unlock_reconcile
#: model:ir.model,name:account_compensate_advance_unlock_reconcile.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_compensate_advance_unlock_reconcile
#: model:ir.model.fields,field_description:account_compensate_advance_unlock_reconcile.field_account_compensate_advance_journal____last_update
#: model:ir.model.fields,field_description:account_compensate_advance_unlock_reconcile.field_account_move____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_compensate_advance_unlock_reconcile
#: model:ir.model,name:account_compensate_advance_unlock_reconcile.model_account_compensate_advance_journal
msgid "account.compensate.advance.journal"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_move
20 changes: 20 additions & 0 deletions account_compensate_advance_unlock_reconcile/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 - TODAY, Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class AccountMove(models.Model):
_inherit = "account.move"

def _check_lock_to_dates(self):
"""
Prevent moves that are on or after the lock to date, unless the context
allows bypass.
"""
# Check if the context allows bypassing the lock to date
if self.env.context.get("bypass_account_lock_to_date"):
return

# Call the parent method to enforce lock checks if no bypass
return super()._check_lock_to_dates()
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* `Escodoo <https://www.escodoo.com.br>`_:

* Marcel Savegnago <marcel.savegnago@escodoo.com.br>
* Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import compensation_wizard
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2024 - TODAY, Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


from odoo import models


class AccountInvoiceAdvanceCompensationWizard(models.TransientModel):
_inherit = "account.invoice.advance.compensation.wizard"

def _create_compensation_move(self):
self = self.with_context(bypass_account_lock_to_date=True)
return super()._create_compensation_move()
6 changes: 6 additions & 0 deletions setup/account_compensate_advance_unlock_reconcile/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
odoo-addon-account_invoice_advance_compensation @ git+https://github.com/OCA/account-invoicing.git@refs/pull/1964/head#subdirectory=setup/account_invoice_advance_compensation