Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-383653-rha into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-383653-rha/+merge/93382
Hello,
Salesman was not transmitted between the sale order and the customer invoice
while creating invoice from picking.
Please review this.
Regards,
Rifakat
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-383653-rha/+merge/93382
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-383653-rha.
=== modified file 'sale/stock.py'
--- sale/stock.py 2012-01-18 15:17:20 +0000
+++ sale/stock.py 2012-02-16 11:25:26 +0000
@@ -134,12 +134,12 @@
continue
sale_lines = picking.sale_id.order_line
invoice_created = invoices[result[picking.id]]
- for inv in invoice_obj.browse(cursor, user, [invoice_created.id], context=context):
- if not inv.fiscal_position:
- invoice_obj.write(cursor, user, [inv.id], {'fiscal_position': picking.sale_id.fiscal_position.id}, context=context)
+ 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:
- inv_name = picking.sale_id.client_order_ref + " : " + invoice_created.name
- invoice_obj.write(cursor, user, [invoice_created.id], {'name': inv_name}, context=context)
+ vals.update({'name': picking.sale_id.client_order_ref + " : " + invoice_created.name})
+ 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:
if group:
_______________________________________________
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