pycharm-odoo
pycharm-odoo copied to clipboard
Customize control flow to infer concrete field type by type name
https://github.com/odoo/odoo/blob/4883ae872c57f8c8db60ea5f9f4fd9df8bba4948/odoo/fields.py#L1118

In the above code sample, the instruction self.type == 'many2one' in the control flow of the expression self.delegate has enough information to infer the type of self in self.delegate.
If the translate is true, then the field type is _String