Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
3628 Vistas

Hi all,

Is it possible in Odoo 10 to change the default file naming? in V8, there was an option in settings to do so, but it is no longer there.


Currently in Odoo 10, any document you create in the system is downloaded with that name, Delivery Slip.pdf, Picking Operations.pdf and so on.

that is really frustrating to have to change the file name of the files downloaded, and I wonder why a complex system like Odoo does not that option.


Avatar
Descartar
Mejor respuesta

Hello,

     You can have custom report names as you like. For this activate developer mode. Go to

settings/ technical/ reports/ reports. Open form view of the report you want custom name, Add your field name to Printed Report Name.

Odoo supports both normal charecter or python expression(to have dynamic name) in that field

Avatar
Descartar
Autor Mejor respuesta

Can you elaborate more?

invoice report form view gives the following code:


<?xml version="1.0"?> <form string="Report"> <field name="ir_values_id" invisible="1"/> <sheet> <div class="oe_button_box" name="button_box"> <button name="create_action" string="Add in the 'Print' menu" type="object" attrs="{'invisible':[('ir_values_id','!=',False)]}" icon="fa-plus-square" help="Display an option on related documents to print this report" class="oe_stat_button"/> <button name="unlink_action" string="Remove from the 'Print' menu" type="object" attrs="{'invisible':[('ir_values_id','=',False)]}" icon="fa-minus-square" help="Remove the contextual action related this report" class="oe_stat_button"/> </div> <group> <group> <field name="name"/> <field name="report_type"/> </group> <group> <field name="model"/> <field name="report_name" attrs="{'invisible':[('report_type','=', 'controller')]}"/> <field name="report_rml" attrs="{'invisible':[('report_type','!=', 'controller')]}"/> </group> </group> <notebook> <page name="security" string="Security"> <field name="groups_id"/> </page> <page name="rml" string="RML Configuration" attrs="{'invisible':[('report_type','not in',['pdf','sxw'])]}"> <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> </page> <page name="advanced" string="Advanced Properties"> <group> <field name="multi"/> <field name="attachment_use" attrs="{'invisible':[('report_type','=', 'controller')]}"/> <field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/> </group> </page> </notebook> </sheet> </form>

What exactly do I need to change? can you give an example?


thanks in advance.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 25
4744
2
dic 24
7862
2
nov 24
28642
2
may 24
7556
3
mar 24
6996