to draft
parent
52c55fd683
commit
dcf852521c
|
@ -444,7 +444,6 @@ class Shop(Model):
|
||||||
for payment in obj.payments:
|
for payment in obj.payments:
|
||||||
payment.to_draft()
|
payment.to_draft()
|
||||||
payment.delete()
|
payment.delete()
|
||||||
|
|
||||||
for inv in obj.invoices:
|
for inv in obj.invoices:
|
||||||
inv.write({
|
inv.write({
|
||||||
'state': 'draft',
|
'state': 'draft',
|
||||||
|
@ -453,11 +452,9 @@ class Shop(Model):
|
||||||
inv.move_id.to_draft()
|
inv.move_id.to_draft()
|
||||||
inv.move_id.delete()
|
inv.move_id.delete()
|
||||||
inv.delete()
|
inv.delete()
|
||||||
|
|
||||||
for picking in obj.pickings:
|
for picking in obj.pickings:
|
||||||
picking.to_draft()
|
picking.to_draft(context=context)
|
||||||
picking.delete()
|
picking.delete()
|
||||||
|
|
||||||
obj.write({
|
obj.write({
|
||||||
'state': 'draft',
|
'state': 'draft',
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue