xxx
parent
0ee5de47de
commit
400c56e2cf
|
@ -12,7 +12,7 @@
|
||||||
<field name="first_name" required="1"/>
|
<field name="first_name" required="1"/>
|
||||||
<field name="last_name" required="1"/>
|
<field name="last_name" required="1"/>
|
||||||
<field name="name_eng"/>
|
<field name="name_eng"/>
|
||||||
<field name="name"/>
|
<!--<field name="name"/>-->
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab string="General">
|
<tab string="General">
|
||||||
|
|
|
@ -106,13 +106,20 @@ class ClinicSetting(Model):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def run_script(self,ids,context={}):
|
def run_script(self,ids,context={}):
|
||||||
|
user_id=get_active_user()
|
||||||
|
if user_id !=1:
|
||||||
|
print("Only admin!!")
|
||||||
|
return
|
||||||
|
print("Done!")
|
||||||
|
|
||||||
|
def update_name(self,ids,context={}):
|
||||||
user_id=get_active_user()
|
user_id=get_active_user()
|
||||||
if user_id !=1:
|
if user_id !=1:
|
||||||
print("Only admin!!")
|
print("Only admin!!")
|
||||||
return
|
return
|
||||||
titles=dict([(t.name, t.id) for t in get_model("clinic.name.title").search_browse([])])
|
titles=dict([(t.name, t.id) for t in get_model("clinic.name.title").search_browse([])])
|
||||||
title_id=None
|
title_id=None
|
||||||
gtile_id=title_id
|
gtitle_id=title_id
|
||||||
for name, tid in titles.items():
|
for name, tid in titles.items():
|
||||||
if name=='No Title':
|
if name=='No Title':
|
||||||
gtitle_id=tid
|
gtitle_id=tid
|
||||||
|
@ -230,6 +237,9 @@ class ClinicSetting(Model):
|
||||||
'last_name': names[1],
|
'last_name': names[1],
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
|
vals.update({
|
||||||
|
'first_name':name,
|
||||||
|
})
|
||||||
print(name)
|
print(name)
|
||||||
st.write(vals)
|
st.write(vals)
|
||||||
if not st.gender:
|
if not st.gender:
|
||||||
|
|
Loading…
Reference in New Issue