improved_view

bzr revid: fp@tinyerp.com-20081120171929-pl0mlxl96f8ty9x1
This commit is contained in:
Fabien Pinckaers 2008-11-20 18:19:29 +01:00
parent 9139a84b8e
commit af008d1e3f
2 changed files with 2 additions and 2 deletions

View File

@ -790,7 +790,7 @@ class account_move(osv.osv):
def button_cancel(self, cr, uid, ids, context={}):
for line in self.browse(cr, uid, ids, context):
if not line.journal_id.update_posted:
raise osv.except_osv(_('Error !'), _('You can not modify a posted entry of this journal !'))
raise osv.except_osv(_('Error !'), _('You can not modify a posted entry of this journal !\nYou should mark the journal to allow canceling entries.'))
if len(ids):
cr.execute('update account_move set state=%s where id in ('+','.join(map(str,ids))+')', ('draft',))
return True

View File

@ -47,7 +47,7 @@ class wiz_state_open(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type':'form', 'arch':form, 'fields':fields, 'state':[('yes','Yes'),('end','No')]}
'result': {'type':'form', 'arch':form, 'fields':fields, 'state':[('end','No','gtk-no'),('yes','Yes','gtk-yes')]}
},
'yes': {
'actions': [_change_inv_state],