Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
use JS en Odoo heredando de website.assets_frontend

Estoy tratando de usar mi propio Javascript en un módulo de odoo, algo para probar, pero aparece un error de plantilla. Esta es mi vista/plantilla.xml

 <odoo> <data> <template id="assets_frontend" name="library_website_assets" inherit_id="website.assets_frontend"> <xpath expr="." position="inside"> <script type="text/javascript" src="/upobeer/static/src/js/functions.js"></script> </xpath> </template> </data> </odoo>

Y mi static/src/js/functions.js

 odoo.define('upobeer.library_website_assets', function (require) { 'use strict'; console.log('JS is work'); });

sin embargo, al instalar el módulo me sale este error

 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 643, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 301, in _handle_exception raise exception.with_traceback(None) from new_cause odoo.tools.convert.ParseError: while parsing None:4, somewhere inside <data name="library_website_assets" inherit_id="website.assets_frontend"> <xpath expr="." position="inside"> <script type="text/javascript" src="/upobeer/static/src/js/functions.js"/> </xpath> </data>

Tengo vistas/templates.xml agregados en manifest.py

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

el view/template.xml correcto es

 <odoo> <data> <template id="assets_frontend" name="library_website_assets" inherit_id="website.assets_frontend"> <xpath expr="." position="inside"> <script type="text/javascript" src="/upobeer/static/src/js/functions.js"></script> </xpath> </template> </data> </odoo>
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!