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