Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4317 มุมมอง

In sales order, after writing all the information required for the sale order.


I want to create a button "Work Order"  that generates a PDF automatically with a few information written in the fields, this document will create a custom PDF that I'm gonna modify, but all I want is that this button generates the PDF adding some of the Sale Order info that I just wrote in the required fields, such as: Client name, Quantity and the premade Sale Number created by the system.


Sorry if I am not very clear here :(

อวตาร
ละทิ้ง

so do I only change the variables ['report'], module_name and template_name? and what do you mean by template name? What file extension is that?

คำตอบที่ดีที่สุด

first create function like 

@api.multi

    def print_work_order(self):

        return self.env['report'].get_action(self, 'module_name.template_name')

and assign this fuction to your button.

make sure you have created action for report

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
2193
3
ก.พ. 23
6619
2
ธ.ค. 21
5396
Odoo studio icon is disabled แก้ไขแล้ว
1
เม.ย. 25
4009
0
ส.ค. 19
2524