콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1528 화면

Помилка клієнта Odoo

UncaughtPromiseError > OwlError

Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)

Occured on upako.odoo.com on 2025-02-04 10:10:43 GMT

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    Error: An error occured in the owl lifecycle (see this Error's "cause" property)
        at handleError (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:749:101)
        at App.handleError (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:1400:29)
        at Fiber._render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:774:19)
        at Fiber.render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:772:6)
        at ComponentNode.initiateRender (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:842:47)

Caused by: TypeError: Object.groupBy is not a function
    at get partition (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:14586:251)
    at Reflect.get (<anonymous>)
    at Object.get (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:816:71)
    at Composer.template (eval at compile (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:1352:421), <anonymous>:50:71)
    at Fiber._render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:773:96)
    at Fiber.render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:772:6)
    at ComponentNode.initiateRender (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:842:47)

아바타
취소
작성자

everywhere when refreshing the page

베스트 답변

HIi,
You're using groupBy(), which is a modern JavaScript method not supported in some older browsers or environments.Use Array.prototype.reduce() or lodash.groupby() instead of groupBy()

  • If you (or a module) are using:

js 

Object.groupBy(data, ...)

Replace it with:

data.reduce((acc, item) => {

    const key = item.someKey;

    (acc[key] = acc[key] || []).push(item);

    return acc;

}, {});

Or install a polyfill if custom JS must use Object.groupBy()

Add this in your custom JS:

if (!Object.groupBy) {

  Object.groupBy = function (items, callback) {

    return items.reduce((result, item) => {

      const key = callback(item);

      (result[key] = result[key] || []).push(item);

      return result;

    }, {});

  };

}

Check your custom modules or recent theme updates

→ They might be using Object.groupBy() improperly.

i dont know which version you will use you make custom module or not 
there is one way for solution

i hope it is use full

아바타
취소
관련 게시물 답글 화면 활동
1
8월 25
701
1
6월 25
1280
1
6월 25
2767
0
5월 25
1280
0
12월 24
4