diff --git a/account_lock_date_update/readme/DESCRIPTION.rst b/account_lock_date_update/readme/DESCRIPTION.rst index 646086d6..afccb192 100644 --- a/account_lock_date_update/readme/DESCRIPTION.rst +++ b/account_lock_date_update/readme/DESCRIPTION.rst @@ -1,2 +1,2 @@ -Allow an Account adviser to update locking date without having +Allow an Account adviser to update locking dates without having access to all technical settings. diff --git a/account_lock_date_update/readme/USAGE.rst b/account_lock_date_update/readme/USAGE.rst index 5409435e..4aced42c 100644 --- a/account_lock_date_update/readme/USAGE.rst +++ b/account_lock_date_update/readme/USAGE.rst @@ -1,4 +1,4 @@ To use this module, you need to be a Billing Administrator and go to: * Invoicing -> Accounting -> Actions -> Update accounting lock dates -* Change values and click on update button +* Change values and click on **Update** button diff --git a/account_lock_date_update/tests/test_account_lock_date_update.py b/account_lock_date_update/tests/test_account_lock_date_update.py index d57562ff..20ffddff 100644 --- a/account_lock_date_update/tests/test_account_lock_date_update.py +++ b/account_lock_date_update/tests/test_account_lock_date_update.py @@ -28,7 +28,11 @@ class TestAccountLockDateUpdate(TransactionCase): .create({"company_id": self.company.id}) ) wizard.write( - {"period_lock_date": "2000-02-01", "fiscalyear_lock_date": "2000-01-01"} + { + "period_lock_date": "2000-02-01", + "fiscalyear_lock_date": "2000-01-01", + "tax_lock_date": "2000-01-01", + } ) wizard.with_user(self.demo_user.id).execute() self.assertEqual( @@ -37,3 +41,6 @@ class TestAccountLockDateUpdate(TransactionCase): self.assertEqual( fields.Date.to_string(self.company.fiscalyear_lock_date), "2000-01-01" ) + self.assertEqual( + fields.Date.to_string(self.company.tax_lock_date), "2000-01-01" + ) diff --git a/account_lock_date_update/wizards/account_update_lock_date.py b/account_lock_date_update/wizards/account_update_lock_date.py index 6912b81b..e7c11c3d 100644 --- a/account_lock_date_update/wizards/account_update_lock_date.py +++ b/account_lock_date_update/wizards/account_update_lock_date.py @@ -17,11 +17,16 @@ class AccountUpdateLockDate(models.TransientModel): "open fiscal year, for example.", ) fiscalyear_lock_date = fields.Date( - string="Lock Date", + string="Lock Date for All Users", help="No users, including Advisers, can edit accounts prior to and " "inclusive of this date. Use it for fiscal year locking for " "example.", ) + tax_lock_date = fields.Date( + string="Tax Lock Date", + help="No users can edit journal entries related to a tax prior and " + "inclusive of this date.", + ) @api.model def default_get(self, field_list): @@ -32,6 +37,7 @@ class AccountUpdateLockDate(models.TransientModel): "company_id": company.id, "period_lock_date": company.period_lock_date, "fiscalyear_lock_date": company.fiscalyear_lock_date, + "tax_lock_date": company.tax_lock_date, } ) return res @@ -49,5 +55,6 @@ class AccountUpdateLockDate(models.TransientModel): { "period_lock_date": self.period_lock_date, "fiscalyear_lock_date": self.fiscalyear_lock_date, + "tax_lock_date": self.tax_lock_date, } ) diff --git a/account_lock_date_update/wizards/account_update_lock_date.xml b/account_lock_date_update/wizards/account_update_lock_date.xml index e9e59aa2..5adece2e 100644 --- a/account_lock_date_update/wizards/account_update_lock_date.xml +++ b/account_lock_date_update/wizards/account_update_lock_date.xml @@ -9,16 +9,21 @@ account.update.lock_date
-
- - - - - - - + + + +