Hi i am trying to render a component in a button click. I created a template and a component. But i don't know how link the button action and the component. Please guide.
Here is the code.
Buttonclick.js
odoo.define('mobile_basket_verification.basket_menu', function (require) {
"use strict";
const MainMenu = require('stock_barcode.MainMenu').MainMenu;
MainMenu.include({
events: Object.assign({}, MainMenu.prototype.events, {
'click .basket_verification_line': function () {
this.do_action('mobile_basket_verification.BasketVerificationComponent');
},
}),
});
});
template.xml
Component.js
/** @odoo-module **/
const { Component } = owl;
const { useSubEnv, useState } = owl.hooks;
class BasketVerificationComponent extends Component{
}
BasketVerificationComponent.template = 'mobile_basket_verification.basket_verification';