Kirti Savalia(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/5.0-opw-381816-ksa into 
lp:openobject-addons/5.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/5.0-opw-381816-ksa/+merge/93178

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

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/5.0-opw-381816-ksa/+merge/93178
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/5.0-opw-381816-ksa.
=== modified file 'account/invoice.py'
--- account/invoice.py	2011-09-08 08:35:21 +0000
+++ account/invoice.py	2012-02-15 10:42:20 +0000
@@ -752,7 +752,10 @@
                     raise osv.except_osv(_('Warning !'), _('There is no active invoice sequence defined for the journal !'))
 
                 if invtype in ('in_invoice', 'in_refund'):
-                    ref = reference
+                    if not reference:
+                        ref = self._convert_ref(cr, uid, number)
+                    else:
+                        ref = reference
                 else:
                     ref = self._convert_ref(cr, uid, number)
                 cr.execute('UPDATE account_invoice SET number=%s ' \

_______________________________________________
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

Reply via email to