It's okay it's working but when i edit the Ticket, in the tab PhysicalDevices list, when i clic on the button " ADD PHYSICAL DEVICE OBJECTS" it's open a popin.
But i've all phisical device, and i want to have a default filtering on the location_id (that i've in physicial device and in the class MyTicket).
If anyone know how do that, i would like to know how.
Thanks
Guillaume F
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How do you get the location $this->Get('location'), then it should be up to date when you try to add a PhysicalCI, or maybe you need to set of your attribute "physicalDevices_list" a dependency on field "location_id", this might help.
But changing the location won't remove already linked CI even if they are not compliant to your search criteria. If you want to prevent this, you will need to overwrite DoCheckToWrite
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello i've made some classes for ticketing management, like we want to do it.
So i've made class MyUserRequest with a field describe like that:
I've create the class lnkPhysicalDeviceToMyTicket describe like that:
It's okay it's working but when i edit the Ticket, in the tab PhysicalDevices list, when i clic on the button " ADD PHYSICAL DEVICE OBJECTS" it's open a popin.
But i've all phisical device, and i want to have a default filtering on the location_id (that i've in physicial device and in the class MyTicket).
If anyone know how do that, i would like to know how.
Thanks
Guillaume F
Hi Guillaume,
This can be done through a method
Thanks for your answer but i have try it without success, so i wich class i have to put the prefill search form method?
You mentioned MyUserRequest
Thanks it's work.
But just one thing, when i change the location how to get the new location when i go to the physicaldevice tab, without saving between?
How do you get the location $this->Get('location'), then it should be up to date when you try to add a PhysicalCI, or maybe you need to set of your attribute "physicalDevices_list" a dependency on field "location_id", this might help.
But changing the location won't remove already linked CI even if they are not compliant to your search criteria. If you want to prevent this, you will need to overwrite DoCheckToWrite
Hello,
Thanks for your answer, it's works very well.
I will use DoCheckToWrite to remove linked PhysicalDevice if the location have been changed.
I think you might want to use AfterUpdate() (or also AfterInsert() ) instead, since then it's actually a successful change already.