Priyesh (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-17393-pso into
lp:openobject-addons/6.0.
Requested reviews:
Raphael Collet (OpenERP) (rco-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17393-pso/+merge/76519
Hello,
Improved proper use of 'Skip draft state for manual entries' and added
condition to check entry posted before calling of post method of
move(case:17393)
Thanks,
Priyesh
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17393-pso/+merge/76519
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-17393-pso.
=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py 2011-01-14 00:11:01 +0000
+++ account/account_bank_statement.py 2011-09-22 06:59:24 +0000
@@ -293,7 +293,8 @@
_('Journal Item "%s" is not valid') % line.name)
# Bank statements will not consider boolean on journal entry_posted
- account_move_obj.post(cr, uid, [move_id], context=context)
+ if st.journal_id.entry_posted:
+ account_move_obj.post(cr, uid, [move_id], context=context)
return move_id
def get_next_st_line_number(self, cr, uid, st_number, st_line, context=None):
=== modified file 'account/invoice.py'
--- account/invoice.py 2011-06-21 14:56:58 +0000
+++ account/invoice.py 2011-09-22 06:59:24 +0000
@@ -930,7 +930,8 @@
self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name})
# Pass invoice in context in method post: used if you want to get the same
# account move reference when creating the same invoice after a cancelled one:
- self.pool.get('account.move').post(cr, uid, [move_id], context={'invoice':inv})
+ if journal.entry_posted:
+ self.pool.get('account.move').post(cr, uid, [move_id], context={'invoice':inv})
self._log_event(cr, uid, ids)
return True
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2011-08-31 06:33:42 +0000
+++ account_voucher/account_voucher.py 2011-09-22 06:59:24 +0000
@@ -790,7 +790,8 @@
'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)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp