Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2669 Переглядів
here is older code of odoo version 16 while upgrading to odoo v 17 gives error 
** @odoo-module **/
import { registry } from "@web/core/registry";
import { useService } from "@web/core/utils/hooks";
const { Component, onWillStart, useState } = owl;
import {onMounted,  useEffect,onRendered, xml } from "@odoo/owl";
import rpc from 'web.rpc';
var time = require('web.time');
import session from 'web.session';


the above code gives OWL error"

The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:

  • web.rpc
  • web.time
  • web.session

The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems:

  • @my_app/js/timer

"
Аватар
Відмінити
Найкраща відповідь

Hi,

The web.rpc, web.time, and web.session have been deprecated in Odoo 17 , use the following imports instead of that:import { session } from "@web/session";import { useService } from "@web/core/utils/hooks";


Hope it helps

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
трав. 25
615
0
бер. 25
323
2
лист. 24
1003
1
жовт. 24
1639
0
вер. 24
749