wt-io-it / odoo-pycharm-plugin

Plugin to Support Odoo in Pycharm
GNU Affero General Public License v3.0
19 stars 10 forks source link

java.lang.NullPointerException: in autocomplete when using :UNDETECTED_XML_ID: as xml id beginning #73

Open foxcarlos opened 2 years ago

foxcarlos commented 2 years ago

Plugin Version: 0.6.6 IntelliJ Version: PyCharm 2022.2.3 IntelliJ Build: PY-222.4345.23

java.lang.NullPointerException: Cannot invoke "at.wtioit.intellij.plugins.odoo.records.OdooRecord.getDefiningElement()" because "record" is null ``` java.lang.NullPointerException: Cannot invoke "at.wtioit.intellij.plugins.odoo.records.OdooRecord.getDefiningElement()" because "record" is null at at.wtioit.intellij.plugins.odoo.AbstractOdooCompletionContributor.lambda$suggestRecordXmlId$1(AbstractOdooCompletionContributor.java:119) at at.wtioit.intellij.plugins.odoo.WithinProject.run(WithinProject.java:25) at at.wtioit.intellij.plugins.odoo.AbstractOdooCompletionContributor.suggestRecordXmlId(AbstractOdooCompletionContributor.java:118) at at.wtioit.intellij.plugins.odoo.OdooXmlCompletionContributor.fillCompletionVariants(OdooXmlCompletionContributor.java:22) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:76) ... at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:297) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ... at java.base/java.lang.Thread.run(Thread.java:833) ```
ap-wtioit commented 1 year ago

Happened (once) when using xml like this for autocomplete:

<field name="inherit_id" ref=":UNDETECTED_XML_ID:.ec"/>

Not reproducable in tests