[IMP] Account_voucher : YML test added for reports
bzr revid: jvo@tinyerp.com-20100917130900-x624xz5tasmi8w70
This commit is contained in:
@@ -25,29 +25,30 @@
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data)
|
||||
|
||||
#-
|
||||
# Demo data for Account tax code
|
||||
#-
|
||||
# !record {model: account.tax.code, id: account_tax_code_0}:
|
||||
# name : Tax Code Test
|
||||
#-
|
||||
# Print Tax Code entries report
|
||||
#-
|
||||
# !python {model: account.tax.code}: |
|
||||
# import netsvc, tools, os
|
||||
# (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref('account.account_tax_code_0')], {}, {})
|
||||
# if tools.config['test_report_directory']:
|
||||
# file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data)
|
||||
-
|
||||
Demo data for Account tax code
|
||||
-
|
||||
!record {model: account.tax.code, id: account_tax_code_0}:
|
||||
name : Tax Code Test
|
||||
-
|
||||
Print Tax Code entries report
|
||||
-
|
||||
!python {model: account.tax.code}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref('account_tax_code_0')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
Print Vat Declaration Report
|
||||
-
|
||||
!python {model: account.tax.code}: |
|
||||
import netsvc, tools, os
|
||||
data_dict = {'model': 'ir.ui.menu', 'form': {'based_on': 'invoices','company_id':ref('base.main_company'),'periods':[]}}
|
||||
(data, format) = netsvc.LocalService('report.account.vat.declaration').create(cr, uid, [ref("account_tax_code_0")], data_dict, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account-vat-declaration.'+format), 'wb+').write(data)
|
||||
|
||||
#-
|
||||
# Print Vat Declaration Report
|
||||
#-
|
||||
# !python {model: account.tax.code}: |
|
||||
# import netsvc, tools, os
|
||||
# data_dict = {'model': 'ir.ui.menu', 'form': {'based_on': 'invoices','company_id':ref('base.main_company'),'periods':[]}}
|
||||
# (data, format) = netsvc.LocalService('report.account.vat.declaration').create(cr, uid, [ref("account.account_tax_code0")], data_dict, {})
|
||||
# if tools.config['test_report_directory']:
|
||||
# file(os.path.join(tools.config['test_report_directory'], 'account-vat-declaration.'+format), 'wb+').write(data)
|
||||
-
|
||||
In order to test the PDF reports defined on an invoice, we will print an invoice
|
||||
-
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
# "test/account_voucher.yml",
|
||||
# "test/sales_receipt.yml",
|
||||
# "test/sales_payment.yml",
|
||||
"test/account_voucher_report.yml"
|
||||
],
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
|
||||
@@ -95,21 +95,3 @@
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
|
||||
assert(acc_id.move_id)
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.voucher.cash_receipt.drcr').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_voucher-report.'+format), 'wb+').write(data)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
-
|
||||
Demo for Account Voucher
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher Axelor
|
||||
narration: Basic PC
|
||||
amount: 1000.0
|
||||
line_ids:
|
||||
- account_id: account.cash
|
||||
amount: 1000.0
|
||||
name: Voucher Axelor
|
||||
period_id: account.period_6
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.voucher.cash_receipt.drcr').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_voucher-report.'+format), 'wb+').write(data)
|
||||
Reference in New Issue
Block a user