Rename lock buttons into lock_
issue10784 review375541002
This commit is contained in:
1 parent
b395a0b095
commit
ee9adc628a
7 files changed
+10
-9
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Rename lock buttons into lock_
|
||||
* Add split lines wizard
|
||||
* Validate that all inactive accounts have no balance when closing periods
|
||||
|
||||
|
||||
+3
-3
@@ -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):
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="model" search="[('model', '=', 'account.fiscalyear')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="fiscalyear_lock_button">
|
||||
<field name="name">lock</field>
|
||||
<field name="name">lock_</field>
|
||||
<field name="string">Lock</field>
|
||||
<field name="confirm">Are you sure you want to lock the fiscal year?</field>
|
||||
<field name="model" search="[('model', '=', 'account.fiscalyear')]"/>
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="group" ref="group_account_admin"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="period_lock_button">
|
||||
<field name="name">lock</field>
|
||||
<field name="name">lock_</field>
|
||||
<field name="string">Lock</field>
|
||||
<field name="confirm">Are you sure you want to lock the period?</field>
|
||||
<field name="model" search="[('model', '=', 'account.period')]"/>
|
||||
|
||||
@@ -6,6 +6,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="company" expand="1"/>
|
||||
<button name="reopen"/>
|
||||
<button name="close"/>
|
||||
<button name="lock"/>
|
||||
<button name="lock_"/>
|
||||
<field name="state" tree_invisible="1"/>
|
||||
</tree>
|
||||
@@ -8,6 +8,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="type"/>
|
||||
<button name="reopen"/>
|
||||
<button name="close"/>
|
||||
<button name="lock"/>
|
||||
<button name="lock_"/>
|
||||
<field name="state" tree_invisible="1"/>
|
||||
</tree>
|
||||
Reference in new issue
Block a user