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

In POS only display on hand quantity

By
Harsh Dhaduk
on 3/26/14, 9:40 AM 2,669 views

Hello Every one

i have 15200 products and 10000 up product has no quantity so it takes too much time to load.

please give me advise how can i display product has at least 1 quantity ?

i try in pos in get method to set 'qty_available' > 0 but it's not working.

2

Thierry Godin

--Thierry Godin--
1516
| 8 7 8
Collegien, France
--Thierry Godin--

..

Thierry Godin
On 3/26/14, 11:51 AM

Hello,

You have to override load_server_data() in point_of_sale\static\src\js*model.js* around line 176 :

            return self.fetch(
                'product.product', 
                ['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'default_code',
                 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'],
                [['sale_ok','=',true],['available_in_pos','=',true]],
                {pricelist: self.get('shop').pricelist_id[0]} // context for price
            );

Current filter is [['sale_ok','=',true],['available_in_pos','=',true]],

So You can add :

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

I hope this helps.

Regards

I appreciate your ans when i checked in product.product module they have qty_available column but it is function not a column in database when i tried as you suggested also coming product which has quantity 0

Harsh Dhaduk
on 3/27/14, 3:20 AM
0
ashouba
On 6/1/14, 9:50 AM

I tried the same thing but without success, have you found a solution

0
shashank verma
On 3/26/14, 10:21 AM

Use domain filter to display products with qty>0

example

domain="[('prod_qty,'>',0)]

It just an example , you need to pass proper field name to make it work

Thanks for your answer

i tried but same output is coming.

Harsh Dhaduk
on 3/27/14, 3:22 AM

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

1 follower(s)

Stats

Asked: 3/26/14, 9:40 AM
Seen: 2669 times
Last updated: 3/16/15, 8:10 AM