This question has been flagged

Hello,


My name is Greg and I'm writing this post because I can't find any example/documentation on how to add a product to the order lines of POS module.


My application looks like following (can't post a picture for some reason):
https://we.tl/t-ZII3gjB97W


After pressing the button nr.1, the popup appears, we have to enter the label number and verify it against our web service using the button nr.2. Once we retrieve the package information, we press the button nr.3, and what needs to happen here is that the product with the nr.4, would appear in the place nr.5. 

It would be great if there would be a possibility to do this operation from the JavaScript code.


So in summary, my 2 questions are:

1- Is there any example showing how to add an existent product to the cart in JS code?

2- Is it possible to create products "on the fly"? Like in this case to create the product just before adding it to the cart?


I'm using odoo v14.


Thank you,


Avatar
Discard