improve
parent
9ab16318ad
commit
ee291c7e87
|
@ -1,6 +1,6 @@
|
|||
<record model="action">
|
||||
<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="active_id">1</field>
|
||||
<field name="view_xml">clinic_account_setting</field>
|
||||
|
|
|
@ -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>
|
|
@ -4,7 +4,7 @@
|
|||
<button string="Print" dropdown="1" icon="print">
|
||||
<item string="Match" method="print_match"/>
|
||||
<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 string="Options" dropdown="1">
|
||||
<item string="Update Identification" method="update_id"/>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
</head>
|
||||
<field name="number"/>
|
||||
<field name="trt_no"/>
|
||||
<!--<field name="name"/>-->
|
||||
<field name="title_id" required="1"/>
|
||||
<field name="card_no" required="1"/>
|
||||
<field name="type_id"/>
|
||||
<field name="title_id" required="1"/>
|
||||
<field name="first_name" required="1"/>
|
||||
<field name="last_name" required="1"/>
|
||||
<field name="reg_date"/>
|
||||
|
@ -25,7 +25,6 @@
|
|||
<field name="gender"/>
|
||||
<field name="marital_status"/>
|
||||
<field name="card_type"/>
|
||||
<field name="card_no"/>
|
||||
<field name="card_exp"/>
|
||||
<field name="birthday"/>
|
||||
<field name="age"/>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
</tab>
|
||||
<tab string="RD Shop">
|
||||
<field name="shop_type_id"/>
|
||||
<field name="signature"/>
|
||||
</tab>
|
||||
<tab string="Development">
|
||||
<button string="Click Me" type="default" method="run_script" perm="clinic_setting_test"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<form model="clinic.shop" attrs='{"readonly":[["state","in",["cancelled","paid","waiting_payment"]]]}' show_company="1">
|
||||
<head>
|
||||
<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">
|
||||
<item string="To Draft" method="to_draft" states="paid"/>
|
||||
</button>
|
||||
|
|
|
@ -515,6 +515,17 @@ class MatchingPayment(Model):
|
|||
self.function_store(ids)
|
||||
|
||||
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={}
|
||||
return data
|
||||
|
||||
|
|
|
@ -64,20 +64,6 @@ class Patient(Model):
|
|||
}
|
||||
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={
|
||||
"number": fields.Char("HN Number",required=True,search=True),
|
||||
"trt_no": fields.Char("TRT",search=True),
|
||||
|
@ -100,7 +86,7 @@ class Patient(Model):
|
|||
"weight": fields.Float("Weight (kg.)"),
|
||||
"height": fields.Float("Height (cm.)"),
|
||||
"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."),
|
||||
"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"),
|
||||
|
|
|
@ -9,7 +9,7 @@ class ClinicSetting(Model):
|
|||
|
||||
_fields={
|
||||
"var_k": fields.Float("K"),
|
||||
'file': fields.File("File"),
|
||||
'signature': fields.File("Signature"),
|
||||
'levels': fields.One2Many("clinic.setting.level","setting_id","Levels"),
|
||||
'products': fields.One2Many("clinic.setting.product","setting_id","Products"),
|
||||
'account_products': fields.One2Many("clinic.setting.account.product","setting_id","Account Products"),
|
||||
|
|
|
@ -490,6 +490,7 @@ class Shop(Model):
|
|||
comp_id=get_active_company()
|
||||
comp=get_model('company').browse(comp_id)
|
||||
st=get_model('settings').browse(1)
|
||||
cst=get_model('clinic.setting').browse(1)
|
||||
addresses=st.addresses
|
||||
comp_addr=''
|
||||
if addresses:
|
||||
|
@ -533,6 +534,8 @@ class Shop(Model):
|
|||
'number': shop.number or '',
|
||||
'ref': shop.ref,
|
||||
'date': shop.date,
|
||||
'datenow': time.strftime("%d/%m/%Y"),
|
||||
'dateprint': time.strftime("%d/%m/%Y %H:%M:%S"),
|
||||
'cust_name': cust_name,
|
||||
'cust_addr': cust_addr,
|
||||
'note': shop.note or '',
|
||||
|
@ -557,7 +560,8 @@ class Shop(Model):
|
|||
data['pay_type']='Credit'
|
||||
if st.logo:
|
||||
data['logo']=get_file_path(st.logo)
|
||||
|
||||
if cst.signature:
|
||||
data['signature']=get_file_path(cst.signature)
|
||||
return data
|
||||
|
||||
def get_data(self,ids,context={}):
|
||||
|
|
|
@ -282,7 +282,7 @@ class Staff(Model):
|
|||
partner_id=get_model("clinic.staff").check_contact(name)
|
||||
address_id=None
|
||||
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)
|
||||
self.function_store(ids)
|
||||
if address_id:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue