You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
791 B
19 lines
791 B
//Show popup and button function to add product to order line
|
|
odoo.define('multi_image_in_pos.MultiImagePopup', function(require) {
|
|
'use strict';
|
|
const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup');
|
|
const Registries = require('point_of_sale.Registries');
|
|
class MultiImagePopup extends AbstractAwaitablePopup {
|
|
// Confirm button of popup, on clicking it,
|
|
// corresponding product will add to orderline
|
|
confirm() {
|
|
var product = this.props.product;
|
|
var order = this.env.pos.get_order();
|
|
order.add_product(product);
|
|
this.cancel();
|
|
}
|
|
}
|
|
MultiImagePopup.template = 'MultiImagePopup';
|
|
Registries.Component.add(MultiImagePopup);
|
|
return MultiImagePopup;
|
|
});
|
|
|