diff --git a/addons/account_invoice_layout/__openerp__.py b/addons/account_invoice_layout/__openerp__.py
index 77a6e428de6..36eeb41b137 100644
--- a/addons/account_invoice_layout/__openerp__.py
+++ b/addons/account_invoice_layout/__openerp__.py
@@ -45,7 +45,8 @@
'account_invoice_layout_report.xml',
'wizard/account_invoice_special_message.xml',
],
- 'demo_xml': [],
+ 'demo_xml': ['account_invoice_layout_demo.xml'],
+ 'test':['test/account_invoice_layout_report.yml'],
'installable': True,
'active': False,
'certificate': '0057235078173',
diff --git a/addons/account_invoice_layout/account_invoice_layout_demo.xml b/addons/account_invoice_layout/account_invoice_layout_demo.xml
new file mode 100644
index 00000000000..cb8df67d997
--- /dev/null
+++ b/addons/account_invoice_layout/account_invoice_layout_demo.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ OpenERP SA
+ ERP & CRM Solutions....
+
+
+ Tiny sprl
+ Be Expert with the Experts...
+
+
+
\ No newline at end of file
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
index 77781c4191d..8f7d5f561e8 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
@@ -297,7 +297,7 @@
- Note: [[ (a['note'] and format(a['note'])) or removeParentNode('tr') ]]
+ Note: [[ (a['note'] and format(a['note'] or '')) or removeParentNode('tr') ]]
@@ -337,7 +337,7 @@
|
- [[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]
+ [[ a['type']=='text' and format(a['name'] or '') or removeParentNode('blockTable') ]]
|
[[ a['type']=='text' and '' ]]
@@ -467,7 +467,7 @@
|
- [[ format(o.comment or removeParentNode('blockTable')) ]]
+ [[ format(o.comment or '') or removeParentNode('blockTable') ]]
|
@@ -477,7 +477,7 @@
|
- [[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]
+ [[ format((o.payment_term and o.payment_term.note or '') or removeParentNode('blockTable')) ]]
|
diff --git a/addons/account_invoice_layout/test/account_invoice_layout_report.yml b/addons/account_invoice_layout/test/account_invoice_layout_report.yml
new file mode 100644
index 00000000000..b7b1c1e76cc
--- /dev/null
+++ b/addons/account_invoice_layout/test/account_invoice_layout_report.yml
@@ -0,0 +1,17 @@
+-
+ 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.test_invoice_1')], {}, {})
+ 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 in Normal mode
+-
+ !python {model: account.invoice}: |
+ import netsvc, tools, os, time
+ data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('account.test_invoice_1'),'context':{}}}
+ (data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('account.test_invoice_1')], data_dict, {})
+ if tools.config['test_report_directory']:
+ file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data)
\ No newline at end of file
|