Dear Cedric,
On Tue, Jan 24, 2017 at 1:06 AM, Cédric Krier <[email protected]> wrote:

> On 2017-01-22 20:03, Khurram Shahzad wrote:
> > Even after adding the field qty_to_order (just for the sake or
> ordering), I
> > am unable to add the value of 'qty_to_order' without updating the
> original
> > patient-medication record.
>
> Of course if you use a One2Many, what is displayed is the records of the
> target model.
> But I'm not sure to understand the schema here.
> Is 'patient-medication' a different model than
> 'gnuhealth.inpatient.medication' ?
>

It is 'gnuhealth.inpatient.medication'!


>
> > I just want to have a grid which has copy (in-memory copy) of
> > patient-medication records (already in db) so that user can set the
> > qty_to_order and submit it. Against this submission, at back-end an
> > internal shipment request will be submitted to the Warehouse.
>
> Then you must use a different target for the One2Many and define a
> default value method for this field which must return a list of
> dictionary values.
>
>
I am sorry, I could not understand! If I use a model different than
'gnuhealth.inpatient.medication', how can I read values from db stored in
'gnuhealth_inpatient_medication' table? Similarly, I think I will lose
'add_remove' feature which allow easy selection from already prescribed
inpatient medication.
-- 

Regards,
Khurram.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CAM3N3Czek53p3FNANZOOOB79ENwXotpZQ35zaYPU1B%3DVt0V1mw%40mail.gmail.com.

Reply via email to