odoo-ide / pycharm-odoo

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

Improved cursor position after auto complete interferes with live template completion #463

Closed ThomasDePontieuSomko closed 6 months ago

ThomasDePontieuSomko commented 7 months ago

The "Improved cursor position after selecting model name, field name,... completion items" in 2024.2.0 causes live templates to be interrupted by exiting the dynamic template variable completion.

For example, this template to create a Many2one field ends immediately after auto-completing the model name, instead of jumping to the next dynamic variable.

auto_complete_cursor

trinhanhngoc commented 7 months ago

Hello @ThomasDePontieuSomko ,

I could not reproduce the problem. Here is my screencast:

https://github.com/odoo-ide/pycharm-odoo/assets/11208291/d1b12660-c124-453d-8611-b0c662d5b67c

ThomasDePontieuSomko commented 7 months ago

Hi @trinhanhngoc ,

I've done some more testing and it seems that the problem only occurs when the next dynamic value in the template is positioned before the one completed by the odoo plugin. So for example:

Templates that have the issue:

$VAR_2$ = fields.Many2one('$VAR_1$', string='$VAR_3$')

Templates that don't have the issue:

field_name = fields.Many2one('$VAR_1$', string='$VAR_2$')
$VAR_3$ = fields.Many2one('$VAR_1$', string='$VAR_2$')

Where the templates cycles through the dynamic variables in the following order VAR_1 > VAR_2 > VAR_3

trinhanhngoc commented 7 months ago

Hi @ThomasDePontieuSomko ,

Thank you for the additional information. I confirm the issue. This issue will be addressed in the next version.

trinhanhngoc commented 6 months ago

Hi @ThomasDePontieuSomko ,

The new version 2024.2.1 has been released with the fix for this issue.