Reputation: 23
I learn about Qweb and javascirpt in odoo through youtube channel and documnention, but it's too difficult, I can't understand how it works and the organizational structure and syntax. Is there any way you can help me?
Upvotes: 0
Views: 1435
Reputation: 1314
Introduction to javascript in odoo : https://www.youtube.com/watch?v=VuUMvzycXQY
Example of use in your module : my_module_custom
odoo.define('my_module_custom.hidebadgepill', function(require)
{
"use strict";
$(document).ready(function() {
$(function() {
//your js or jquery script , for instance :
$('.o_web_index_topbar_filters').find('.badge-pill').hide();
});
});
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_frontend"
inherit_id="website.assets_frontend" name="Date Check">
<xpath expr="." position="inside">
<script type="text/javascript" src="/my_module_custom
/static/src/js/myclientscript.js"/>
</xpath>
</template>
</odoo>
##-*- coding: utf-8 -*-
{
'name': 'my module custom name',
'version': '13.0.2.0.147',
...
'data': [
'views/assets_frontend.xml',
...
Upvotes: 2