[FIX] config_id problem with pos session.--fixes:lp1098226
bzr revid: bth@tinyerp.com-20130117115814-kf2365ydkq5fwu5i
This commit is contained in:
parent
a186503285
commit
8d47d83bbf
|
@ -290,7 +290,7 @@ class pos_session(osv.osv):
|
|||
|
||||
_constraints = [
|
||||
(_check_unicity, "You cannot create two active sessions with the same responsible!", ['user_id', 'state']),
|
||||
(_check_pos_config, "You cannot create two active sessions related to the same point of sale!", ['config_id']),
|
||||
(_check_pos_config, "You cannot create two active sessions related to the same point of sale! Use not used point of sale", ['config_id']),
|
||||
]
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
|
|
|
@ -88,6 +88,7 @@ class pos_session_opening(osv.osv_memory):
|
|||
session_ids = proxy.search(cr, uid, [
|
||||
('state', '!=', 'closed'),
|
||||
('config_id', '=', config_id),
|
||||
('user_id', '=', uid),
|
||||
], context=context)
|
||||
if session_ids:
|
||||
session = proxy.browse(cr, uid, session_ids[0], context=context)
|
||||
|
|
Loading…
Reference in New Issue