Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions mcfix_point_of_sale/models/pos_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def create(self, vals):
session = self.env['pos.session'].browse(session_id)
vals['company_id'] = session.config_id.company_id.id

# If we are creating the pos.order with a specific company but
# not a session, we propose a default session that is consistent with
# the company provided.
if company_id and not session_id:
session = self.with_context(
company_id=company_id)._default_session()
if session:
vals['session_id'] = session.id
# # If we are creating the pos.order with a specific company but
# # not a session, we propose a default session that is consistent with
# # the company provided.
# if company_id and not session_id:
# session = self.with_context(
# company_id=company_id)._default_session()
# if session:
# vals['session_id'] = session.id
return super(PosOrder, self).create(vals)

@api.onchange('company_id')
Expand Down