Skip to Content
Menu
This question has been flagged
2 Replies
6097 Views

Hello,

how to create related field?

i have created a field "length" in product.template and a field with "cutting" in mrp.bom.line. i want to get value of "cutting" field from "length"? how can i do?

i am wrting as:


cutting = fields.Float(related='related='product.template.length','string="Cutting")
it results in server error?
please help
Avatar
Discard
Best Answer

product_tmpl_id = fields.Many2one('product.template')
cutting = fields.Float(related=''product_id.length')

Related field require many2one type field(here product_tmpl_id) for chaining.

Avatar
Discard