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

Proposed by DJ Patel (OpenERP)
Status: Rejected
Rejected by: Fabien (Open ERP)
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
Fabien (Open ERP) Disapprove
Purnendu Singh (OpenERP) (community) Approve
DJ Patel (OpenERP) (community) Needs Resubmitting
qdp (OpenERP) Pending
Mustufa Rangwala (Open ERP) Pending
Review via email: mp+85851@code.launchpad.net

This proposal supersedes a proposal from 2011-12-12.

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 : Posted in a previous version of this proposal

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
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Mra,

As per your suggestion When i am trying to fix the problem in def reconcile and def reconcile_partial method on account_move_line.py file, it breaks the normal flow of invoices.

So, I revert my changes and apply that changes to wizard.

Thanks and Regards,

Divyesh Makwana(MDI)

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

Seems OK!!

review: Approve
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

the implemntation is not good.
The test must not be in the wizard, but on the reconciliation method on the object (what if you use the reconcile through bank statement or automatic reconcile wizard?)

review: Disapprove

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:47:40 +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: