Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

update the stored point of sale data in the cache

By
dhassi
on 3/7/14, 10:35 AM 1,216 views

Hi, I'm working on displaying and updating the stock quantity of products in the pos module. When I click the "validate' button to finish ordered products, I want to update the quantities of products in the browser, without talking to the server (in order to avoid breaking the offline feature of pos) The idea is that I retrive the products data using :

self.pos.get('products').models

I would like to update the 'products' field contained in the static/src/js/models.js of the point of sale module.

Where "self" is the object that inherits from the pos_baseWidget Widget.

then I change the content of that data and I wonder how can I push it to the stored data?

Another concern is that I wonder if the widget containing the products get redrawn after clicking on the "validate" button. Otherwise, I need to redraw the ProductScreenWidget myself.

If anyone knows how widgets are drawn after clicking at this button, please help me.

Thank you

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/7/14, 10:35 AM
Seen: 1216 times
Last updated: 3/16/15, 8:10 AM