From 934dd57b819303170d5bb50d4e8201ed40f7d563 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Wed, 2 Oct 2019 13:13:03 +0000 Subject: [PATCH] [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 --- addons/point_of_sale/models/pos_session.py | 1 - 1 file changed, 1 deletion(-) 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})