Rifakat Haradwala (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-724525-rha into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#724525 Purchase Orders created from Sales Orders do not honour the Analytic
Account or product description
https://bugs.launchpad.net/bugs/724525
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724525-rha/+merge/51512
lp:724525 Purchase Orders created from Sales Orders do not honour the Analytic
Account or product description
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724525-rha/+merge/51512
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-724525-rha.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2011-02-28 10:49:36 +0000
+++ purchase/purchase.py 2011-02-28 10:54:47 +0000
@@ -780,6 +780,7 @@
partner_id = partner.id
address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery']
pricelist_id = partner.property_product_pricelist_purchase.id
+ sale_order_line = procurement.move_id.sale_line_id
uom_id = procurement.product_id.uom_po_id.id
@@ -798,7 +799,7 @@
product = prod_obj.browse(cr, uid, procurement.product_id.id, context=context)
line = {
- 'name': product.partner_ref,
+ 'name': sale_order_line.name,
'product_qty': qty,
'product_id': procurement.product_id.id,
'product_uom': uom_id,
@@ -806,6 +807,7 @@
'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
'move_dest_id': res_id,
'notes': product.description_purchase,
+ 'account_analytic_id': sale_order_line.order_id.project_id and sale_order_line.order_id.project_id.id or False,
}
taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help : https://help.launchpad.net/ListHelp