Merge lp:~openerp-dev/openobject-server/trunk-web_pdf_reports_inbuilt-pga into lp:openobject-server

Proposed by Parth Gajjar(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-server/trunk-web_pdf_reports_inbuilt-pga
Merge into: lp:openobject-server
Diff against target: 28 lines (+11/-0)
1 file modified
openerp/addons/base/ir/ir_actions.py (+11/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-web_pdf_reports_inbuilt-pga
Reviewer Review Type Date Requested Status
Mantavya Gajjar (Open ERP) (community) Needs Information
Review via email: mp+178659@code.launchpad.net

Description of the change

hello,
Added inbuilt_pdf function field in ir.actions.report.xml.
Thanks,
PGA

To post a comment you must log in.
Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

Make a good text on module description and change the text on settings menu

Replace (View Report -> Enable this for open PDF reports in browser.)

With (View Report -> Enable this to have inline pdf report viewer.)

or some good text

review: Needs Information
4929. By Parth Gajjar(Open ERP)

[IMP] improved code

4930. By Parth Gajjar(Open ERP)

merged with trunk-server

4931. By Parth Gajjar(Open ERP)

[IMP]improved code

Unmerged revisions

4931. By Parth Gajjar(Open ERP)

[IMP]improved code

4930. By Parth Gajjar(Open ERP)

merged with trunk-server

4929. By Parth Gajjar(Open ERP)

[IMP] improved code

4928. By Parth Gajjar(Open ERP)

merged with latest trunk

4927. By Parth Gajjar(Open ERP)

[ADD] added inbuilt_pdf function field in ir.actions.report.xml

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/ir/ir_actions.py'
2--- openerp/addons/base/ir/ir_actions.py 2013-09-18 17:18:16 +0000
3+++ openerp/addons/base/ir/ir_actions.py 2013-09-30 11:24:34 +0000
4@@ -88,6 +88,16 @@
5 res[report.id] = False
6 return res
7
8+ def _inbuilt_pdf(self, cursor, user, ids, name, arg, context=None):
9+ res = {}
10+ inbuilt_pdf = self.pool.get('ir.config_parameter').get_param(cursor, user, 'inbuilt_pdf', default="False", context=context)
11+ for report in self.browse(cursor, user, ids, context=context):
12+ if eval(inbuilt_pdf) and report.report_type.lower() == 'pdf':
13+ res[report.id] = True
14+ else:
15+ res[report.id] = False
16+ return res
17+
18 def _lookup_report(self, cr, name):
19 """
20 Look up a report definition.
21@@ -163,6 +173,7 @@
22 'report_rml_content': fields.function(_report_content, fnct_inv=_report_content_inv, type='binary', string='RML Content'),
23
24 'parser': fields.char('Parser Class'),
25+ 'inbuilt_pdf': fields.function(_inbuilt_pdf, type='boolean', string='Show in browser'),
26 }
27 _defaults = {
28 'type': 'ir.actions.report.xml',