Do not re-number sales from a point of sale once they have been reopened

Closes #14568
(grafted from 9ea22f8cbadd2ec41416f8aadee10cd3a76401a5)

--HG--
branch : 7.0
This commit is contained in:
Adrià Tarroja Caubet committed 2026-03-14 17:35:17 +01:00
1 parent 6a8c7df560
commit 70698ca24f
1 file changed
+2 -1
+2 -1
View File
@@ -322,7 +322,8 @@ class POSSale(Workflow, ModelSQL, ModelView, TaxableMixin):
@classmethod
@Workflow.transition('done')
def do(cls, sales):
for sale in sales:
sales_without_number = (sale for sale in sales if not sale.number)
for sale in sales_without_number:
with Transaction().set_context(company=sale.company.id):
sale.number = sale.point.sequence.get()
cls.save(sales)