Create new/custom window-actions, custom menu items: dominion, context model in window-actions


Good morning.

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?

Kind regards,

(Fares Younis) #2

Which version of trytond are you using ?


4.2.9, to be Gnuhealth Compliant… :slight_smile:

By the way, we only use Tryton desktop Client for configuration, administration… SAO will be the interface for every user but the administrator.


(Cédric Krier) #4

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.


Most users will be using SAO… We avoid installing desktop clients as far we can…

(Cédric Krier) #6

So it will be better to implement this feature in the web client than recreate similar flow case by case.

(Cédric Krier) #7

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.