Skip to Content
Menu
This question has been flagged
1 Reply
2076 Views

Hello. I want to print a report when I do something at the TPV, but I don't get it. I'm trying to use ActionManager like this:

this.action_manager = new ActionManager(this, session.user_context);
this.action_manager.doAction(result, {
additional_context: {
active_id: obj.id,
active_ids: [obj.id],
active_model: 'obj.obj'
}})
I've also tried using $.ajax{url:'/my_url', data: {}, success: function(result){}}

And with rpc.query({}) 


but It returns that error ->>>>> Uncaught TypeError: parent._trigger_up is not a function


What should I do? Thanks

Avatar
Discard
Author Best Answer

I reached the solution at last. You need to code something like that:

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();
});
It is at the models.js of the point_of_sale addon. 
Avatar
Discard