I’m really lost when i try to go a bit beyond the obvious in the creation of custom menu items for Gnuhealth. I can use Appointments an a saved search to make a prefiltered appointment list, or a list of inpatient records for building floor. It’s almost trivial.
But i don’t know how to use in window-actions the context, or select the appropiate models to make actions more sophisticated. A good example could be usin one appointment to select the patient and acces to the patient list with only that patient, and access to all the related actions for patient.
could anyone please, please share these knowledge with me?
By the way, we only use Tryton desktop Client for configuration, administration… SAO will be the interface for every user but the administrator.
Regards,
It should be use very rarely. Indeed it is more a legacy that we have replaced progressively with a smarter client (like domain inversion, on_change etc.)
An action can only be launch from a user selected record. If you need that the user select other records then you must probably write a wizard.
But with right-click on the patient many2one field should give you already all those actions.
In list view, it is possible to open a Many2One by clicking on the link which will allow to use the relates and actions from the toolbar.
It is on the form view that it is missing because the button on the widget opens the record in a popup which does not provide a toolbar. But we could maybe open the record in a new tab if the user click with CTRL pressed for example.