list hd case in dialyzer

conv_bal
watcha.h 2014-10-26 07:15:13 +07:00
parent 18bf6dcf86
commit fae65fe0fc
8 changed files with 13 additions and 9 deletions

View File

@ -28,5 +28,6 @@
</foot>
<related>
<field name="pickings" click_action="view_picking"/>
<field name="hd_cases" readonly="1"/>
</related>
</form>

View File

@ -15,6 +15,7 @@
<field name="expiry_card"/>
<field name="birthday"/>
<field name="department_id"/>
<field name="categ_id"/>
</group>
<group span="6" columns="1">
<field name="picture"/>

View File

@ -9,6 +9,7 @@ class Dialyzer(Model):
_audit_log=True
_name_field="number"
_multi_company=True
_fields={
"number": fields.Char("Number",required=True,search=True),
"description": fields.Text("Description",search=True),
@ -28,6 +29,7 @@ class Dialyzer(Model):
"patient_id": fields.Many2One("clinic.patient","Patient"),
"visit_id": fields.Many2One("clinic.visit","Visit"),
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case"),
"hd_cases": fields.One2Many("clinic.hd.case","dlz_id","HD Case"), #TODO funtion to get hd case
}
def _get_number(self,context={}):

View File

@ -72,6 +72,7 @@ class HDCase(Model):
'pay_date': fields.Date("Pay Date"),
'pay_account_id': fields.Many2One("account.account","Account"),
'payment_id': fields.Many2One("account.payment","Payment"), # for print
'dlz_id': fields.Many2One("clinic.dialyzer","Dialyzer"), # for link
}
def _get_number(self,context={}):
@ -134,6 +135,7 @@ class HDCase(Model):
line["bid_flow_rate"]=dialyzer.bid_flow_rate
line["ultrafittration"]=dialyzer.ultrafittration
line["state"]=dialyzer.state
data['dlz_id']=dialyzer.id
return data
def onchange_patient(self,context={}):

View File

@ -10,7 +10,7 @@ class Hdcaseline(Model):
"uom_id": fields.Many2One("uom","UOM",required=True,search=True),
"price":fields.Float("Price"),
"amount":fields.Float("Amount"),
"type": fields.Selection([("fee","Fee"),("other","Other")],"Type",required=True),
"type": fields.Selection([("fee","Fee"),("other","Other"),("service","Service")],"Type",required=True),
}
_defaults={

View File

@ -44,6 +44,7 @@ class Nurse(Model):
"user_id": fields.Many2One("base.user","User"),
'picture': fields.File("Picture"),
'note': fields.Text("Note"),
'categ_id': fields.Many2One("product.categ","Category"),
}
def _get_number(self,context={}):

View File

@ -90,9 +90,6 @@ class Visit(Model):
}
_order="id desc"
def get_dialyzer(self):
return
def confirm(self,ids,context={}):
obj=self.browse(ids[0])
number=obj.number
@ -119,7 +116,9 @@ class Visit(Model):
'dialyzers': [],
'state': 'draft',
}
# search dialyzer and count automatically
# search Nurse with category
products=get_model("product").search_browse([['code','=','FEE']])
for product in products:
vals['lines'].append(('create',{

View File

@ -1,7 +1,5 @@
===
- skip holiday
-> mum
-
====
find dialyzer automatic after confirm visit
====
- import data
- payment