Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
When I confirm a sales order i can see that my sale.order.line's are moved to stock.move but in code I am not able to see where exactly it is happening. Can anyone please guide or help!!
Hi Shiv Modi,
If you want reference of SO line which is associated with stock move than,
You have to follow this.
1) stock move having reference of procurement when stock move created related procurement record is also created which having the sale order line references.
So, you can not get the sale order line reference directly from stock move.
2) You have do like this,
consider move is browse record of your stock.move
If you have only move_ids than follow this :
sale_lines = [ move.procurement_id.sale_line_id for move in stock_move_obj.browse(cr, uid, move_ids) if move.procurement_id and move.procurement_id.sale_line_id]
print "Browse record of Associated Sale Order LIne",sale_lines
#If you want Sale order line ids only. than
sale_line_ids = [ move.procurement_id.sale_line_id.id for move in stock_move_obj.browse(cr, uid, move_ids) if move.procurement_id and move.procurement_id.sale_line_id]
print " Sale Line IDs:::::",sale_line_ids
Hope this will helps.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/5/15, 9:32 AM|
|Seen: 2105 times|
|Last updated: 7/7/15, 2:19 AM|