问题
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