135
141
_sequence = 'ir_actions_id_seq'
144
'type': fields.char('Action Type', size=32, required=True),
138
145
'name': fields.char('Name', size=64, required=True, translate=True),
139
'model': fields.char('Object', size=64, required=True),
140
'type': fields.char('Action Type', size=32, required=True),
141
'report_name': fields.char('Service Name', size=64, required=True),
142
'usage': fields.char('Action Usage', size=32),
143
'report_type': fields.char('Report Type', size=32, required=True, help="Report Type, e.g. pdf, html, raw, sxw, odt, html2html, mako2html, ..."),
147
'model': fields.char('Model', required=True),
148
'report_type': fields.selection([('qweb-pdf', 'PDF'),
149
('qweb-html', 'HTML'),
150
('controller', 'Controller'),
151
('pdf', 'RML pdf (deprecated)'),
152
('sxw', 'RML sxw (deprecated)'),
153
('webkit', 'Webkit (deprecated)'),
154
], 'Report Type', required=True, help="HTML will open the report directly in your browser, PDF will use wkhtmltopdf to render the HTML into a PDF file and let you download it, Controller allows you to define the url of a custom controller outputting any kind of report."),
155
'report_name': fields.char('Template Name', required=True, help="For QWeb reports, name of the template used in the rendering. The method 'render_html' of the model 'report.template_name' will be called (if any) to give the html. For RML reports, this is the LocalService name."),
144
156
'groups_id': fields.many2many('res.groups', 'res_groups_report_rel', 'uid', 'gid', 'Groups'),
145
159
'multi': fields.boolean('On Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view."),
160
'attachment_use': fields.boolean('Reload from Attachment', help='If you check this, then the second time the user prints with same attachment name, it returns the previous report.'),
146
161
'attachment': fields.char('Save as Attachment Prefix', size=128, help='This is the filename of the attachment used to store the printing result. Keep empty to not save the printed reports. You can use a python expression with the object and time variables.'),
147
'attachment_use': fields.boolean('Reload from Attachment', help='If you check this, then the second time the user prints with same attachment name, it returns the previous report.'),
163
# Deprecated rml stuff
164
'usage': fields.char('Action Usage', size=32),
165
'header': fields.boolean('Add RML Header', help="Add or not the corporate RML header"),
166
'parser': fields.char('Parser Class'),
148
167
'auto': fields.boolean('Custom Python Parser'),
150
'header': fields.boolean('Add RML Header', help="Add or not the corporate RML header"),
152
'report_xsl': fields.char('XSL Path', size=256),
153
'report_xml': fields.char('XML Path', size=256, help=''),
155
# Pending deprecation... to be replaced by report_file as this object will become the default report object (not so specific to RML anymore)
156
'report_rml': fields.char('Main Report File Path', size=256, help="The path to the main report file (depending on Report Type) or NULL if the content is in another data field"),
157
# temporary related field as report_rml is pending deprecation - this field will replace report_rml after v6.0
158
'report_file': fields.related('report_rml', type="char", size=256, required=False, readonly=False, string='Report File', help="The path to the main report file (depending on Report Type) or NULL if the content is in another field", store=True),
169
'report_xsl': fields.char('XSL Path'),
170
'report_xml': fields.char('XML Path'),
172
'report_rml': fields.char('Main Report File Path/controller', help="The path to the main report file/controller (depending on Report Type) or NULL if the content is in another data field"),
173
'report_file': fields.related('report_rml', type="char", required=False, readonly=False, string='Report File', help="The path to the main report file (depending on Report Type) or NULL if the content is in another field", store=True),
160
175
'report_sxw': fields.function(_report_sxw, type='char', string='SXW Path'),
161
176
'report_sxw_content_data': fields.binary('SXW Content'),
162
177
'report_rml_content_data': fields.binary('RML Content'),
163
178
'report_sxw_content': fields.function(_report_content, fnct_inv=_report_content_inv, type='binary', string='SXW Content',),
164
179
'report_rml_content': fields.function(_report_content, fnct_inv=_report_content_inv, type='binary', string='RML Content'),
166
'parser': fields.char('Parser Class'),
169
182
'type': 'ir.actions.report.xml',