Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
4306 Näkymät

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 :(

Avatar
Hylkää

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?

Paras vastaus

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

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
toukok. 25
2147
3
helmik. 23
6580
2
jouluk. 21
5367
1
huhtik. 25
3966
0
elok. 19
2512