Merge lp:~openerp-dev/openobject-addons/trunk-bug-901166-mdi into lp:openobject-addons

Proposed by DJ Patel (OpenERP)
Status: Superseded
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-901166-mdi
Merge into: lp:openobject-addons
Diff against target: 30 lines (+13/-0)
1 file modified
account/wizard/account_reconcile.py (+13/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-901166-mdi
Reviewer Review Type Date Requested Status
Purnendu Singh (OpenERP) (community) Needs Fixing
DJ Patel (OpenERP) (community) Needs Resubmitting
Mustufa Rangwala (Open ERP) (community) Needs Fixing
qdp (OpenERP) Pending
Review via email: mp+85284@code.launchpad.net

This proposal has been superseded by a proposal from 2011-12-15.

Description of the change

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/901166 "Able to reconcile unposted entries".

Thanks and Regards,

Divyesh Makwana(MDI)

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

I think we should directly fix in def reconcile and def reconcile_partial method on account_move_line.py file, so it can be more generic fix.

review: Needs Fixing
5909. By DJ Patel (OpenERP)

[IMP] account : Improved the code

Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Sir,

I have improved the code as per your suggestion.

Thanks and Regards,

Divyesh Makwana(MDI)

review: Needs Resubmitting
Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

Hello,

It's breaking the normal flow of invoicing..
Test this way..
1) create invoice
2) try to pay it with voucher

You will not be able to pay it!!!

Thanks,
Purnendu Singh

review: Needs Fixing
5910. By DJ Patel (OpenERP)

[FIX] account : Able to reconcile unposted entries

Unmerged revisions

5910. By DJ Patel (OpenERP)

[FIX] account : Able to reconcile unposted entries

5909. By DJ Patel (OpenERP)

[IMP] account : Improved the code

5908. By DJ Patel (OpenERP)

[FIX] account : Able to reconcile unposted entries

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/wizard/account_reconcile.py'
2--- account/wizard/account_reconcile.py 2011-11-03 09:56:12 +0000
3+++ account/wizard/account_reconcile.py 2011-12-15 12:38:13 +0000
4@@ -65,13 +65,26 @@
5 account_id = line.account_id.id
6 return {'trans_nbr': count, 'account_id': account_id, 'credit': credit, 'debit': debit, 'writeoff': debit - credit}
7
8+ def check_unreconcile_entries(self, cr, uid, ids, context=None):
9+ if context is None:
10+ context = {}
11+ account_move_line_obj = self.pool.get('account.move.line')
12+ if context.get('active_ids',False) :
13+ for line in account_move_line_obj.browse(cr, uid, context['active_ids'], context=context):
14+ if line.move_id.state == "draft":
15+ raise osv.except_osv(_('Error !'), _('You cannot reconcile the unposted entries.'))
16+ return True
17+
18 def trans_rec_addendum_writeoff(self, cr, uid, ids, context=None):
19+ self.check_unreconcile_entries(cr, uid, ids, context=context)
20 return self.pool.get('account.move.line.reconcile.writeoff').trans_rec_addendum(cr, uid, ids, context)
21
22 def trans_rec_reconcile_partial_reconcile(self, cr, uid, ids, context=None):
23+ self.check_unreconcile_entries(cr, uid, ids, context=context)
24 return self.pool.get('account.move.line.reconcile.writeoff').trans_rec_reconcile_partial(cr, uid, ids, context)
25
26 def trans_rec_reconcile_full(self, cr, uid, ids, context=None):
27+ self.check_unreconcile_entries(cr, uid, ids, context=context)
28 account_move_line_obj = self.pool.get('account.move.line')
29 period_obj = self.pool.get('account.period')
30 date = False

Subscribers

People subscribed via source and target branches

to all changes: