[FIX] point_of_sale: proper closing action
bzr revid: fva@openerp.com-20131218145602-0ss9j35xg0bofeh7
This commit is contained in:
parent
12818d0c63
commit
586e8984fe
|
@ -11,6 +11,7 @@
|
|||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
font-family: sans-serif;
|
||||
box-shadow: 0px 10px 40px rgba(0,0,0,0.4);
|
||||
}
|
||||
.ui-dialog button{
|
||||
padding: 8px;
|
||||
|
|
|
@ -1165,14 +1165,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
var self = this;
|
||||
|
||||
function close(){
|
||||
return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_client_pos_menu']], ['res_id']).pipe(
|
||||
_.bind(function(res) {
|
||||
return this.rpc('/web/action/load', {'action_id': res[0]['res_id']}).pipe(_.bind(function(result) {
|
||||
var action = result;
|
||||
action.context = _.extend(action.context || {}, {'cancel_action': {type: 'ir.actions.client', tag: 'reload'}});
|
||||
this.do_action(action);
|
||||
}, this));
|
||||
}, self));
|
||||
return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_client_pos_menu']], ['res_id']).pipe(function(res) {
|
||||
window.location = '/web#action=' + res[0]['res_id'];
|
||||
});
|
||||
}
|
||||
|
||||
var draft_order = _.find( self.pos.get('orders').models, function(order){
|
||||
|
|
Loading…
Reference in New Issue