1

I added a new button near the Create Button in Odoo 14 but the issue that im facing its when i remove debug=assets JS file can't be executed anymore is there's way to load it instead of using debug=assets ?? Thank you

Farid
  • 11
  • 1
  • You have to add your js file to the assets by "linking" it into the `common_assets.xml` or `assets.xml`. There should be a lot of examples in Odoo itself. Odoo will generate an assets bundle file, with all js code which will be used outside the assets debug mode. This debug mode will load all js files directly from code (not from the bundle), what will lead to not minified and structured (you will see from which module it comes) js code in your browser dev tools. – CZoellner Dec 10 '21 at 10:01
  • @Farid how did you resolve this issue? – Adam Strauss Mar 16 '22 at 07:44
  • @CZoellner this solution is not working for me! – Adam Strauss Mar 16 '22 at 07:44
  • But that is the [common way](https://www.odoo.com/documentation/14.0/developer/reference/javascript/javascript_reference.html#assets-management). – CZoellner Mar 16 '22 at 08:07

0 Answers0