odoo-ide / pycharm-odoo-old

PyCharm plugin for Odoo
https://plugins.jetbrains.com/plugin/13499-odoo
GNU General Public License v3.0
63 stars 31 forks source link

Unresolve Reference to ignore speical fields #41

Closed AdrianTeng closed 3 years ago

AdrianTeng commented 3 years ago

Thanks for the brilliant plugin!

Odoo has a bunch of special built in fields, namely, id, create_date, write_date, create_uid, and write_uid, that would appear on every model. As they are not defined in the usual manner, usage of them in XML are currently highlighted as unresolved reference. Would be nice if the plugin could recognise these sepcial fields (I'm guessing adding this at OdooPyInspectionExtension.java?)

Example:

image
trinhanhngoc commented 3 years ago

Hi @AdrianTeng . You can use https://github.com/trinhanhngoc/odoo-stubs to help the plugin recognize these special fields.

AdrianTeng commented 3 years ago

Works like magic! Thanks for the help!

AdrianTeng commented 3 years ago

For future reference -- just download the stub repo and import it to your PyCharm project