pycharm-odoo icon indicating copy to clipboard operation
pycharm-odoo copied to clipboard

Customize control flow to infer concrete field type by type name

Open trinhanhngoc opened this issue 2 years ago • 1 comments

https://github.com/odoo/odoo/blob/4883ae872c57f8c8db60ea5f9f4fd9df8bba4948/odoo/fields.py#L1118 image

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.

trinhanhngoc avatar Sep 29 '22 04:09 trinhanhngoc

If the translate is true, then the field type is _String

image

trinhanhngoc avatar Oct 10 '22 09:10 trinhanhngoc