如何实现“通过电子邮件发送" “报价"中的功能和“销售订单" ODOO中的模块? [英] How to achieve "Send by email" functionality in "Quotations" and "Sales Order" module in ODOO?

查看:100
本文介绍了如何实现“通过电子邮件发送" “报价"中的功能和“销售订单" ODOO中的模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在iOS中开发ODOO应用程序. 我想在ODOO的报价"和销售订单"模块中实现通过电子邮件发送"功能.

那么有没有可用的API来实现此功能?

或者我应该在iOS中以编程方式生成PDF并通过使用MFMailComposeViewController类将其发送吗?

谢谢

解决方案

最好重用Odoo功能. 该按钮调用销售订单"模型的方法. 如果激活开发人员模式",则可以标识方法的名称:

方法为action_quotation_send,与write一样,它在外部API中也可用.

不幸的是,此特定方法打开了一个向导:它只是准备一些数据,然后将一个操作返回给Web客户端以打开向导"对话框,并且实际的操作仅在其中带有发送"按钮的情况下进行. /p>

要有一个完全自动化的过程(可从单个API调用中使用),则需要为自己实现一个方法.那里website_sale官方模块做了某物类似,因此建议您为您的用例提取相关代码.

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

解决方案

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.

这篇关于如何实现“通过电子邮件发送" “报价"中的功能和“销售订单" ODOO中的模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆