[FIX] web, project: use the ES6 import

Remove the CommonJS require from the odoo-modules files and replace it
with the new ES6 imports.

Co-authored-by: Samuel Degueldre <sad@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2021-05-04 13:32:49 +00:00
co-authored by Samuel Degueldre
parent f43a0814ae
commit a8082fee7f
4 changed files with 5 additions and 8 deletions
@@ -1,9 +1,6 @@
/** @odoo-module alias=project.BurndownChartRenderer **/
import * as GraphRenderer from 'web/static/src/js/views/graph/graph_renderer';
const {
hexToRGBA,
} = require("web/static/src/js/views/graph/graph_utils");
import { hexToRGBA } from "web/static/src/js/views/graph/graph_utils";
export class BurndownChartRenderer extends GraphRenderer {
/**
@@ -6,7 +6,7 @@
*
*/
var mvc = require('web.mvc');
import * as mvc from 'web.mvc';
// Renderers may display sample data when there is no real data to display. In
// this case the data is displayed with opacity and can't be clicked. Moreover,
@@ -18,7 +18,7 @@
const _t = core._t;
const _lt = core._lt;
const searchUtils = require('web.searchUtils');
import * as searchUtils from 'web.searchUtils';
const GROUPABLE_TYPES = searchUtils.GROUPABLE_TYPES;
const PivotView = AbstractView.extend({
+2 -2
View File
@@ -1,8 +1,8 @@
/** @odoo-module alias=web.viewUtils **/
var dom = require('web.dom');
var utils = require('web.utils');
import * as dom from 'web.dom';
import * as utils from 'web.utils';
var viewUtils = {
/**