How to works...

web_mobile.rpc provides the bridge between a mobile device and Odoo JavaScript. It exposes a few basic mobile utilities. In our example, we used the showToast method to display toast in the mobile app. We also need to check the availability of the function. The reason behind this is that some mobile phones might not support a few features for example, if devices don't have a camera, then you can't use the scanBarcode() method. In such cases, to avoid tracebacks, we need to wrap them with the if condition.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset