use main product to create GI
parent
fd63be1777
commit
f689ffbbd8
|
@ -60,7 +60,7 @@
|
|||
<field name="who_transplantation"/>
|
||||
<field name="reason_of_chronic_renal_failure"/>
|
||||
</tab>
|
||||
<tab string="Cycles">
|
||||
<tab string="Cycle Setting">
|
||||
<group span="8" columns="1">
|
||||
<field name="cycles" nolabel="1">
|
||||
<list>
|
||||
|
|
|
@ -13,8 +13,10 @@
|
|||
<field name="company_id" invisible="1"/>
|
||||
</tab>
|
||||
<tab string="Other">
|
||||
<field name="color"/>
|
||||
<field name="hct_include"/>
|
||||
<field name="main_product"/>
|
||||
<field name="color"/>
|
||||
<newline/>
|
||||
<group span="6" columns="1">
|
||||
<template>
|
||||
<div>
|
||||
|
|
|
@ -614,7 +614,6 @@ class HDCase(Model):
|
|||
if not ship_address_id:
|
||||
patient.simple_address()
|
||||
#raise Exception("contact %s dont'have address with type shipping"%partner.name)
|
||||
|
||||
# default journal
|
||||
cust_loc_id=None
|
||||
wh_loc_id=None
|
||||
|
@ -627,7 +626,6 @@ class HDCase(Model):
|
|||
wh_loc_id=stock_journal.location_from_id.id
|
||||
cust_loc_id=stock_journal.location_to_id.id
|
||||
print("get location from stock journal %s "%(stock_journal.name))
|
||||
|
||||
pick_vals={
|
||||
"type": "out",
|
||||
'journal_id': stock_journal.id,
|
||||
|
@ -661,6 +659,7 @@ class HDCase(Model):
|
|||
continue
|
||||
# check orginal product
|
||||
prod_code=prod.code.split("-")[0]
|
||||
if patient.type_id.main_product:
|
||||
if len(prod_code)>1:
|
||||
prods=get_model('product').search_browse(['code','=',prod_code])
|
||||
if not prods:
|
||||
|
|
|
@ -199,7 +199,8 @@ class Patient(Model):
|
|||
return res['department_ids']
|
||||
else:
|
||||
return [res['department_id']]
|
||||
return get_model("clinic.department").search([])
|
||||
dpts=get_model("clinic.department").search([])
|
||||
return dpts
|
||||
|
||||
def _get_department(self,context={}):
|
||||
res=get_model('select.company').get_select()
|
||||
|
|
|
@ -12,6 +12,7 @@ class PatientType(Model):
|
|||
'contact_id': fields.Many2One("partner","Contact",domain=[['type','=','org']],search=True),
|
||||
'default': fields.Boolean("Default"),
|
||||
'hct_include': fields.Boolean("HCT Include"),
|
||||
'main_product': fields.Boolean("Use Main Product for Create GI"),
|
||||
'company_id': fields.Many2One("company","Company"),
|
||||
'color': fields.Char("Color"),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue