Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-575053-rha into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
Rifakat (OpenERP) (rha-openerp)
Related bugs:
Bug #1002613 in OpenERP Addons: "The value of name field in invoice is not
wanted, which invoice is created from more than one delivery order in group"
https://bugs.launchpad.net/openobject-addons/+bug/1002613
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-575053-rha/+merge/111219
Hello,
Corrected Invoice name when we create grouped invoice by 'Create Invoice'
wizard on Delivery Order list view.
When we provide Customer ref in sales orders then invoice name should be,
ref: order name, ref: order name, ...
Invoice name should contain information of all the customer refs(if defined on
sales order) and orders name
from where that invoice is created.
Thanks for the review,
Regards,
Rifakat Haradwala
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-575053-rha/+merge/111219
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-575053-rha.
=== modified file 'sale/stock.py'
--- sale/stock.py 2012-03-26 11:12:22 +0000
+++ sale/stock.py 2012-06-20 13:02:20 +0000
@@ -128,6 +128,7 @@
context=context):
invoices[invoice.id] = invoice
+ inv_names = {}
for picking in picking_obj.browse(cursor, user, picking_ids,
context=context):
if not picking.sale_id:
@@ -137,8 +138,11 @@
vals = {'user_id': picking.sale_id.user_id and picking.sale_id.user_id.id or False}
if not invoice_created.fiscal_position:
vals.update({'fiscal_position': picking.sale_id.fiscal_position and picking.sale_id.fiscal_position.id or False})
- if picking.sale_id.client_order_ref:
- vals.update({'name': picking.sale_id.client_order_ref + " : " + invoice_created.name})
+ if invoice_created.id in inv_names:
+ inv_names[invoice_created.id] = (inv_names[invoice_created.id] + ', ') + (picking.sale_id.client_order_ref and picking.sale_id.client_order_ref + ' : ' or '') + picking.name
+ else:
+ inv_names[invoice_created.id] = (picking.sale_id.client_order_ref and picking.sale_id.client_order_ref + ' : ' or '') + picking.name
+ vals.update({'name': inv_names[invoice_created.id]})
invoice_obj.write(cursor, user, [invoice_created.id], vals, context=context)
for sale_line in sale_lines:
if sale_line.product_id.type == 'service' and sale_line.invoiced == False:
_______________________________________________
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