conv_bal
watcha.h 2015-02-27 10:48:57 +07:00
parent 9ab16318ad
commit ee291c7e87
13 changed files with 31 additions and 24 deletions

View File

@ -1,6 +1,6 @@
<record model="action"> <record model="action">
<field name="name">clinic_account_setting</field> <field name="name">clinic_account_setting</field>
<field name="view">form_view</field> <field name="view_cls">form_view</field>
<field name="model">clinic.setting</field> <field name="model">clinic.setting</field>
<field name="active_id">1</field> <field name="active_id">1</field>
<field name="view_xml">clinic_account_setting</field> <field name="view_xml">clinic_account_setting</field>

View File

@ -0,0 +1,6 @@
<action>
<field name="type">report_xls</field>
<field name="model">clinic.matching.payment</field>
<field name="method">get_data</field>
<field name="template">matching_payment_invoice_unmatch</field>
</action>

View File

@ -4,7 +4,7 @@
<button string="Print" dropdown="1" icon="print"> <button string="Print" dropdown="1" icon="print">
<item string="Match" method="print_match"/> <item string="Match" method="print_match"/>
<item string="Unmatch" method="print_unmatch"/> <item string="Unmatch" method="print_unmatch"/>
<item string="Invoice Unmatch" method="print_invoice_unmatch"/> <item string="Invoice Unmatch" action="clinic_matching_payment_unmatch_invoice"/>
</button> </button>
<button string="Options" dropdown="1"> <button string="Options" dropdown="1">
<item string="Update Identification" method="update_id"/> <item string="Update Identification" method="update_id"/>

View File

@ -9,9 +9,9 @@
</head> </head>
<field name="number"/> <field name="number"/>
<field name="trt_no"/> <field name="trt_no"/>
<!--<field name="name"/>--> <field name="card_no" required="1"/>
<field name="title_id" required="1"/>
<field name="type_id"/> <field name="type_id"/>
<field name="title_id" required="1"/>
<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="reg_date"/> <field name="reg_date"/>
@ -25,7 +25,6 @@
<field name="gender"/> <field name="gender"/>
<field name="marital_status"/> <field name="marital_status"/>
<field name="card_type"/> <field name="card_type"/>
<field name="card_no"/>
<field name="card_exp"/> <field name="card_exp"/>
<field name="birthday"/> <field name="birthday"/>
<field name="age"/> <field name="age"/>

View File

@ -26,6 +26,7 @@
</tab> </tab>
<tab string="RD Shop"> <tab string="RD Shop">
<field name="shop_type_id"/> <field name="shop_type_id"/>
<field name="signature"/>
</tab> </tab>
<tab string="Development"> <tab string="Development">
<button string="Click Me" type="default" method="run_script" perm="clinic_setting_test"/> <button string="Click Me" type="default" method="run_script" perm="clinic_setting_test"/>

View File

@ -1,7 +1,7 @@
<form model="clinic.shop" attrs='{"readonly":[["state","in",["cancelled","paid","waiting_payment"]]]}' show_company="1"> <form model="clinic.shop" attrs='{"readonly":[["state","in",["cancelled","paid","waiting_payment"]]]}' show_company="1">
<head> <head>
<field name="state"/> <field name="state"/>
<button string="Print" icon="print" method="print_bill" action_options="convert=pdf"/> <button string="Print" icon="print" method="print_bill"/>
<button string="Options" dropdown="1"> <button string="Options" dropdown="1">
<item string="To Draft" method="to_draft" states="paid"/> <item string="To Draft" method="to_draft" states="paid"/>
</button> </button>

View File

@ -515,6 +515,17 @@ class MatchingPayment(Model):
self.function_store(ids) self.function_store(ids)
def get_data(self,context={}): def get_data(self,context={}):
ref_id=int(context.get("refer_id","0"))
obj=self.browse(ref_id)
dom=[]
dom.append(['date','>=',obj.date_from])
dom.append(['date','<=',obj.date_to])
for invoice in get_model("account.invoice").search_browse(dom):
pass
match_ids=[]
for line in obj.lines:
pass
print("name ", obj.name)
data={} data={}
return data return data

View File

@ -64,20 +64,6 @@ class Patient(Model):
} }
return res return res
def _get_name_old(self,ids,context={}):
# remove all space for make sure
res={}
for obj in self.browse(ids):
name=(obj.name or "").replace(" ","")
if not obj.active:
name+='not_use'
elif context.get('active'):
name+='not_use'
res[obj.id]={
'name_check': name,
}
return res
_fields={ _fields={
"number": fields.Char("HN Number",required=True,search=True), "number": fields.Char("HN Number",required=True,search=True),
"trt_no": fields.Char("TRT",search=True), "trt_no": fields.Char("TRT",search=True),
@ -100,7 +86,7 @@ class Patient(Model):
"weight": fields.Float("Weight (kg.)"), "weight": fields.Float("Weight (kg.)"),
"height": fields.Float("Height (cm.)"), "height": fields.Float("Height (cm.)"),
"card_type": fields.Selection([("identification","Identification"),("passport","Passport")],"Card Type"), "card_type": fields.Selection([("identification","Identification"),("passport","Passport")],"Card Type"),
'card_no' : fields.Char("Card ID"), 'card_no' : fields.Char("ID Card",size=13),
'card_exp' : fields.Date("Card Exp."), 'card_exp' : fields.Date("Card Exp."),
"app_no": fields.Char("Application No."), "app_no": fields.Char("Application No."),
"salary": fields.Selection([["20000","5,001-20,000"],["50000","20,001-50,000"],["100000","50,001-100,000"],["100001","100,000+"]], "Salary"), "salary": fields.Selection([["20000","5,001-20,000"],["50000","20,001-50,000"],["100000","50,001-100,000"],["100001","100,000+"]], "Salary"),

View File

@ -9,7 +9,7 @@ class ClinicSetting(Model):
_fields={ _fields={
"var_k": fields.Float("K"), "var_k": fields.Float("K"),
'file': fields.File("File"), 'signature': fields.File("Signature"),
'levels': fields.One2Many("clinic.setting.level","setting_id","Levels"), 'levels': fields.One2Many("clinic.setting.level","setting_id","Levels"),
'products': fields.One2Many("clinic.setting.product","setting_id","Products"), 'products': fields.One2Many("clinic.setting.product","setting_id","Products"),
'account_products': fields.One2Many("clinic.setting.account.product","setting_id","Account Products"), 'account_products': fields.One2Many("clinic.setting.account.product","setting_id","Account Products"),

View File

@ -490,6 +490,7 @@ class Shop(Model):
comp_id=get_active_company() comp_id=get_active_company()
comp=get_model('company').browse(comp_id) comp=get_model('company').browse(comp_id)
st=get_model('settings').browse(1) st=get_model('settings').browse(1)
cst=get_model('clinic.setting').browse(1)
addresses=st.addresses addresses=st.addresses
comp_addr='' comp_addr=''
if addresses: if addresses:
@ -533,6 +534,8 @@ class Shop(Model):
'number': shop.number or '', 'number': shop.number or '',
'ref': shop.ref, 'ref': shop.ref,
'date': shop.date, 'date': shop.date,
'datenow': time.strftime("%d/%m/%Y"),
'dateprint': time.strftime("%d/%m/%Y %H:%M:%S"),
'cust_name': cust_name, 'cust_name': cust_name,
'cust_addr': cust_addr, 'cust_addr': cust_addr,
'note': shop.note or '', 'note': shop.note or '',
@ -557,7 +560,8 @@ class Shop(Model):
data['pay_type']='Credit' data['pay_type']='Credit'
if st.logo: if st.logo:
data['logo']=get_file_path(st.logo) data['logo']=get_file_path(st.logo)
if cst.signature:
data['signature']=get_file_path(cst.signature)
return data return data
def get_data(self,ids,context={}): def get_data(self,ids,context={}):

View File

@ -282,7 +282,7 @@ class Staff(Model):
partner_id=get_model("clinic.staff").check_contact(name) partner_id=get_model("clinic.staff").check_contact(name)
address_id=None address_id=None
if not partner_id: if not partner_id:
vals['partner_id'],address_id=self.create_contact(name) vals['partner_id'],address_id=self.create_contact(name,name) #XXX
super().write(ids,vals,**kw) super().write(ids,vals,**kw)
self.function_store(ids) self.function_store(ids)
if address_id: if address_id: