diff --git a/account_journal_lock_date/__manifest__.py b/account_journal_lock_date/__manifest__.py
index fe491dc75..c375a1710 100644
--- a/account_journal_lock_date/__manifest__.py
+++ b/account_journal_lock_date/__manifest__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -6,16 +5,14 @@
'name': 'Account Journal Lock Date',
'summary': """
Lock each journal independently""",
- 'version': '10.0.1.0.0',
+ 'version': '11.0.1.0.0',
'license': 'AGPL-3',
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)',
- 'website': 'https://acsone.eu/',
+ 'website': 'https://github.com/OCA/account-financial-tools',
'depends': [
'account_permanent_lock_move',
],
'data': [
'views/account_journal.xml',
],
- 'demo': [
- ],
}
diff --git a/account_journal_lock_date/exceptions.py b/account_journal_lock_date/exceptions.py
index 6a17c27a9..222caf8a2 100644
--- a/account_journal_lock_date/exceptions.py
+++ b/account_journal_lock_date/exceptions.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
diff --git a/account_journal_lock_date/models/account_journal.py b/account_journal_lock_date/models/account_journal.py
index 134f231ba..bd1cc7393 100644
--- a/account_journal_lock_date/models/account_journal.py
+++ b/account_journal_lock_date/models/account_journal.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
diff --git a/account_journal_lock_date/models/account_move.py b/account_journal_lock_date/models/account_move.py
index 1aaaaee5b..9c114ee05 100644
--- a/account_journal_lock_date/models/account_move.py
+++ b/account_journal_lock_date/models/account_move.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
diff --git a/account_journal_lock_date/tests/test_journal_lock_date.py b/account_journal_lock_date/tests/test_journal_lock_date.py
index 7b1d1bd4b..f88303dd6 100644
--- a/account_journal_lock_date/tests/test_journal_lock_date.py
+++ b/account_journal_lock_date/tests/test_journal_lock_date.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -29,8 +28,11 @@ class TestJournalLockDate(common.TransactionCase):
self.journal = self.browse_ref("account.bank_journal")
def test_journal_lock_date(self):
+ # remove the user from all groups
+ self.env.user.write({'groups_id': [(5, False, False)]})
+ # add the user to group account user
self.env.user.write({
- 'groups_id': [(3, self.ref('account.group_account_manager'))],
+ 'groups_id': [(4, self.ref('account.group_account_user'), False)],
})
self.assertFalse(self.env.user.has_group(
'account.group_account_manager'))
diff --git a/account_journal_lock_date/views/account_journal.xml b/account_journal_lock_date/views/account_journal.xml
index ec2a45044..25a277999 100644
--- a/account_journal_lock_date/views/account_journal.xml
+++ b/account_journal_lock_date/views/account_journal.xml
@@ -3,8 +3,6 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
-
-
account.journal.form (in account_journal_lock_date)
account.journal
@@ -27,7 +25,4 @@
-
-
-
diff --git a/account_permanent_lock_move/__init__.py b/account_permanent_lock_move/__init__.py
index 35e7c9600..0217b0f92 100755
--- a/account_permanent_lock_move/__init__.py
+++ b/account_permanent_lock_move/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from . import models
from . import wizard
diff --git a/account_permanent_lock_move/__manifest__.py b/account_permanent_lock_move/__manifest__.py
index 41b4c4ab4..613a235aa 100644
--- a/account_permanent_lock_move/__manifest__.py
+++ b/account_permanent_lock_move/__manifest__.py
@@ -1,12 +1,11 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Permanent Lock Move",
- "version": "10.0.1.0.0",
+ "version": "11.0.1.0.0",
"depends": ["account"],
"author": "Camptocamp,Odoo Community Association (OCA)",
- "website": "http://www.camptocamp.com/",
+ "website": 'https://github.com/OCA/account-financial-tools',
"category": "Finance",
"data": [
"views/res_config_view.xml",
diff --git a/account_permanent_lock_move/models/__init__.py b/account_permanent_lock_move/models/__init__.py
index 8993bef01..8b1d2d84f 100644
--- a/account_permanent_lock_move/models/__init__.py
+++ b/account_permanent_lock_move/models/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from . import account_move
from . import company
diff --git a/account_permanent_lock_move/models/account_move.py b/account_permanent_lock_move/models/account_move.py
index 079f2c934..090f3315f 100644
--- a/account_permanent_lock_move/models/account_move.py
+++ b/account_permanent_lock_move/models/account_move.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
@@ -11,7 +10,8 @@ class AccountMove(models.Model):
@api.multi
def _check_lock_date(self):
for move in self:
- if move.date <= move.company_id.permanent_lock_date:
+ if move.company_id.permanent_lock_date \
+ and move.date <= move.company_id.permanent_lock_date:
raise UserError(_(
"You cannot add/modify entries prior to and inclusive "
"of the permanent lock date."))
diff --git a/account_permanent_lock_move/models/company.py b/account_permanent_lock_move/models/company.py
index 252e734ad..e818be355 100644
--- a/account_permanent_lock_move/models/company.py
+++ b/account_permanent_lock_move/models/company.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
diff --git a/account_permanent_lock_move/models/res_config.py b/account_permanent_lock_move/models/res_config.py
index cbc06be99..705112ea9 100644
--- a/account_permanent_lock_move/models/res_config.py
+++ b/account_permanent_lock_move/models/res_config.py
@@ -1,11 +1,10 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountConfigSettings(models.TransientModel):
- _inherit = 'account.config.settings'
+ _inherit = 'res.config.settings'
permanent_lock_date = fields.Date(
string="Permanent Lock Date",
diff --git a/account_permanent_lock_move/static/description/icon.png b/account_permanent_lock_move/static/description/icon.png
deleted file mode 100644
index 3a0328b51..000000000
Binary files a/account_permanent_lock_move/static/description/icon.png and /dev/null differ
diff --git a/account_permanent_lock_move/tests/__init__.py b/account_permanent_lock_move/tests/__init__.py
index 117d3ecd2..420e2dfc4 100644
--- a/account_permanent_lock_move/tests/__init__.py
+++ b/account_permanent_lock_move/tests/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_permanent_lock
diff --git a/account_permanent_lock_move/tests/test_permanent_lock.py b/account_permanent_lock_move/tests/test_permanent_lock.py
index a1c75c610..7572973e1 100644
--- a/account_permanent_lock_move/tests/test_permanent_lock.py
+++ b/account_permanent_lock_move/tests/test_permanent_lock.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import datetime
diff --git a/account_permanent_lock_move/views/res_config_view.xml b/account_permanent_lock_move/views/res_config_view.xml
index acc77dd5f..e1d6f9e9a 100644
--- a/account_permanent_lock_move/views/res_config_view.xml
+++ b/account_permanent_lock_move/views/res_config_view.xml
@@ -1,18 +1,18 @@
-
- account settings permanent lock
- account.config.settings
-
+
+ res.config.settings
+
-
-
-
-
-
+
+
diff --git a/account_permanent_lock_move/wizard/__init__.py b/account_permanent_lock_move/wizard/__init__.py
index def3c56f1..20b45c2b6 100644
--- a/account_permanent_lock_move/wizard/__init__.py
+++ b/account_permanent_lock_move/wizard/__init__.py
@@ -1,3 +1,2 @@
-# -*- coding: utf-8 -*-
from . import permanent_lock_date_wizard
diff --git a/account_permanent_lock_move/wizard/permanent_lock_date_wizard.py b/account_permanent_lock_move/wizard/permanent_lock_date_wizard.py
index 5502a5a7e..968beb3ca 100644
--- a/account_permanent_lock_move/wizard/permanent_lock_date_wizard.py
+++ b/account_permanent_lock_move/wizard/permanent_lock_date_wizard.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
diff --git a/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml b/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml
index 0ffbe0046..5192c58bf 100644
--- a/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml
+++ b/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml
@@ -1,5 +1,5 @@
-
+
permanent.lock.date.wizard.form
permanent.lock.date.wizard
form