跳至內容
選單
此問題已被標幟
1 回覆
3941 瀏覽次數

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 

頭像
捨棄
最佳答案

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);

        }

頭像
捨棄
作者

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

作者

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

相關帖文 回覆 瀏覽次數 活動
2
5月 18
5379
1
3月 18
3313
0
11月 17
4291
1
5月 17
2773
1
12月 16
3328