简体   繁体   English

从浏览器像打印视图形式?

[英]Print view form like from browser?

I need to create button that would open print option (and option to save in pdf format) for the current view form. 我需要创建一个按钮,以打开当前视图表单的打印选项(以及选项以pdf格式保存)。 Now it is possible to do so by going into print options in browser (like in chrome). 现在可以通过进入浏览器中的打印选项(例如chrome)来实现。 But can I do it to open such print option directly by pressing button in openerp form? 但是我可以通过按openerp形式的按钮直接打开这种打印选项吗?

Something like: 就像是:

<button name="Print"/> 

and it would open same thing that is opened when you go to browser options and choose print. 它将打开与您在浏览器选项中选择“打印”时打开的东西相同的东西。

I found something similar in point of sale module when you press Validate button it opens that menu for check to pay. 当您按“验证”按钮时,我在销售点模块中发现了类似的内容,它打开了该菜单以供支票付款。 But haven't figured out how it is done. 但是还没有弄清楚它是如何完成的。 Do I need to use javascript /jQuery for that or something? 我是否需要为此使用javascript / jQuery?

For example to open something like this: 例如打开这样的东西:

在此处输入图片说明

<input type="button" value="click" onclick="window.print();">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM