Skip to Content
Menu
This question has been flagged

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




Avatar
Discard
Best Answer

YOU CAN USE THIS MODULE FOR FREE IN ODOO APPS:

NAME: REPORT_PDF_OPTION

 BY: LUIS RODRIG

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 24
547
3
May 24
7280
1
Sep 23
1346
0
Aug 23
559
1
Sep 22
997