Dear Cedric,

On Sun, Jan 22, 2017 at 3:08 PM, Cédric Krier <cedric.kr...@b2ck.com> wrote:

> On 2017-01-22 12:26, Khurram Shahzad wrote:
> > Dear all,
> >
> > At our hospital, doctors prescribe medication for admitted patients which
> > is stored as:
> >
> > patient-id, medicine-name
> >
> > This is stored in a model patient-medication.
> >
> > Our nursing department wants to have a form for 'Ordering medicine', when
> > the open this form they want an already populated list containing:
> >
> > patient-id, medicine-name, qty_to_order
> >
> > These lines should be populated using the patient-medication table and
> > 'qty_to_order' field is provided to user for entering how much quantity
> is
> > to be ordered. They should also be able to add/remove rows from the list.
> >
> > For this, I have written following code:
> >
> >  medications = fields.One2Many('gnuhealth.inpatient.medication',
> > 'name','Medications',[('admission_no.state','=','hospitalized')])
> >
> >  But, I am unable to add 'qty_to_order' field and make it editable
>
> With such design, you have to extend the model
> 'gnuhealth.inpatient.medication' to add the field qty_to_order. I do not
> know if it makes sense at all.
>
> --
>
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.

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.

-- 

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/CAM3N3Cyupzj6ryS5HJN4ko8-1xVLyP8i3epprBH1%2BE%3Ddf_FKwg%40mail.gmail.com.

Reply via email to