Merge lp:~openerp-dev/openobject-addons/6.0-bug-928899-rha into lp:openobject-addons/6.0

Proposed by Rifakat Husen (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 5057
Merged at revision: 5073
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-bug-928899-rha
Merge into: lp:openobject-addons/6.0
Diff against target: 17 lines (+5/-2)
1 file modified
account/invoice.py (+5/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-bug-928899-rha
Reviewer Review Type Date Requested Status
Raphael Collet (OpenERP) (community) Approve
Naresh(OpenERP) (community) Approve
Review via email: mp+92975@code.launchpad.net

Description of the change

Hello,

_reconciled method for account.invoice method does not take into account the invoice state 'paid' when the result is False so invoice remains paid, not open.

Kindly review it.

Regards,
Rifakat

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/invoice.py'
2--- account/invoice.py 2012-02-10 17:06:29 +0000
3+++ account/invoice.py 2012-02-14 13:18:48 +0000
4@@ -80,8 +80,11 @@
5
6 def _reconciled(self, cr, uid, ids, name, args, context=None):
7 res = {}
8- for id in ids:
9- res[id] = self.test_paid(cr, uid, [id])
10+ wf_service = netsvc.LocalService("workflow")
11+ for inv in self.browse(cr, uid, ids, context=context):
12+ res[inv.id] = self.test_paid(cr, uid, [inv.id])
13+ if not res[inv.id] and inv.state == 'paid':
14+ wf_service.trg_validate(uid, 'account.invoice', inv.id, 'open_test', cr)
15 return res
16
17 def _get_reference_type(self, cr, uid, context=None):