İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3860 Görünümler

Is there a way to stop POS from grouping items? I want to be able to apply discounts on individual items using barcodes (like a discount voucher) but with the current POS behaviour, it applies discount to all products on the selected line.

Real world example:

Customer orders 3 beers, I enter 3 beers on the POS. Customer hands me a voucher for one free beer (barcode with 100% discount) but the discount is applied to all 3.


Thanks 

Avatar
Vazgeç
En İyi Yanıt

One work-around without having to customize code is to first enter one beer, apply discount, and then add the two last beers.

I see the possible headache when the customer gives you the voucher AFTER you've already added all the beers though..

If you know how to do basic odoo development, removing the if statement from line 1985 in the models.js file (point_of_sale module), and make it always run the "else" clause (in bold), it will stop merging lines. 
This should of course be done by creating a custom module and overriding the the add_product function.

if( last_orderline && last_orderline.can_be_merged_with(line) && options.merge !== false){ 

            last_orderline.merge(line);

        }else{

            this.orderlines.add(line);

        }

Avatar
Vazgeç
Üretici

Hi Marius

Thanks for the great pointers. I'm only just embarking on the Odoo adventure so custom module development is still in the distance. I might just try monkey-patching first :)

Do you know if this is the sort of thing that can be made with Odoo Studio?

Jim

Üretici

EDIT: I managed to achieve the functionality I wanted by simply removing the ! from options.merge !== false

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 18
5272
1
Mar 18
3248
0
Kas 17
4197
1
May 17
2658
1
Ara 16
3270