[IMP] ir.actions.report.xml improve view, move rml specific fiels in a tab
authorAntony Lesuisse <al@openerp.com>
Thu, 6 Mar 2014 23:46:57 +0000 (00:46 +0100)
committerAntony Lesuisse <al@openerp.com>
Thu, 6 Mar 2014 23:46:57 +0000 (00:46 +0100)
bzr revid: al@openerp.com-20140306234657-kblucn86ph9gjfu6

openerp/addons/base/ir/ir_actions.py
openerp/addons/base/ir/ir_actions.xml

index 9adbf2c..aa37d8c 100644 (file)
@@ -135,35 +135,36 @@ class ir_actions_report_xml(osv.osv):
     _sequence = 'ir_actions_id_seq'
     _order = 'name'
     _columns = {
-        'name': fields.char('Name', size=64, required=True, translate=True),
-        'model': fields.char('Object', size=64, required=True),
         'type': fields.char('Action Type', size=32, required=True),
-        'report_name': fields.char('Service Name', size=64, required=True),
-        'usage': fields.char('Action Usage', size=32),
-        'report_type': fields.char('Report Type', size=32, required=True, help="Report Type, e.g. pdf, html, raw, sxw, odt, html2html, mako2html, ..."),
+        'name': fields.char('Name', size=64, required=True, translate=True),
+
+        'model': fields.char('Model', required=True),
+        'report_type': fields.char('Report Type', required=True, help="Report Type: qweb-html, qweb-pdf, custom"),
+        'report_name': fields.char('Service Name', required=True, help="URL of the report is /report/<service name>/<ids>"),
         'groups_id': fields.many2many('res.groups', 'res_groups_report_rel', 'uid', 'gid', 'Groups'),
+
+        # options
         '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."),
-        '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.'),
         '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.'),
-        'auto': fields.boolean('Custom Python Parser'),
+        '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.'),
 
+        # Deprecated rml stuff
+        'usage': fields.char('Action Usage', size=32),
         'header': fields.boolean('Add RML Header', help="Add or not the corporate RML header"),
+        'parser': fields.char('Parser Class'),
+        'auto': fields.boolean('Custom Python Parser'),
 
-        'report_xsl': fields.char('XSL Path', size=256),
-        'report_xml': fields.char('XML Path', size=256, help=''),
+        'report_xsl': fields.char('XSL Path'),
+        'report_xml': fields.char('XML Path'),
 
-        # Pending deprecation... to be replaced by report_file as this object will become the default report object (not so specific to RML anymore)
-        '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"),
-        # temporary related field as report_rml is pending deprecation - this field will replace report_rml after v6.0
-        '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),
+        'report_rml': fields.char('Main Report File Path', help="The path to the main report file (depending on Report Type) or NULL if the content is in another data field"),
+        '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),
 
         'report_sxw': fields.function(_report_sxw, type='char', string='SXW Path'),
         'report_sxw_content_data': fields.binary('SXW Content'),
         'report_rml_content_data': fields.binary('RML Content'),
         'report_sxw_content': fields.function(_report_content, fnct_inv=_report_content_inv, type='binary', string='SXW Content',),
         'report_rml_content': fields.function(_report_content, fnct_inv=_report_content_inv, type='binary', string='RML Content'),
-
-        'parser': fields.char('Parser Class'),
     }
     _defaults = {
         'type': 'ir.actions.report.xml',
@@ -171,7 +172,7 @@ class ir_actions_report_xml(osv.osv):
         'auto': True,
         'header': True,
         'report_sxw_content': False,
-        'report_type': 'pdf',
+        'report_type': 'qweb-pdf',
         'attachment': False,
     }
 
index 26c08d4..0bc8c99 100644 (file)
                     <group>
                         <group>
                             <field name="name"/>
-                            <field name="report_name"/>
                             <field name="model"/>
+                            <field name="report_type"/>
+                            <field name="report_name"/>
                         </group>
                         <group>
-                            <field name="usage"/>
-                            <field name="report_type"/>
-                            <field name="report_file"/>
+                            <field name="attachment"/>
+                            <field name="attachment_use"/>
+                            <field name="multi"/>
                         </group>
                     </group>
                     <notebook>
-                        <page string="Other Configuration">
+                        <page string="Security">
+                            <field name="groups_id"/>
+                        </page>
+                        <page string="RML Configuration">
                             <group>
                                 <group string="RML Report">
                                     <field name="header"/>
+                                    <field name="report_file"/>
+                                    <field name="auto"/>
+                                    <field name="parser"/>
+                                    <field name="usage"/>
                                 </group>
                                 <group string="XML Report">
                                     <field name="report_xsl"/>
                                     <field name="report_xml"/>
                                 </group>
-                                <group string="Attachments">
-                                    <field name="attachment"/>
-                                    <field name="attachment_use"/>
-                                </group>
-                                <group string="Miscellaneous">
-                                    <field name="multi"/>
-                                    <field name="auto"/>
-                                    <field name="parser"/>
-                                </group>
                             </group>
                         </page>
-                        <page string="Security">
-                            <field name="groups_id"/>
-                        </page>
                     </notebook>
                 </form>
             </field>