[FIX] pos: check constraint on session instead of uid (eg: runbot import demo data with uid=1 but other user_id

bzr revid: mat@openerp.com-20131014121959-fp4gs26xh8cdte1w
This commit is contained in:
Martin Trigaux 2013-10-14 14:19:59 +02:00
parent 566af6033f
commit bb47a9b3bc
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ class pos_session(osv.osv):
# open if there is no session in 'opening_control', 'opened', 'closing_control' for one user
domain = [
('state', 'not in', ('closed','closing_control')),
('user_id', '=', uid)
('user_id', '=', session.user_id.id)
]
count = self.search_count(cr, uid, domain, context=context)
if count>1: