跳至内容
菜单
此问题已终结
1 回复
6858 查看
How to inherit this report and set the landscape orientation in my module?
<report
string="Purchase Order"
id="action_report_purchase_order"
model="purchase.order"
report_type="qweb-pdf"
name="purchase.report_purchaseorder"
file="purchase.report_purchaseorder"
print_report_name="
(object.state in ('draft', 'sent') and 'Request for Quotation - %s' % (object.name) or
'Purchase Order - %s' % (object.name))"
/>
形象
丢弃

Please use a meaningful title.

最佳答案

Hello

make new paperformat with the orientation option "Landscape", like below option.

<record id="paperformat_landscape" model="report.paperformat">

            <field name="orientation">Landscape</field>

 </record>

=> for update the paperformat to report, inherit the report action.

<record id="purchase.action_report_purchase_order" model="ir.actions.report">

            <field name="paperformat_id" ref="your_module.paperformat_landscape"/>

 </record>

形象
丢弃
相关帖文 回复 查看 活动
1
5月 16
3070
1
3月 15
5676
2
8月 19
3187
0
9月 17
3293
2
3月 25
4816