conv_bal
watcha.h 2015-02-25 16:47:20 +07:00
parent 0ee5de47de
commit 400c56e2cf
2 changed files with 12 additions and 2 deletions

View File

@ -12,7 +12,7 @@
<field name="first_name" required="1"/>
<field name="last_name" required="1"/>
<field name="name_eng"/>
<field name="name"/>
<!--<field name="name"/>-->
<field name="company_id" invisible="1"/>
<tabs>
<tab string="General">

View File

@ -106,13 +106,20 @@ class ClinicSetting(Model):
return True
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()
if user_id !=1:
print("Only admin!!")
return
titles=dict([(t.name, t.id) for t in get_model("clinic.name.title").search_browse([])])
title_id=None
gtile_id=title_id
gtitle_id=title_id
for name, tid in titles.items():
if name=='No Title':
gtitle_id=tid
@ -230,6 +237,9 @@ class ClinicSetting(Model):
'last_name': names[1],
})
else:
vals.update({
'first_name':name,
})
print(name)
st.write(vals)
if not st.gender: