So i tried doing the regular method of importing the file, registering a patch and everything works well for new fields and record methods, however when i try to patch an existing method i get:
Uncaught Promise > Cannot patch field (moduleName)/(fieldName): unsupported field attribute "fieldType".
Code snippet:
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Hi, hust delete attr() if field already existed
isViewable: attr({ compute() {compute() {returnthis.isDocx || this.isXlsx || this._super(); }, }),
TO
isViewable: { compute() {returnthis.isDocx || this.isXlsx || this._super(); }, },
Hi
The error message suggests that the attribute "fieldType" is not
supported or recognized for that field. Make sure you are patching the
correct field with the correct name. A typo in the field name could lead
to this error. Ensure that you are using the correct module name
("moduleName") where the field resides. It's possible that the
"fieldType" attribute is not supported in the version of the library or
code you are using. Check for updates or consult the library's changelog
to see if this attribute was added in a later version.
You can refer to these blogs for patching; I hope it helps.
https://www.cybrosys.com/blog/how-to-patch-existing-owl-component-in-odoo-16
https://www.cybrosys.com/blog/how-to-extend-patch-existing-owl-component-in-odoo-15
https://www.cybrosys.com/blog/super-override-existing-functions-using-owl
i added a code snippet for you.
thank you for the help.
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ
Pls attach a screenshot or your code snippet