Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

TypeError: Cannot read properties of undefined (reading 'type')

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
posjsv15
3 Відповіді
17477 Переглядів
Аватар
Kahina

I'm encountering a persistent issue when trying to access the Point of Sale (POS) menu in Odoo, and I'm hoping someone can provide guidance on resolving it.


Here's the error message I'm encountering:

TypeError: Cannot read properties of undefined (reading 'type')
    at ControlPanelModelExtension._extractAttributes (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:3583:107)
    at http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:3565:6
    at Array.forEach ()
    at ControlPanelModelExtension._createGroupOfFiltersFromArch (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:3560:364)
    at ControlPanelModelExtension._addFilters (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:3549:51)
    at ControlPanelModelExtension.prepareState (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:3523:149)
    at ControlPanelModelExtension.importState (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:5799:68)
    at ActionModel.importState (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:5815:180)
    at new Model (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:5804:6)
    at new ActionModel (http://localhost:5050/web/assets/490-44ec158/web.assets_backend.min.js:4460:1)

 I've attempted creating new databases, but the the problem persists, and it consistently arises after installing a custom module. Importantly, this module is unrelated to the POS module, and it does not contain any JavaScript code.
Any insights into what might be causing this problem would be greatly appreciated.


Thank you in advance for your assistance!

0
Аватар
Відмінити
Аватар
Hendra Ekky Saputra
Найкраща відповідь

Hi kahina, 

Recently i got this error too, and then after i digg in into the error i try to disable and make an if else condition to solve this error 

File that I was i editing was
odoo15\addons\web\static\src\legacy\js\control_panel\control_panel_model_extension.js

on the  _extractAttributes you can add if else condition, and console.log to check the output and heres the final code :

_extractAttributes(filter, attrs) {

            console.log("Extracting attributes:", attrs);  // Debugging attrs

            console.log("Filter object before processing:", filter);

            if (!attrs) {

                console.error("Missing or undefined attrs:", attrs);

                return;

            }

            if (!filter) {

                console.error("Missing or undefined filter:", filter);

                return;

            }

            if (attrs.isDefault) {

                filter.isDefault = attrs.isDefault;

            }

            filter.description = attrs.string || attrs.help || attrs.name || attrs.domain || 'Ω';

            switch (filter.type) {

                case 'filter':

                    if (attrs.context) {

                        filter.context = attrs.context;

                    }

                    if (attrs.date) {

                        filter.isDateFilter = true;

                        filter.hasOptions = true;

                        filter.fieldName = attrs.date;

                        // Cek apakah field ada sebelum mengakses 'type'

                        const field = this.fields[attrs.date];

                        if (field) {

                            filter.fieldType = field.type;

                        } else {

                            console.error(`Field ${attrs.date} not found in this.fields!`);

                            filter.fieldType = 'default'; // Set default fieldType jika tidak ditemukan

                        }

                        filter.defaultOptionId = attrs.default_period || DEFAULT_PERIOD;

                    } else {

                        filter.domain = attrs.domain || '[]';

                    }

                    if (filter.isDefault) {

                        filter.defaultRank = -5;

                    }

                    break;

                case 'groupBy':

                    filter.fieldName = attrs.fieldName;

                    // Cek apakah field ada sebelum mengakses 'type'

                    const groupField = this.fields[attrs.fieldName];

                    if (groupField) {

                        filter.fieldType = groupField.type;

                    } else {

                        console.error(`Field ${attrs.fieldName} not found in this.fields!`);

                        filter.fieldType = 'default';

                    }

                    if (['date', 'datetime'].includes(filter.fieldType)) {

                        filter.hasOptions = true;

                        filter.defaultOptionId = attrs.defaultInterval || DEFAULT_INTERVAL;

                    }

                    if (filter.isDefault) {

                        filter.defaultRank = attrs.defaultRank;

                    }

                    break;

                case 'field': {

                    const field = this.fields[attrs.name];

                    if (field) {

                        filter.fieldName = attrs.name;

                        filter.fieldType = field.type;

                    } else {

                        console.error(`Field ${attrs.name} not found in this.fields!`);

                        filter.fieldType = 'default';

                    }

                    if (attrs.domain) {

                        filter.domain = attrs.domain;

                    }

                    if (attrs.filter_domain) {

                        filter.filterDomain = attrs.filter_domain;

                    } else if (attrs.operator) {

                        filter.operator = attrs.operator;

                    }

                    if (attrs.context) {

                        filter.context = attrs.context;

                    }

                    if (filter.isDefault) {

                        let operator = filter.operator;

                        if (!operator) {

                            const type = attrs.widget || filter.fieldType;

                            if (["char", "html", "many2many", "one2many", "text"].includes(type)) {

                                operator = "ilike";

                            } else {

                                operator = "=";

                            }

                        }

                        filter.defaultRank = -10;

                        filter.defaultAutocompleteValue = {

                            operator,

                            value: attrs.defaultValue,

                        };

                    }

                    break;

                }

            }

            if (filter.fieldName && !attrs.string) {

                const field = this.fields[filter.fieldName];

                if (field) {

                    filter.description = field.string;

                } else {

                    console.error(`Field ${filter.fieldName} not found in this.fields for description!`);

                    filter.description = 'Ω';

                }

            }

        }

 

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

Hi,

Maybe you have found a solution. But it may help someone.

I suggest you look at the current user's access rights. For example, I somehow used Project Stages on the window, which I tried to view but showed this error. So I enabled 'Use Stages on Project' for the logged-in user. After that, the error is gone.

0
Аватар
Відмінити
Аватар
Jort de Vreeze
Найкраща відповідь

What you can do to find out what is causing the problem, is go to 'Settings' and 'Activate the developer mode (with assets)'. If you now reload you page you can see in the console where the error occurs and in which file, e.g.:

This might be helpful to find out to find out more about this error. I hope this helps!

0
Аватар
Відмінити
Kahina
Автор

The error message points to a problem in the file "/web/static/src/legacy/js/control_panel/control_panel_model_extension.js," specifically in the following line of code:
filter.fieldType = field.type;
The error message doesn't provide enough information for me to pinpoint the exact cause of the problem.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Реєстрація
Related Posts Відповіді Переглядів Дія
Issue Migrating bus_service Notification Handling from Odoo 17 to Odoo 18 (OWL-based POS)
pos js
Аватар
0
квіт. 25
2862
Uncaught Promise > Cannot read properties of undefined (reading 'tag')
js v15
Аватар
Аватар
1
бер. 25
5077
Error in replace div in custom receipt
pos v15
Аватар
Аватар
1
лип. 24
3799
How i can modify JS method in POS? Вирішено
pos js
Аватар
1
вер. 23
8404
[Odoo15ce] Error admin page. JS missing dependencies
js v15
Аватар
0
лют. 23
3221
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now