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