def test_xlsx(self): self.report_instance.export_xls() # get action test_reports.try_report(self.env.cr, self.env.uid, 'mis_builder.mis_report_instance_xlsx', [self.report_instance.id], report_type='xlsx')
def test_00_payment_advice_flow(self): # I create a new Payment Advice with NEFT Transaction Enable payment_advice = self.Advice.create({ 'name': 'NEFT Advice', 'bank_id': self.bank_1.id, 'line_ids': [(0, 0, { 'employee_id': self.employee_fp.id, 'name': '90125452552', 'ifsc_code': 'abn45215145', 'bysal': 25000.00, }), (0, 0, { 'employee_id': self.employee_al.id, 'name': '00014521111232', 'ifsc_code': 'sbi45452145', 'bysal': 20000.00, })], }) # I check that the Payment Advice is in "Draft" self.assertEqual(payment_advice.state, 'draft') # Now I confirm Payment Advice payment_advice.confirm_sheet() # I check that the Payment Advice state is "Confirmed" self.assertEqual(payment_advice.state, 'confirm') # In order to test the PDF report defined on a Payment Advice, we will print a Print Advice Report when NEFT is checked test_reports.try_report(self.cr, self.uid, 'l10n_in_hr_payroll.report_payrolladvice', payment_advice.ids)
def test_qweb(self): self.report_instance.print_pdf() # get action test_reports.try_report(self.env.cr, self.env.uid, 'mis_builder.report_mis_report_instance', [self.report_instance.id], report_type='qweb-pdf')
def test_xlsx(self): with enable_test_report_directory(): self.report_instance.export_xls() # get action test_reports.try_report(self.env.cr, self.env.uid, 'mis.report.instance.xlsx', [self.report_instance.id], report_type='xlsx')
def test_xlsx(self): test_reports.try_report( self.env.cr, self.env.uid, self.xlsx_report_name, [self.report.id], report_type="xlsx", )
def test_qweb(self): test_reports.try_report( self.env.cr, self.env.uid, self.qweb_report_name, [self.report.id], report_type="qweb-pdf", )
def test_qweb(self): with enable_test_report_directory(): self.report_instance.print_pdf() # get action test_reports.try_report( self.env.cr, self.env.uid, "mis_builder.report_mis_report_instance", [self.report_instance.id], report_type="qweb-pdf", )
def test_xlsx(self): with enable_test_report_directory(): self.report_instance.export_xls() # get action test_reports.try_report( self.env.cr, self.env.uid, "mis_builder.mis_report_instance_xlsx", [self.report_instance.id], report_type="xlsx", )
def test_report(self): """Check that report is produced correctly.""" wizard = self.wizard_model.create({ "show_move_line_details": True, "receivable_accounts_only": True }) wizard.onchange_type_accounts_only() data = wizard._prepare_report_aged_partner_balance() # Simulate web client behavior: # default value is a datetime.date but web client sends back strings data.update( {"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)}) result = test_reports.try_report( self.env.cr, self.env.uid, "account_financial_report.aged_partner_balance", wizard.ids, data=data, ) self.assertTrue(result)
def test_html(self): test_reports.try_report(self.env.cr, self.env.uid, self.qweb_report_name, [self.report.id], report_type='qweb-html')
def test_xlsx(self): test_reports.try_report(self.env.cr, self.env.uid, 'mis.report.instance.xlsx', [self.report_instance.id], report_type='xlsx')
def test_qweb(self): test_reports.try_report(self.env.cr, self.env.uid, 'mis_builder.report_mis_report_instance', [self.report_instance.id], report_type='qweb-pdf')