[FIX] point_of_sale: Closing a cash control session
Before the fix: When creating a new session with Cash control POS then it was impossible to close the session. After the fix: The same flow as in 9.0 when closing a session opw:691517
This commit is contained in:
@@ -230,6 +230,10 @@ class PosSession(models.Model):
|
||||
if not session.config_id.cash_control:
|
||||
session.action_pos_session_close()
|
||||
|
||||
@api.multi
|
||||
def action_pos_session_validate(self):
|
||||
self.action_pos_session_close()
|
||||
|
||||
@api.multi
|
||||
def action_pos_session_close(self):
|
||||
# Close CashBox
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<button name="action_pos_session_closing_control" type="object" string="Validate Closing & Post Entries"
|
||||
attrs="{'invisible' : ['|', ('cash_control', '=', True),('state', '!=', 'opened')]}"
|
||||
class="oe_highlight"/>
|
||||
<button name="action_pos_session_closing_control" type="object" string="Validate Closing & Post Entries" states="closing_control"
|
||||
<button name="action_pos_session_validate" type="object" string="Validate Closing & Post Entries" states="closing_control"
|
||||
class="oe_highlight"/>
|
||||
|
||||
<field name="state" widget="statusbar" statusbar_visible="opening_control,opened,closing_control,closed" nolabel="1" />
|
||||
|
||||
Reference in New Issue
Block a user