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

product quantity models.js

By
dhassi
on 3/7/14, 2:08 PM 770 views

Hi, In the pos module, How can I filter products which have positive quantity? I added a condition to the point-of-sale/static/src/js/models.js file like that (in line 180 which fetches the products):

['qty_available','>',0]

This is the whole line after adding my change:

[['qty_available','>',0],['sale_ok','=',true],['available_in_pos','=',true]],

But it seems that it doesn't work !! I experimented with the other conditions; setting false to 'sale_ok' attribute at the same line and the products have gone as expected !!

Am I wrong with the name of the 'qty_available' attribute? Is the syntax wrong? 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, 2:08 PM
Seen: 770 times
Last updated: 3/16/15, 8:10 AM