From dcf852521c0386e8f16a8d41cf52b31a25d64758 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Tue, 17 Mar 2015 16:01:51 +0700 Subject: [PATCH] to draft --- netforce_clinic/models/shop.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/netforce_clinic/models/shop.py b/netforce_clinic/models/shop.py index c664886..143a3d1 100644 --- a/netforce_clinic/models/shop.py +++ b/netforce_clinic/models/shop.py @@ -444,7 +444,6 @@ class Shop(Model): for payment in obj.payments: payment.to_draft() payment.delete() - for inv in obj.invoices: inv.write({ 'state': 'draft', @@ -453,11 +452,9 @@ class Shop(Model): inv.move_id.to_draft() inv.move_id.delete() inv.delete() - for picking in obj.pickings: - picking.to_draft() + picking.to_draft(context=context) picking.delete() - obj.write({ 'state': 'draft', })