diff options
| author | Adrien Widart <awt@odoo.com> | 2021-04-29 12:17:42 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2021-04-29 12:36:25 +0000 |
| commit | 985f1bf5b187513f71e65ab7d2b68e25ff1bfdf1 (patch) | |
| tree | d382385022b2029657c2eca1e7dc01f9ecf275c2 | |
| parent | 7d28f32d9be1590764883f4621df04e04c4e1f12 (diff) | |
[FIX] point_of_sale: post journal entries of cash in/out
When closing a POS session, if there was no sale, the journal entries of
cash in/out will not be posted.
To reproduce the error:
(Need account_accountant)
1. In Point of Sale, open Shop's settings:
- Enable "Advanced Cash Control"
2. Start a new session:
- Open POS
- Close, Confirm
3. Close session
4. Click on "End of Session"
5. Add a "Cash In/out"
- +$10
6. Set Closing Cash
7. Close Session & Post Entries
8. Accounting > Cash
Error: The $10 line is present but its status is "New". It should be
"Processing".
Since there was no sale during the POS session, the module ignores all
the accounting part. When the session is closed, the accounting part is
ignored because there were no sales. As a result, it does not post the
cash in and out.
OPW-2456395
closes odoo/odoo#70101
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
| -rw-r--r-- | addons/point_of_sale/models/pos_session.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index 926724c0cfc..73d5c85d1d5 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -296,7 +296,7 @@ class PosSession(models.Model): def _validate_session(self): self.ensure_one() - if self.order_ids: + if self.order_ids or self.statement_ids.line_ids: self.cash_real_transaction = self.cash_register_total_entry_encoding self.cash_real_expected = self.cash_register_balance_end self.cash_real_difference = self.cash_register_difference |
