Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
10939 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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?

Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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 ????

Powiązane posty Odpowiedzi Widoki Czynność
0
paź 25
388
0
paź 25
352
2
paź 25
5960
2
paź 25
628
2
paź 25
911