conv_bal
watcha.h@almacom.co.th 2015-01-23 16:41:12 +07:00
parent d84c9ca9f8
commit 098b077c86
7 changed files with 28 additions and 39 deletions

View File

@ -3,9 +3,9 @@
<field name="date" span="2" mode="month" onchange="onchange_date"/> <field name="date" span="2" mode="month" onchange="onchange_date"/>
<field name="date_from" span="2"/> <field name="date_from" span="2"/>
<field name="date_to" span="2"/> <field name="date_to" span="2"/>
<field name="department_id" span="2"/>
<field name="branch_id" span="2"/>
<field name="cycle_id" span="2"/> <field name="cycle_id" span="2"/>
<field name="branch_id" span="2"/>
<field name="department_id" domain='[["branch_id","=",branch_id]]' span="2"/>
<field name="lines" nolabel="1"> <field name="lines" nolabel="1">
<list> <list>
<field name="patient_id"/> <field name="patient_id"/>

View File

@ -116,9 +116,9 @@
</tabs> </tabs>
<related> <related>
<field name="addresses"/> <field name="addresses"/>
<field name="visits"/> <field name="visits" readonly="1"/>
<field name="hd_cases"/> <field name="hd_cases" readonly="1"/>
<field name="dialyzers"/> <field name="dialyzers" readonly="1"/>
<field name="documents"/> <field name="documents"/>
<field name="comments"/> <field name="comments"/>
</related> </related>

View File

@ -64,7 +64,7 @@
<field name="note"/> <field name="note"/>
</list> </list>
</field> </field>
<field name="hd_case_staffs" attrs='{"invisible":[["type","=","nurse"]]}'> <field name="hd_case_staffs" readonly="1" attrs='{"invisible":[["type","=","nurse"]]}'>
<list colors='{"#cfc":[["state","=","completed"]],"#f9e37d":[["state","=","in_progress"]],"#bcbbb9":[["state","=","cancelled"]],"#ACD1E9":[["state","=","waiting_payment"]],"#70DB93":[["state","=","paid"]]}'> <list colors='{"#cfc":[["state","=","completed"]],"#f9e37d":[["state","=","in_progress"]],"#bcbbb9":[["state","=","cancelled"]],"#ACD1E9":[["state","=","waiting_payment"]],"#70DB93":[["state","=","paid"]]}'>
<field name="hd_case_id"/> <field name="hd_case_id"/>
<field name="date"/> <field name="date"/>
@ -79,7 +79,7 @@
<field name="hd_case_id"/> <field name="hd_case_id"/>
</form> </form>
</field> </field>
<field name="cycle_item_nurses" attrs='{"invisible":[["type","=","doctor"]]}'> <field name="cycle_item_nurses" readonly="1" attrs='{"invisible":[["type","=","doctor"]]}'>
<list> <list>
<field name="cycle_item_id"/> <field name="cycle_item_id"/>
</list> </list>
@ -87,7 +87,7 @@
<field name="cycle_item_id"/> <field name="cycle_item_id"/>
</form> </form>
</field> </field>
<field name="patients"/> <field name="patients" readonly="1"/>
<field name="comments"/> <field name="comments"/>
</related> </related>
</form> </form>

View File

@ -79,32 +79,13 @@ class CycleItemCopy(Model):
for line in item.lines: for line in item.lines:
line.delete() line.delete()
lines=[] lines=[]
if obj.choice=='item': for line in obj.lines:
for line in obj.item_copy_id.lines: nr=line.nurse_id
nr=line.nurse_id lines.append(('create', {
lines.append(('create', { 'nurse_id': nr.id,
'nurse_id': nr.id, 'level_id': nr.level_id.id,
'level_id': nr.level_id.id, 'state': nr.state,
'state': nr.state, }))
}))
elif obj.choice=='schd':
for line in obj.schd_copy_id.lines:
nr=line.nurse_id
cycle=line.cycle_id
if item.cycle_id.id==cycle.id:
lines.append(('create', {
'nurse_id': nr.id,
'level_id': nr.level_id.id,
'state': nr.state,
}))
else:
for line in obj.lines:
nr=line.nurse_id
lines.append(('create', {
'nurse_id': nr.id,
'level_id': nr.level_id.id,
'state': nr.state,
}))
item.write({ item.write({
'lines': lines, 'lines': lines,
}) })

View File

@ -55,8 +55,8 @@ class Patient(Model):
"age": fields.Integer("Age", function="_get_age"), "age": fields.Integer("Age", function="_get_age"),
'image': fields.File("Image"), 'image': fields.File("Image"),
'email': fields.Char("Email"), 'email': fields.Char("Email"),
"weight": fields.Float("Weight (cm)"), "weight": fields.Float("Weight (kg.)"),
"height": fields.Float("Height (Kg)"), "height": fields.Float("Height (cm.)"),
"card_type": fields.Selection([("identification","Identification"),("passport","Passport")],"Card Type"), "card_type": fields.Selection([("identification","Identification"),("passport","Passport")],"Card Type"),
'card_no' : fields.Char("Card Number"), 'card_no' : fields.Char("Card Number"),
'card_exp' : fields.Date("Card Expire"), 'card_exp' : fields.Date("Card Expire"),

View File

@ -266,7 +266,7 @@ class Visit(Model):
['department_id','=',department.id], ['department_id','=',department.id],
['cycle_id','=',cycle.id], ['cycle_id','=',cycle.id],
] ]
for item2 in get_model("clinic.cycle.item").search_browse([]): for item2 in get_model("clinic.cycle.item").search_browse(dom):
lines=[] lines=[]
for line in item2.lines: for line in item2.lines:
nr=line.nurse_id nr=line.nurse_id

View File

@ -1,4 +1,12 @@
todo: todo:
- filter product by
1. company
2. category
3. code
- cycle item
- copy nurse only in the list
- problem after confirm visit
- import hd case *** - import hd case ***
- add script - add script
- report - report
@ -7,9 +15,9 @@ todo:
- working status - working status
- matching payment *** - matching payment ***
- popup messagging -> Ask DJ
- modify message of log -> Ask DJ
- show image of staff -> - show image of staff ->
- popup messagging -> Ask DK -> ok
- modify message of log -> Ask DJ -> ok
- copy old nurse from previous cycle item -> ok - copy old nurse from previous cycle item -> ok
- multi confirm on visit board **** -> ok - multi confirm on visit board **** -> ok
======= =======