[FIX] point_of_sale: info button on empty orderline
Behavior before the commit: when clicking on the info button from the control buttons, if no orderline was selected, a traceback error happened. After the commit: nothing happens when clicking on the product info button when there's no orderline. Related task id: 2518884 closes odoo/odoo#75728 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -21,9 +21,9 @@ odoo.define('point_of_sale.ProductInfoButton', function(require) {
|
||||
}
|
||||
onClick() {
|
||||
const orderline = this.env.pos.get_order().get_selected_orderline();
|
||||
const product = orderline.get_product();
|
||||
const quantity = orderline.get_quantity();
|
||||
if (orderline) {
|
||||
const product = orderline.get_product();
|
||||
const quantity = orderline.get_quantity();
|
||||
this.showPopup('ProductInfoPopup', { product, quantity });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user