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> </foot>
<related> <related>
<field name="pickings" click_action="view_picking"/> <field name="pickings" click_action="view_picking"/>
<field name="hd_cases" readonly="1"/>
</related> </related>
</form> </form>

View File

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

View File

@ -9,6 +9,7 @@ class Dialyzer(Model):
_audit_log=True _audit_log=True
_name_field="number" _name_field="number"
_multi_company=True _multi_company=True
_fields={ _fields={
"number": fields.Char("Number",required=True,search=True), "number": fields.Char("Number",required=True,search=True),
"description": fields.Text("Description",search=True), "description": fields.Text("Description",search=True),
@ -28,6 +29,7 @@ class Dialyzer(Model):
"patient_id": fields.Many2One("clinic.patient","Patient"), "patient_id": fields.Many2One("clinic.patient","Patient"),
"visit_id": fields.Many2One("clinic.visit","Visit"), "visit_id": fields.Many2One("clinic.visit","Visit"),
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case"), "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={}): def _get_number(self,context={}):

View File

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

View File

@ -10,7 +10,7 @@ class Hdcaseline(Model):
"uom_id": fields.Many2One("uom","UOM",required=True,search=True), "uom_id": fields.Many2One("uom","UOM",required=True,search=True),
"price":fields.Float("Price"), "price":fields.Float("Price"),
"amount":fields.Float("Amount"), "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={ _defaults={

View File

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

View File

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

View File

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