[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>
This commit is contained in:
@@ -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})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user