Revert "enhance"

This commit is contained in:
Mohamed Eltayar 2025-08-31 14:50:56 +03:00 committed by GitHub
parent 2555d718f6
commit 90126f353f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 6 deletions

View File

@ -399,15 +399,19 @@ odoo.define('fims_general_search_tree_view.list_search', function (require) {
return false;
}
// الفرق الحقيقي والواضح:
// فحص وجود this.action property
// الحل الدقيق الوحيد المؤكد:
// فحص الـ model state للـ ListRenderer
var controller = this.getParent();
if (controller && !controller.action) {
// إذا لم يوجد action، فهذا يعني embedded list view
return false;
if (controller && controller.model && controller.handle) {
var state = controller.model.get(controller.handle);
// إذا كان parentID موجود، فهذا يعني أن الـ list embedded داخل relational field
if (state && state.parentID) {
return false; // لا نظهر البحث للـ embedded lists
}
}
return true; // نظهر البحث للـ standalone lists فقط (التي تحتوي على action)
return true; // نظهر البحث للـ standalone lists فقط
},
_addCustomSearchBox: function() {