mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
replaced set
This commit is contained in:
@@ -133,7 +133,7 @@ class DocType(TransactionBase):
|
||||
def validate(self):
|
||||
self.validate_fiscal_year()
|
||||
# Step 1:=> set status as "Draft"
|
||||
set(self.doc, 'status', 'Draft')
|
||||
webnotes.conn.set(self.doc, 'status', 'Draft')
|
||||
|
||||
# Step 2:=> get Purchase Common Obj
|
||||
pc_obj = get_obj(dt='Purchase Common')
|
||||
@@ -213,7 +213,7 @@ class DocType(TransactionBase):
|
||||
def update_status(self, status):
|
||||
self.check_modified_date()
|
||||
# step 1:=> Set Status
|
||||
set(self.doc,'status',cstr(status))
|
||||
webnotes.conn.set(self.doc,'status',cstr(status))
|
||||
|
||||
# step 2:=> Update Bin
|
||||
self.update_bin(is_submit = (status == 'Submitted') and 1 or 0, is_stopped = 1)
|
||||
@@ -243,7 +243,7 @@ class DocType(TransactionBase):
|
||||
pc_obj.update_last_purchase_rate(self, is_submit = 1)
|
||||
|
||||
# Step 6 :=> Set Status
|
||||
set(self.doc,'status','Submitted')
|
||||
webnotes.conn.set(self.doc,'status','Submitted')
|
||||
|
||||
# On Cancel
|
||||
# -------------------------------------------------------------------------------------------------------
|
||||
@@ -267,7 +267,7 @@ class DocType(TransactionBase):
|
||||
raise Exception
|
||||
|
||||
# 4.Set Status as Cancelled
|
||||
set(self.doc,'status','Cancelled')
|
||||
webnotes.conn.set(self.doc,'status','Cancelled')
|
||||
|
||||
# 5.Update Purchase Requests Pending Qty and accordingly it's Status
|
||||
pc_obj.update_prevdoc_detail(self,is_submit = 0)
|
||||
|
||||
@@ -147,7 +147,7 @@ class DocType:
|
||||
self.validate_fiscal_year()
|
||||
|
||||
# set status as "Draft"
|
||||
set(self.doc, 'status', 'Draft')
|
||||
webnotes.conn.set(self.doc, 'status', 'Draft')
|
||||
|
||||
# Get Purchase Common Obj
|
||||
pc_obj = get_obj(dt='Purchase Common')
|
||||
@@ -183,7 +183,7 @@ class DocType:
|
||||
get_obj('Warehouse', d.warehouse).update_bin(args)
|
||||
|
||||
def on_submit(self):
|
||||
set(self.doc,'status','Submitted')
|
||||
webnotes.conn.set(self.doc,'status','Submitted')
|
||||
self.update_bin(is_submit = 1, is_stopped = 0)
|
||||
|
||||
def check_modified_date(self):
|
||||
@@ -200,7 +200,7 @@ class DocType:
|
||||
self.update_bin(is_submit = (status == 'Submitted') and 1 or 0, is_stopped = 1)
|
||||
|
||||
# Step 2:=> Set status
|
||||
set(self.doc,'status',cstr(status))
|
||||
webnotes.conn.set(self.doc,'status',cstr(status))
|
||||
|
||||
# Step 3:=> Acknowledge User
|
||||
msgprint(self.doc.doctype + ": " + self.doc.name + " has been %s." % ((status == 'Submitted') and 'Unstopped' or cstr(status)) )
|
||||
@@ -219,4 +219,4 @@ class DocType:
|
||||
self.update_bin(is_submit = 0, is_stopped = (cstr(self.doc.status) == 'Stopped') and 1 or 0)
|
||||
|
||||
# Step 5:=> Set Status
|
||||
set(self.doc,'status','Cancelled')
|
||||
webnotes.conn.set(self.doc,'status','Cancelled')
|
||||
|
||||
Reference in New Issue
Block a user