How to achieve “Send by email” functionality in “Quotations” and “Sales Order” module in ODOO?

蹲街弑〆低调 提交于 2019-12-12 16:26:59

问题


I am developing ODOO application in iOS. I want to achieve "Send by email" functionality in "Quotations" and "Sales Order" module in ODOO.

So is there any API available to achieve this functionality ?

Or shall i generate PDF programmatically in iOS and send this by using MFMailComposeViewController class ?

Thanks


回答1:


It is best to reuse the Odoo feature. The button calls a method of the Sale Order model. You can identify the method's name if you activate the Developer Mode:

The method is action_quotation_send, and it is available in the External API just like write is.

Unfortunately this particular method opens a wizard: it just prepares some data and then returns an action to the webclient to open the "wizard" dialog, and the actual operation will only be performed there, with its "Send" button.

To have a fully automated procedure, usable from a single API call, you will need to implement yourself a method. There website_sale official module does something similar, so I recommend looking to extract the relevant code for your use case.



来源:https://stackoverflow.com/questions/30051856/how-to-achieve-send-by-email-functionality-in-quotations-and-sales-order-m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!