[FIX] point_of_sale: correctly set the customer on the order
bzr revid: fva@openerp.com-20130329110048-1cx2sr4hp98cue0f
This commit is contained in:
parent
96a74ae6ad
commit
cae96ed454
|
@ -489,7 +489,8 @@ class pos_order(osv.osv):
|
||||||
'user_id': order['user_id'] or False,
|
'user_id': order['user_id'] or False,
|
||||||
'session_id': order['pos_session_id'],
|
'session_id': order['pos_session_id'],
|
||||||
'lines': order['lines'],
|
'lines': order['lines'],
|
||||||
'pos_reference':order['name']
|
'pos_reference':order['name'],
|
||||||
|
'partner_id': order['partner_id'] or False
|
||||||
}, context)
|
}, context)
|
||||||
|
|
||||||
for payments in order['statement_ids']:
|
for payments in order['statement_ids']:
|
||||||
|
|
|
@ -330,7 +330,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||||
|
|
||||||
//we try to send the order. shadow prevents a spinner if it takes too long.
|
//we try to send the order. shadow prevents a spinner if it takes too long.
|
||||||
var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: true, timeout: 2000});
|
var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: true, timeout: 2000});
|
||||||
|
|
||||||
rpc.fail(function(unused,event){
|
rpc.fail(function(unused,event){
|
||||||
//prevent an error popup creation by the rpc failure
|
//prevent an error popup creation by the rpc failure
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -863,7 +863,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||||
lines: orderLines,
|
lines: orderLines,
|
||||||
statement_ids: paymentLines,
|
statement_ids: paymentLines,
|
||||||
pos_session_id: this.pos.get('pos_session').id,
|
pos_session_id: this.pos.get('pos_session').id,
|
||||||
partner_id: this.pos.get('client') ? this.pos.get('client').id : undefined,
|
partner_id: this.get_client() ? this.get_client().id : false,
|
||||||
user_id: this.pos.get('cashier') ? this.pos.get('cashier').id : this.pos.get('user').id,
|
user_id: this.pos.get('cashier') ? this.pos.get('cashier').id : this.pos.get('user').id,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue