summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantavya Gajjar <mga@tinyerp.com>2011-03-19 14:07:45 +0530
committerMantavya Gajjar <mga@tinyerp.com>2011-03-19 14:07:45 +0530
commit98b7aff595c1c7889fa4e704cd1507ff9dc060da (patch)
tree01c95fceda049238ee7df0ee161f78023c844f80
parent7b645682ae2134f9ac0fe5e36ee765f60c875cff (diff)
[FIX]: post voucher entry based on the journal posting state 'entry_posted'
bzr revid: mga@tinyerp.com-20110319083745-6ddijyo4rksfgt6t
-rw-r--r--addons/account_voucher/account_voucher.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index c80bb9b3c62..16e09a6a840 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -777,7 +777,8 @@ class account_voucher(osv.osv):
'state': 'posted',
'number': name,
})
- move_pool.post(cr, uid, [move_id], context={})
+ if inv.journal_id.entry_posted:
+ move_pool.post(cr, uid, [move_id], context={})
for rec_ids in rec_list_ids:
if len(rec_ids) >= 2:
move_line_pool.reconcile_partial(cr, uid, rec_ids)