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.
Could not edit origin field in stock move. What happen if no related object for related field is found?
I want to edit the origin field in stock move. If there's a related stock picking object everything is fine. But if I create a new stock move (without a related stock picking object), it's not possible to edit the origin field. (Changes to the field are not stored).
I had a look in
class stock_move and found out, that the origin field is no simple char field, but a related field:
'origin': fields.related('picking_id','origin',type='char',size=64, relation="stock.picking", string="Source", store=True)
Is this the point? My assumption is that there's a problem when no related stock picking object can be found. Looks like a bug for me.
Am I right? Can somebody give me a hint?
Related fields are Just to show the related value of a field present in another model (here- a field called 'origin' in stock.picking) in the model u wish to show it (here stock.move)
In stock.picking there is a field named origin. It is The Value Of That field for the corresponding picking_id that is loaded into the stock move record. So when you select a picking in the stock move the corresponding value of origin in the picking would be automatically loaded.
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: 11/7/13, 6:58 AM|
|Seen: 1135 times|
|Last updated: 3/16/15, 8:10 AM|