[FIX]purchase,procurement:Fixed=>Generate Sale order via Non admin User Po generated with wrong warehouse and company ,For information Traceback Generated after run the ORDERPOINT it is a sequence problem and it has been fixed in lp:787052 :
lp bug: https://launchpad.net/bugs/802322 fixed bzr revid: ron@tinyerp.com-20110629051800-u71iztvvtbgsyzuq
This commit is contained in:
parent
2ea0b6a37c
commit
4aa687cf3f
|
@ -183,6 +183,7 @@ class procurement_order(osv.osv):
|
|||
'product_qty': -product.virtual_available,
|
||||
'product_uom': product.uom_id.id,
|
||||
'location_id': location_id,
|
||||
'company_id': warehouse.company_id.id,
|
||||
'procure_method': 'make_to_order',
|
||||
})
|
||||
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
|
||||
|
|
|
@ -775,6 +775,8 @@ class procurement_order(osv.osv):
|
|||
prod_obj = self.pool.get('product.product')
|
||||
acc_pos_obj = self.pool.get('account.fiscal.position')
|
||||
po_obj = self.pool.get('purchase.order')
|
||||
wharehouse_obj = self.pool.get('stock.warehouse')
|
||||
|
||||
for procurement in self.browse(cr, uid, ids, context=context):
|
||||
res_id = procurement.move_id.id
|
||||
partner = procurement.product_id.seller_id # Taken Main Supplier of Product of Procurement.
|
||||
|
@ -821,6 +823,8 @@ class procurement_order(osv.osv):
|
|||
'partner_id': partner_id,
|
||||
'partner_address_id': address_id,
|
||||
'location_id': procurement.location_id.id,
|
||||
'warehouse_id': wharehouse_obj.search(cr, uid, [('company_id','=',procurement.company_id.id or company)])[0],
|
||||
'company_id': procurement.company_id.id or company,
|
||||
'pricelist_id': pricelist_id,
|
||||
'order_line': [(0,0,line)],
|
||||
'company_id': procurement.company_id.id,
|
||||
|
|
Loading…
Reference in New Issue