over 9 years ago
Related is used to define value of a related field which is given by following a sequence of relational fields and reading a field on the reached model. The complete sequence of fields to traverse is specified by the attribute and records.
Example
You can see the below code.
- class Demo(models.Model):
- _name = 'foo'
- state = fields.Selection([...], required=True)
- class Second(models.Model):
- _inherit = 'foo'
- state = fields.Selection(help="Findnerd.com)
class Demo(models.Model): _name = 'foo' state = fields.Selection([...], required=True) class Second(models.Model): _inherit = 'foo' state = fields.Selection(help="Findnerd.com)
Note- Related fields is Basic string field, it can be length-limited, it is usually displayed as a single-line string in clients records.
0 Comment(s)