Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม 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:

  • ลูกค้าสัมพันธ์
  • 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 ตอบกลับ
17478 มุมมอง
อวตาร
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.

สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
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
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • 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 eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ 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