Merge lp:~openerp-dev/openobject-addons/5.0-opw-381816-ksa into lp:openobject-addons/5.0

Proposed by Kirti Savalia(OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Merged at revision: 2935
Proposed branch: lp:~openerp-dev/openobject-addons/5.0-opw-381816-ksa
Merge into: lp:openobject-addons/5.0
Diff against target: 17 lines (+3/-3)
1 file modified
account/invoice.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/5.0-opw-381816-ksa
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+93178@code.launchpad.net

Description of the change

Hello,

For the purchase journal when reference field not available take the number field instead of reference field.
This fix solve the issue.

Thanks
KSA

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-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 2011-09-08 08:35:21 +0000
3+++ account/invoice.py 2012-02-15 11:45:20 +0000
4@@ -751,10 +751,10 @@
5 if not number:
6 raise osv.except_osv(_('Warning !'), _('There is no active invoice sequence defined for the journal !'))
7
8+ ref = self._convert_ref(cr, uid, number)
9 if invtype in ('in_invoice', 'in_refund'):
10- ref = reference
11- else:
12- ref = self._convert_ref(cr, uid, number)
13+ if reference:
14+ ref = reference
15 cr.execute('UPDATE account_invoice SET number=%s ' \
16 'WHERE id=%s', (number, id))
17 cr.execute('UPDATE account_move SET ref=%s ' \