-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e203ffa
commit 724f463
Showing
40 changed files
with
1,439 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
===================== | ||
Restrict account date | ||
===================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:2b3726716ea1f3a454c13c55b823540719e2a6bb705a561ee573f9b59ecfeb83 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-OPL--1-blue.png | ||
:target: https://www.odoo.com/documentation/master/legal/licenses.html | ||
:alt: License: OPL-1 | ||
.. |badge3| image:: https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github | ||
:target: https://github.com/dhongu/deltatech/tree/17.0/deltatech_account_restrict_date | ||
:alt: dhongu/deltatech | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
|
||
Features: | ||
* Restrict statement line reconciliation cancel if date before the value of system parameter "sequence.mixin.constraint_start_date" | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/dhongu/deltatech/issues>`_. | ||
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 | ||
`feedback <https://github.com/dhongu/deltatech/issues/new?body=module:%20deltatech_account_restrict_date%0Aversion:%2017.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 | ||
~~~~~~~ | ||
|
||
* Terrabit | ||
* Dan Stoica | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
.. |maintainer-danila12| image:: https://github.com/danila12.png?size=40px | ||
:target: https://github.com/danila12 | ||
:alt: danila12 | ||
|
||
Current maintainer: | ||
|
||
|maintainer-danila12| | ||
|
||
This module is part of the `dhongu/deltatech <https://github.com/dhongu/deltatech/tree/17.0/deltatech_account_restrict_date>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# © 2015-now Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# © 2015-2018 Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
|
||
|
||
{ | ||
"name": "Restrict account date", | ||
"version": "17.0.1.0.1", | ||
"author": "Terrabit, Dan Stoica", | ||
"website": "https://www.terrabit.ro", | ||
"summary": "Restrict certain operations depending on date", | ||
"category": "Accounting", | ||
"depends": [ | ||
"account", | ||
], | ||
"license": "OPL-1", | ||
# "data": ["views/product_view.xml", "security/ir.model.access.csv"], | ||
"images": ["images/main_screenshot.png"], | ||
"development_status": "Beta", | ||
"maintainers": ["danila12"], | ||
} |
Binary file added
BIN
+224 Bytes
deltatech_account_restrict_date/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * deltatech_account_restrict_date | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-06-09 10:38+0000\n" | ||
"PO-Revision-Date: 2022-06-09 10:38+0000\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: deltatech_account_restrict_date | ||
#: model:ir.model,name:deltatech_account_restrict_date.model_account_bank_statement_line | ||
msgid "Bank Statement Line" | ||
msgstr "Linie extras bacă" | ||
|
||
#. module: deltatech_account_restrict_date | ||
#: model:ir.model.fields,field_description:deltatech_account_restrict_date.field_account_bank_statement_line__display_name | ||
msgid "Display Name" | ||
msgstr "Nume afișat" | ||
|
||
#. module: deltatech_account_restrict_date | ||
#: model:ir.model.fields,field_description:deltatech_account_restrict_date.field_account_bank_statement_line__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: deltatech_account_restrict_date | ||
#: model:ir.model.fields,field_description:deltatech_account_restrict_date.field_account_bank_statement_line____last_update | ||
msgid "Last Modified on" | ||
msgstr "Ultima modificare la" | ||
|
||
#. module: deltatech_account_restrict_date | ||
#: code:addons/deltatech_account_restrict_date/models/account_bank_statement.py:0 | ||
#, python-format | ||
msgid "" | ||
"You cannot perform this operation on this line (date restriction). Please " | ||
"contact your support team." | ||
msgstr "" | ||
"Această operație nu poate fi efectuată (restricție dată). Vă rugăm " | ||
"să contactați echipa de asistență." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# © 2015-now Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
|
||
from . import account_bank_statement |
Binary file added
BIN
+247 Bytes
deltatech_account_restrict_date/models/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added
BIN
+1.14 KB
deltatech_account_restrict_date/models/__pycache__/account_bank_statement.cpython-310.pyc
Binary file not shown.
27 changes: 27 additions & 0 deletions
27
deltatech_account_restrict_date/models/account_bank_statement.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# © 2015-now Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
|
||
|
||
from datetime import datetime | ||
|
||
from odoo import _, models | ||
from odoo.exceptions import UserError | ||
|
||
|
||
class AccountBankStatementLine(models.Model): | ||
_inherit = "account.bank.statement.line" | ||
|
||
def action_undo_reconciliation(self): | ||
get_param = self.env["ir.config_parameter"].sudo().get_param | ||
date_limit = get_param("sequence.mixin.constraint_start_date", "2000-01-01") | ||
if date_limit: | ||
date_limit_obj = datetime.strptime(date_limit, "%Y-%m-%d").date() | ||
for st_line in self: | ||
if st_line.date < date_limit_obj: | ||
raise UserError( | ||
_( | ||
"You cannot perform this operation on this line (date restriction). Please contact your support team." | ||
) | ||
) | ||
return super().action_undo_reconciliation() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
Features: | ||
* Restrict statement line reconciliation cancel if date before the value of system parameter "sequence.mixin.constraint_start_date" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.