Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1124 Prikazi

Hi guys, i work on odoo 16 and i want to custom widget step by using FieldHtml in module web_editor. My code update from odoo15. However, i declare variable like 
var FieldHtml = require('web_editor/js/backend/field_html')

but it's does not work, I need some idea, thank a lot!

My code is here:

odoo.define("report_odoo.ReportPreview, function (require) {
"use strict";

const FieldHtml = require('@web_editor/js/backend/field_html');
var field_registry = require("web.field_registry");
var core = require("web.core");
var rpc = require("web.rpc");
var session = require("web.session");
const { Dialog } = require("@web/core/dialog/dialog");
var
translation = require('web.translation');
var _t = translation._t;

var ReportPreview = FieldHtml.extend({
//logic
});

field_registry.add(", EVReportPreview);

return ReportPreview;
});




Avatar
Opusti