Hello everyone, I am trying to stop the automatic download of the pdf ticket from the point of sale, because it is downloaded automatically every time the sale is confirmed, and this is annoying for the customer since the computer fills up with files you don't need.
I have found this code fragment in the path: /odoo/addons/point_of_sale/static/src/js/models.js more or less in the line: 896
I have tried to comment on this method but what happens is that the sale is not confirmed.
If anyone has an idea how to override this action, I'd really appreciate your help.
// on success, get the order id generated by the server
transfer.pipe(function(order_server_id){
// generate the pdf and download it
if (order_server_id.length) {
self.chrome.do_action('point_of_sale.pos_invoice_report',{additional_context:{
active_ids:order_server_id,
}}).done(function () {
invoiced.resolve();
done.resolve();
}).fail(function (error) {
invoiced.reject({code:401, message:'Backend Invoice', data:{order: order}});
done.reject();
});
} else {
// The order has been pushed separately in batch when
// the connection came back.
// The user has to go to the backend to print the invoice
invoiced.reject({code:401, message:'Backend Invoice', data:{order: order}});
done.reject();
}
});