[FIX] point_of_sale: correctly set the customer on the order

bzr revid: fva@openerp.com-20130329110048-1cx2sr4hp98cue0f
This commit is contained in:
Frédéric van der Essen 2013-03-29 12:00:48 +01:00
parent 96a74ae6ad
commit cae96ed454
2 changed files with 4 additions and 3 deletions

View File

@ -489,7 +489,8 @@ class pos_order(osv.osv):
'user_id': order['user_id'] or False,
'session_id': order['pos_session_id'],
'lines': order['lines'],
'pos_reference':order['name']
'pos_reference':order['name'],
'partner_id': order['partner_id'] or False
}, context)
for payments in order['statement_ids']:

View File

@ -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.
var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: true, timeout: 2000});
rpc.fail(function(unused,event){
//prevent an error popup creation by the rpc failure
event.preventDefault();
@ -863,7 +863,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
lines: orderLines,
statement_ids: paymentLines,
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,
};
},