improved_view
bzr revid: fp@tinyerp.com-20081120171929-pl0mlxl96f8ty9x1
This commit is contained in:
parent
9139a84b8e
commit
af008d1e3f
|
@ -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
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in New Issue