Change button style again

This commit is contained in:
Matthieu Dietrich
2016-05-24 15:20:22 +02:00
parent c1062478a0
commit da73f15cd0
6 changed files with 7 additions and 10 deletions

View File

@@ -11,7 +11,6 @@
"data": [
"views/res_config_view.xml",
"wizard/permanent_lock_date_wizard.xml",
"security/ir.model.access.csv",
],
'license': 'AGPL-3',
"auto_install": False,

View File

@@ -10,8 +10,8 @@ class AccountConfigSettings(models.TransientModel):
permanent_lock_date = fields.Date(
string="Permanent Lock Date",
related='company_id.permanent_lock_date',
help="Non-revertible closing of accounts prior to and inclusive of "
"this date. Use it for fiscal year locking instead of ""Lock Date"".")
help='Non-revertible closing of accounts prior to and inclusive of '
'this date. Use it for fiscal year locking instead of "Lock Date".')
@api.multi
def change_permanent_lock_date(self):

View File

@@ -1,2 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_permanent_lock_date_wizard,account.permanent.lock.move,model_permanent_lock_date_wizard,account.group_account_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_permanent_lock_date_wizard account.permanent.lock.move model_permanent_lock_date_wizard account.group_account_manager 1 1 1 1

View File

@@ -7,10 +7,10 @@
<xpath expr="//field[@name='fiscalyear_lock_date']/parent::div" position="after">
<div>
<label for="permanent_lock_date"/>
<field name="permanent_lock_date" class="oe_inline" readonly="1"/>
<field name="permanent_lock_date" readonly="1"/>
</div>
<div>
<button type="object" name="change_permanent_lock_date" string="Permanently Lock Entries" class="oe_inline"/>
<button type="object" name="change_permanent_lock_date" string="Permanently Lock Entries" class="btn-primary"/>
</div>
</xpath>
</field>

View File

@@ -19,7 +19,7 @@ class PermanentLockDateWizard(models.TransientModel):
if (company.permanent_lock_date and
self.lock_date < company.permanent_lock_date):
raise UserError(
_("You cannot set the permanent lock date in the past!")
_("You cannot set the permanent lock date in the past.")
)
# Then check if unposted moves are present before the date
moves = self.env['account.move'].search(
@@ -29,7 +29,7 @@ class PermanentLockDateWizard(models.TransientModel):
if moves:
raise UserError(
_("You cannot permanently lock since entries "
"are still unposted before this date!")
"are still unposted before this date.")
)
company.permanent_lock_date = self.lock_date

View File

@@ -5,7 +5,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Lock permanently entries">
<label string="All journal entries prior to and included at this date will be permanently locked!"/>
<label string="All journal entries prior to and included at this date will be permanently locked."/>
<group>
<field name="lock_date" required="1"/>
</group>