20 lines
882 B
YAML
20 lines
882 B
YAML
-
|
|
Print the Invoice layout report in Normal Mode
|
|
-
|
|
!python {model: account.invoice}: |
|
|
import netsvc, tools, os
|
|
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('account.demo_invoice_0')], {}, {})
|
|
if tools.config['test_report_directory']:
|
|
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data)
|
|
|
|
-
|
|
Print the Invoice Layout Report with Message through wizard
|
|
-
|
|
!python {model: account.invoice}: |
|
|
ctx={}
|
|
ctx.update({'model': 'account.invoice','active_ids': [ref('account.demo_invoice_0')]})
|
|
data_dict = {'message':ref('account_invoice_layout.demo_message1')}
|
|
from tools import test_reports
|
|
test_reports.try_report_action(cr, uid, 'action_account_invoice_special_msg',wiz_data=data_dict, context=ctx, our_module='account_invoice_layout')
|
|
|