diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-10-14 14:19:59 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-10-14 14:19:59 +0200 |
| commit | bb47a9b3bc6b8c9a7edaa35a74e4d1f1dd3e39d8 (patch) | |
| tree | 332b988db0df6c65c02bbf99b1cefb2c86b67758 | |
| parent | 566af6033f68b55e2d0c1ae8b5aa06247c8b69d2 (diff) | |
[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
| -rw-r--r-- | addons/point_of_sale/point_of_sale.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 900fee3be6f..c4d16009349 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -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: |
