(self, picking_id, access_token=None, **kw)
return request.make_response(pdf, headers=pdfhttpheaders)
Print delivery slip for customer, using either access rights or access token
        to be sure customer has access
Print delivery slip for customer, using either access rights or access token
        to be sure customer has access
Print delivery slip for customer using either access rights or access token to be sure customer has access
def portal_my_picking_report(self, picking_id, access_token=None, **kw):
        """ Print delivery slip for customer, using either access rights or access token
        to be sure customer has access """
        try:
            picking_sudo = self._stock_picking_check_access(picking_id, access_token=access_token)
        except exceptions.AccessError:
            return request.redirect('/my')

        # print report as SUPERUSER, since it require access to product, taxes, payment term etc.. and portal does not have those access rights.
        pdf = request.env.ref('stock.action_report_delivery').with_user(SUPERUSER_ID)._render_qweb_pdf([picking_sudo.id])[0]
        pdfhttpheaders = [
            ('Content-Type', 'application/pdf'),
            ('Content-Length', len(pdf)),
        ]
        return request.make_response(pdf, headers=pdfhttpheaders)
def portal_my_picking_report ( self , picking_id , access_token = None , * * kw ) : try : picking_sudo = self . _stock_picking_check_access ( picking_id , access_token = access_token ) except exceptions . AccessError : return request . redirect ( '/my' ) # print report as SUPERUSER, since it require access to product, taxes, payment term etc.. and portal does not have those access rights. pdf = request . env . ref ( 'stock.action_report_delivery' ) . with_user ( SUPERUSER_ID ) . _render_qweb_pdf ( [ picking_sudo . id ] ) [ 0 ] pdfhttpheaders = [ ( 'Content-Type' , 'application/pdf' ) , ( 'Content-Length' , len ( pdf ) ) , ] return request . make_response ( pdf , headers = pdfhttpheaders )