From ee9adc628a3eae83453bc6716d7b5117ec892e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 3 Oct 2021 00:35:25 +0200 Subject: [PATCH] Rename lock buttons into lock_ issue10784 review375541002 --- CHANGELOG | 1 + fiscalyear.py | 6 +++--- fiscalyear.xml | 2 +- period.py | 4 ++-- period.xml | 2 +- view/fiscalyear_list_close.xml | 2 +- view/period_list_close.xml | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d9124fa6e6..cbde378bab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Rename lock buttons into lock_ * Add split lines wizard * Validate that all inactive accounts have no balance when closing periods diff --git a/fiscalyear.py b/fiscalyear.py index 8400682412..102a9659ee 100644 --- a/fiscalyear.py +++ b/fiscalyear.py @@ -79,7 +79,7 @@ class FiscalYear(Workflow, ModelSQL, ModelView): 'invisible': Eval('state') != 'close', 'depends': ['state'], }, - 'lock': { + 'lock_': { 'invisible': Eval('state') != 'close', 'depends': ['state'], }, @@ -328,13 +328,13 @@ class FiscalYear(Workflow, ModelSQL, ModelView): @classmethod @ModelView.button @Workflow.transition('locked') - def lock(cls, fiscalyears): + def lock_(cls, fiscalyears): pool = Pool() Period = pool.get('account.period') periods = Period.search([ ('fiscalyear', 'in', [f.id for f in fiscalyears]), ]) - Period.lock(periods) + Period.lock_(periods) class BalanceNonDeferralStart(ModelView): diff --git a/fiscalyear.xml b/fiscalyear.xml index 302bfddb65..37ffdd8b13 100644 --- a/fiscalyear.xml +++ b/fiscalyear.xml @@ -79,7 +79,7 @@ this repository contains the full copyright notices and license terms. --> - lock + lock_ Lock Are you sure you want to lock the fiscal year? diff --git a/period.py b/period.py index 50826a1cb6..4b30755922 100644 --- a/period.py +++ b/period.py @@ -73,7 +73,7 @@ class Period(Workflow, ModelSQL, ModelView): 'invisible': Eval('state') != 'close', 'depends': ['state'], }, - 'lock': { + 'lock_': { 'invisible': Eval('state') != 'close', 'depends': ['state'], }, @@ -347,7 +347,7 @@ class Period(Workflow, ModelSQL, ModelView): @classmethod @ModelView.button @Workflow.transition('locked') - def lock(cls, periods): + def lock_(cls, periods): pass @property diff --git a/period.xml b/period.xml index 41be0c8c0e..6b38ac90e2 100644 --- a/period.xml +++ b/period.xml @@ -63,7 +63,7 @@ this repository contains the full copyright notices and license terms. --> - lock + lock_ Lock Are you sure you want to lock the period? diff --git a/view/fiscalyear_list_close.xml b/view/fiscalyear_list_close.xml index bc6ea0fc2b..14c1292403 100644 --- a/view/fiscalyear_list_close.xml +++ b/view/fiscalyear_list_close.xml @@ -6,6 +6,6 @@ this repository contains the full copyright notices and license terms. -->