pycharm-odoo
pycharm-odoo copied to clipboard
PyCharm plugin for Odoo
  Since Odoo 14, we cannot do a dynamic attribute assignment on a recordset. Ref: https://github.com/odoo/odoo/pull/51075 cc @anhbtit
Ref: https://github.com/odoo/odoo/pull/109065
For example, `t-esc` and `t-raw` are deprecated since Odoo 15, use `t-out` instead. https://www.odoo.com/documentation/16.0/developer/reference/frontend/qweb.html#deprecated-output-directives
Type of `http.request` is actually [LocalProxy](https://werkzeug.palletsprojects.com/en/1.0.x/local/#werkzeug.local.LocalProxy) but [odoo-stubs](https://github.com/odoo-ide/odoo-stubs/blob/07f933c02b7e063be82e68850ce8b5ff76277928/odoo-stubs/http.pyi#L123) fakes it to `Request` to make PyCharm provide code completion for request's attributes. This leads two problems: 1. Type checking warning: 2....
This will add code completion for variables, contexts in QWeb Python eval expressions.
https://github.com/odoo/odoo/blob/9e50fa08a74fa842aa3a2f37dfe5b38707a50cba/addons/project/controllers/portal.py#L120
https://github.com/odoo/odoo/blob/e999101677fc38b6d4ba2e32f7bcfcb2ee9ec148/addons/hr_holidays/data/hr_holidays_data.xml#L10
https://github.com/odoo/odoo/blob/e999101677fc38b6d4ba2e32f7bcfcb2ee9ec148/addons/website/views/snippets/s_image_gallery.xml#L23 https://github.com/odoo/odoo/blob/e999101677fc38b6d4ba2e32f7bcfcb2ee9ec148/addons/website/data/website_data.xml#L891