I created two radio inputs on the `/shop/product/<product>` page.
When the user clicks the `Add to cart` button, the value of the selected radio is passed to the controller, to the function `cart_update`.
There, I can check which radio input was checked, then put some value in the `request.context` dictionnary for example.
However, in the model functions called by the original `cart_update` function, the context (`self.env.context`) does not show my value.
So, how can I notify model functions such as `_cart_find_product_line`, without redefining completly the controller function `cart_update`, which is a very bad practice ?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/26/15, 10:09 AM|
|Seen: 759 times|
|Last updated: 11/26/15, 11:26 AM|