This question has been flagged
3 Replies
9821 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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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

@Thierry Godin it's working your rule for me thank you soo much...

can you please do somethink for more please can you please tell me.

if product stock gose to 0 qty it's automaticaly remove from POS with out refreshing page..is it posible?

Best Answer

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

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

Thanks for your answer

i tried but same output is coming.

@Shashank Verma can you please tell me how i can put this domain to rule i mean which model

is it possible to nagtive value item not show in pos ????