Hemendra Paregi(Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-907211-hpa into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #907211 in OpenERP Addons: "Sale order line containing service duplicated
on invoice"
https://bugs.launchpad.net/openobject-addons/+bug/907211
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-907211-hpa/+merge/86888
Hello Antoine
Now sale order line not containing service duplicated on invoice.
Thanks.
HPA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-907211-hpa/+merge/86888
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-907211-hpa.
=== modified file 'sale/stock.py'
--- sale/stock.py 2011-12-19 16:54:40 +0000
+++ sale/stock.py 2011-12-26 10:30:32 +0000
@@ -135,18 +135,19 @@
for picking in picking_obj.browse(cursor, user, picking_ids,
context=context):
- if not picking.sale_id:
+ if not picking.sale_id or picking.backorder_id:
continue
sale_lines = picking.sale_id.order_line
invoice_created = invoices[result[picking.id]]
+
if picking.sale_id.user_id:
invoice_obj.write(cursor, user, [invoice_created.id], {'user_id': picking.sale_id.user_id.id}, context=context)
-
if picking.sale_id.fiscal_position:
invoice_obj.write(cursor, user, [invoice_created.id], {'fiscal_position': picking.sale_id.fiscal_position.id}, context=context)
if picking.sale_id.client_order_ref:
inv_name = picking.sale_id.client_order_ref + " : " + invoice_created.name
invoice_obj.write(cursor, user, [invoice_created.id], {'name': inv_name}, context=context)
+
for sale_line in sale_lines:
if sale_line.product_id.type == 'service' and sale_line.invoiced == False:
if not type:
@@ -195,4 +196,4 @@
})
return result
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
_______________________________________________
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