diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index df43c81b3b7..85bfedb6809 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -398,7 +398,7 @@
Cash Journal - (test)
- CHK
+ CSH
cash
diff --git a/addons/account_voucher/test/account_voucher.yml b/addons/account_voucher/test/account_voucher.yml
index a49222c3b96..88f8285458f 100644
--- a/addons/account_voucher/test/account_voucher.yml
+++ b/addons/account_voucher/test/account_voucher.yml
@@ -23,7 +23,7 @@
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
- state == 'draft'
-
- I change the state of voucher to "proforma" by clicking PRO-FORMA button
+ I compute the voucher to calculate the taxes by clicking Cpmpute button
-
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucherforaxelor0}
-
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 3bf9453b453..22d2c72c2c1 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -137,7 +137,7 @@ class account_voucher(osv.osv):
'move_ids': fields.related('move_id','line_id', type='many2many', relation='account.move.line', string='Real Entry'),
#'move_ids':fields.many2many('account.move.line', 'voucher_id', 'account_id', 'rel_account_move', 'Real Entry', readonly=True, states={'draft':[('readonly',False)]}),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}),
- 'audit':fields.boolean('Audit Complete ?', required=False),
+ 'audit': fields.related('move_id','to_check', type='boolean', relation='account.move', string='Audit Complete ?'),
}
_defaults = {
@@ -292,14 +292,18 @@ class account_voucher(osv.osv):
if total != 0:
res = {
- 'amount':total,
- 'state':'proforma'
+ 'amount':total
}
self.write(dbcr, uid, ids, res)
else:
raise osv.except_osv(_('Invalid amount !'), _('You can not create Pro-Forma voucher with Total amount <= 0 !'))
return True
+ def voucher_recheck(self, cr, uid, ids, context={}):
+ self.open_voucher(cr, uid, ids, context)
+ self.write(cr, uid, ids, {'state':'recheck'}, context)
+ return True
+
def proforma_voucher(self, cr, uid, ids, context={}):
self.action_move_line_create(cr, uid, ids)
self.write(cr, uid, ids, {'state':'posted'})
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 780d20d3ebb..44aba92934c 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -70,11 +70,11 @@
-
-
+
+
-
-
+
+
diff --git a/addons/account_voucher/voucher_workflow.xml b/addons/account_voucher/voucher_workflow.xml
index f1444761c48..68307d8457e 100644
--- a/addons/account_voucher/voucher_workflow.xml
+++ b/addons/account_voucher/voucher_workflow.xml
@@ -7,18 +7,18 @@
True
-
-
- True
- draft
- write({'state':'draft'})
- function
-
-
+
+
+
+
+
+
+ True
proforma
- open_voucher()
+ write({'state':'draft'})
+
function
@@ -27,12 +27,13 @@
done
proforma_voucher()
function
+ True
recheck
- write({'state':'recheck'})
+ voucher_recheck()
function
@@ -42,20 +43,20 @@
cancel_voucher()
function
+
+
+
+
+
+
+
+
-
-
- audit
- audit_pass()
- True
- function
-
-
-
-
-
- open_voucher
-
+
+
+
+
+
@@ -103,7 +104,7 @@
-
+
cancel_to_draft