summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Masereel <pim@odoo.com>2019-10-02 13:13:03 +0000
committerPierre Masereel <pim@odoo.com>2019-10-02 13:13:03 +0000
commit934dd57b819303170d5bb50d4e8201ed40f7d563 (patch)
tree290f7e2c3a3e0d5a9ca70f33a1e99f93affcf882
parent6e846b1add326d368cf544539ebceaea868c8b4f (diff)
[FIX] point_of_sale: close session without ordered
We cannot close a session without POS order as we are giving explicitly a name to the account_move, it is not possible to delete it at the end when it is empty. So we don't name it anymore, and it takes its name from the journal sequence when it is posted, which actually do exactly the same as before, except that it avoid to have gaps in the sequence and allow deletion of the move if it's not named. closes odoo/odoo#37787 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
-rw-r--r--addons/point_of_sale/models/pos_session.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py
index 14ccea3d461..f215209fd81 100644
--- a/addons/point_of_sale/models/pos_session.py
+++ b/addons/point_of_sale/models/pos_session.py
@@ -309,7 +309,6 @@ class PosSession(models.Model):
'journal_id': journal.id,
'date': fields.Date.context_today(self),
'ref': self.name,
- 'name': journal.sequence_id.next_by_id()
})
self.write({'move_id': account_move.id})