Any idea how i can get a value from a wizard into the filename (print_report_name) of a resulting report ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Hi,
If you are using the context(ctx) for passing the data from the wizard to the main model, then we can change the name using UI or coding,
eg
this is a product label pdf file
<record id="report_product_template_label" model="ir.actions.report">
<field name="name">Product Label (PDF)</field>
<field name="model">product.template</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">product.report_producttemplatelabel</field>
<field name="report_file">product.report_producttemplatelabel</field>
<field name="paperformat_id" ref="product.paperformat_label_sheet"/>
<field name="print_report_name">'Products Labels - %s' % (object.name)</field>
<field name="binding_model_id" eval="False"/>
<field name="binding_type">report</field>
</record>
using the print_report_name we can be able to get the object details in the corresponding model, also we can be able to change the label name in this way in other ways
Technical - reports - select the report and we can change the name here
Regards
Did you solve it ?
Not sure how this can inject the filename in the controller ... am i able to 'overwrite; this report.name by passing a context ??
filename = "%s.%s" % (report.name, extension)
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ม.ค. 25
|
2485 | ||
|
1
ธ.ค. 22
|
3572 | ||
|
2
พ.ย. 22
|
2464 | ||
|
0
ต.ค. 22
|
2442 | ||
|
1
ก.ย. 22
|
2768 |