From 1d5cab87452567499410c5598faf97cc8e86c4da Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 29 Aug 2011 13:16:52 +0530 Subject: [PATCH] is_cancelled always no in sle if voucher type = serial no --- patches/patch.py | 4 +++- stock/doctype/serial_no/serial_no.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/patch.py b/patches/patch.py index fb26ecd19b..9417ea2d74 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 347 +last_patch = 348 #------------------------------------------- def execute(patch_no): @@ -258,3 +258,5 @@ def execute(patch_no): reload_doc('core', 'doctype', 'profile') elif patch_no == 347: sql("delete from `tabField Mapper Detail` where from_field = to_field and map = 'Yes' and ifnull(checking_operator, '') = ''") + elif patch_no == 348: + sql("update `tabStock Ledger Entry` set is_cancelled = 'No' where voucher_type = 'Serial No'") diff --git a/stock/doctype/serial_no/serial_no.py b/stock/doctype/serial_no/serial_no.py index 02ce0f804e..b242edbd26 100644 --- a/stock/doctype/serial_no/serial_no.py +++ b/stock/doctype/serial_no/serial_no.py @@ -75,7 +75,7 @@ class DocType(TransactionBase): 'incoming_rate' : self.doc.purchase_rate, 'company' : self.doc.company, 'fiscal_year' : self.doc.fiscal_year, - 'is_cancelled' : 'No', + 'is_cancelled' : 'No', # is_cancelled is always 'No' because while deleted it can not find creation entry if it not created directly, voucher no != serial no. 'batch_no' : '', 'serial_no' : self.doc.name }]