[FIX] pos_loyalty: not showing error without orderline
Steps to reproduce the error: 1. Open a Pos 2. Without any orderline, click on `+-` button 3. You will see an error issue https://github.com/odoo/odoo/issues/115642 closes odoo/odoo#117620 X-original-commit: a588bb7fbe9ad6accaa12ebf1ce59767284c4f12 Signed-off-by: Trinh Jacky (trj) <trj@odoo.com> Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
@@ -22,7 +22,7 @@ patch(ProductScreen.prototype, "pos_loyalty.ProductScreen", {
|
||||
const _super = this._super;
|
||||
const selectedLine = this.currentOrder.get_selected_orderline();
|
||||
if (key === "-") {
|
||||
if (selectedLine.eWalletGiftCardProgram) {
|
||||
if (selectedLine && selectedLine.eWalletGiftCardProgram) {
|
||||
// Do not allow negative quantity or price in a gift card or ewallet orderline.
|
||||
// Refunding gift card or ewallet is not supported.
|
||||
this.notification.add(
|
||||
|
||||
Reference in New Issue
Block a user