diff --git a/netforce_clinic/actions/clinic_account_setting.xml b/netforce_clinic/actions/clinic_account_setting.xml index b643066..d979908 100644 --- a/netforce_clinic/actions/clinic_account_setting.xml +++ b/netforce_clinic/actions/clinic_account_setting.xml @@ -1,6 +1,6 @@ clinic_account_setting - form_view + form_view clinic.setting 1 clinic_account_setting diff --git a/netforce_clinic/actions/clinic_matching_payment_unmatch_invoice.xml b/netforce_clinic/actions/clinic_matching_payment_unmatch_invoice.xml new file mode 100644 index 0000000..d0fbbde --- /dev/null +++ b/netforce_clinic/actions/clinic_matching_payment_unmatch_invoice.xml @@ -0,0 +1,6 @@ + + report_xls + clinic.matching.payment + get_data + matching_payment_invoice_unmatch + diff --git a/netforce_clinic/layouts/clinic_matching_payment_form.xml b/netforce_clinic/layouts/clinic_matching_payment_form.xml index c118043..cb6f5b6 100644 --- a/netforce_clinic/layouts/clinic_matching_payment_form.xml +++ b/netforce_clinic/layouts/clinic_matching_payment_form.xml @@ -4,7 +4,7 @@ diff --git a/netforce_clinic/models/matching_payment.py b/netforce_clinic/models/matching_payment.py index 644c886..fc58422 100644 --- a/netforce_clinic/models/matching_payment.py +++ b/netforce_clinic/models/matching_payment.py @@ -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 diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py index fa17834..cbfd24d 100644 --- a/netforce_clinic/models/patient.py +++ b/netforce_clinic/models/patient.py @@ -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"), diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index 8820633..bf0c8e8 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -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"), diff --git a/netforce_clinic/models/shop.py b/netforce_clinic/models/shop.py index 45607a5..1fd5f27 100644 --- a/netforce_clinic/models/shop.py +++ b/netforce_clinic/models/shop.py @@ -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={}): diff --git a/netforce_clinic/models/staff.py b/netforce_clinic/models/staff.py index bc7e4d7..c8ee832 100644 --- a/netforce_clinic/models/staff.py +++ b/netforce_clinic/models/staff.py @@ -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: diff --git a/netforce_clinic/reports/cust_payment.odt b/netforce_clinic/reports/cust_payment.odt index 70f9b65..09241e5 100644 Binary files a/netforce_clinic/reports/cust_payment.odt and b/netforce_clinic/reports/cust_payment.odt differ diff --git a/netforce_clinic/reports/matching_payment_invoice_unmatch.xlsx b/netforce_clinic/reports/matching_payment_invoice_unmatch.xlsx new file mode 100644 index 0000000..dfd255c Binary files /dev/null and b/netforce_clinic/reports/matching_payment_invoice_unmatch.xlsx differ