pycharm-odoo icon indicating copy to clipboard operation
pycharm-odoo copied to clipboard

Improved auto import in JS

Open arpi-odoo opened this issue 1 week ago • 1 comments

When you auto import a missing statement, pycharm will add this:

import { useService } from "../../../../../web/static/src/core/utils/hooks";

But that can be replaced with syntax sugar like so:

import { useService } from "@web/core/utils/hooks";

If we know that we are getting the import from a odoo module, it should put the @module_name then this will replace module_name/static/src in the import path.

arpi-odoo avatar Feb 19 '25 16:02 arpi-odoo