print invoice and payment on hd_case
parent
4fe5529c83
commit
612ebede92
|
@ -350,9 +350,6 @@ class AccountInvoice(Model):
|
|||
inv=self.browse(inv_id)
|
||||
comp_id=get_active_company()
|
||||
comp=get_model('company').browse(comp_id)
|
||||
context['branch_id']=inv.department_id.branch_id.id
|
||||
st=get_model('settings').browse(1,context=context)
|
||||
cst=get_model('clinic.setting').browse(1)
|
||||
cust=inv.partner_id
|
||||
cust_tax_no=cust.tax_no or ''
|
||||
cust_name=cust.name or ''
|
||||
|
@ -361,6 +358,17 @@ class AccountInvoice(Model):
|
|||
cust_addr=cust.addresses[0].address_text
|
||||
if 'your' in cust_addr:
|
||||
cust_addr=''
|
||||
dpt=inv.department_id
|
||||
branch_id=None
|
||||
if dpt:
|
||||
branch_id=dpt.branch_id.id
|
||||
elif inv.patient_partner_id:
|
||||
for pt in get_model('clinic.patient').search_read([['partner_id','=',inv.patient_partner_id.id]],['branch_id']):
|
||||
if pt.get("branch_id"):
|
||||
branch_id=pt['branch_id'][0]
|
||||
context['branch_id']=branch_id
|
||||
st=get_model('settings').browse(1,context=context)
|
||||
cst=get_model('clinic.setting').browse(1)
|
||||
no=1
|
||||
sub_total=0
|
||||
amount_total=0
|
||||
|
|
|
@ -45,6 +45,7 @@ class AccountPayment(Model):
|
|||
'name': 'report_clinic_payment_form',
|
||||
'refer_id': hd_case_id,
|
||||
'payment_id': obj.id,
|
||||
'convert': 'pdf',
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1245,7 +1245,7 @@ class HDCase(Model):
|
|||
for payment in obj.payments:
|
||||
context['payment_id']=payment.id
|
||||
data=self.get_report_payment_data(context=context)
|
||||
limit_item=10
|
||||
limit_item=9
|
||||
if data['state']=='draft':
|
||||
limit_item=10
|
||||
for i in range(len(data['lines']),limit_item):
|
||||
|
|
Loading…
Reference in New Issue