diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-10-30 10:22:50 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-30 12:06:01 +0000 |
| commit | 855b29b6d0fc22b6d333bc470a04e60c84fffe73 (patch) | |
| tree | 812d9b1eacb39f109ba1243c872f08b004060635 /addons | |
| parent | a7bf579008b8bb0c19d19777d737d0cbc9c4b218 (diff) | |
[FIX] point_of_sale: cash balance
- Go to POS application
- Click on the 3 dots of the session to open configuration
- Remove the "Cash" payment method and just keep "Bank"
- Open the session, proceed to a sell and close it.
- Try to open the session either clicking on "Close" on the kanban card
`CacheMiss` error.
opw-2116470
closes odoo/odoo#39570
X-original-commit: 62cb92644de3cfa6e7864583d1efcaf5821f05e4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/point_of_sale/models/pos_session.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index b8d6bb440ba..6820ba3b679 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -112,6 +112,10 @@ class PosSession(models.Model): ) session.cash_register_balance_end = session.cash_register_balance_start + session.cash_register_total_entry_encoding session.cash_register_difference = session.cash_register_balance_end_real - session.cash_register_balance_end + else: + session.cash_register_total_entry_encoding = 0.0 + session.cash_register_balance_end = 0.0 + session.cash_register_difference = 0.0 @api.depends('order_ids.payment_ids.amount') def _compute_total_payments_amount(self): |
