odoo-ide / pycharm-odoo

PyCharm plugin for Odoo
https://plugins.jetbrains.com/plugin/13499-odoo
Other
41 stars 5 forks source link

Support http.Controller extension mechanism #411

Open jerzyk opened 10 months ago

jerzyk commented 10 months ago

situation:

extending/overriding class CustomerPortal from odoo.addons.portal.controllers.portal and extendig method _prepare_sale_portal_rendering_values which is defined in and override by itself in sale.controllers.portal

for super()._prepare_sale_portal_rendering_values(*args, **kw) statement - it generates a false positive unresolved reference

imo it shouldn't - sale is in module dependencies and odoo is resolving this code properly

trinhanhngoc commented 10 months ago

Hi @jerzyk , Thank you for the report. I didn't know that http.Controller has that extension mechanism. I will add support for that feature soon. While waiting for the improvement, you can extend CustomerPortal from sale instead of from portal as a workaround.

jerzyk commented 10 months ago

you can extend CustomerPortal from sale instead of from portal as a workaround.

I was thinking about adding this to the original description - but it wasn't relevant to the base issue, so decided not to, but thanks anyway :)