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:
1 parent
6a8c7df560
commit
70698ca24f
1 file changed
+2
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user