Auto Indent creation when stock reaches re-order level
This commit is contained in:
parent
b40f826c5a
commit
8dd861bda5
7
erpnext/patches/auto_indent.py
Normal file
7
erpnext/patches/auto_indent.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
from webnotes.modules.module_manager import reload_doc
|
||||||
|
reload_doc('manage_account', 'doctype', 'auto_indent')
|
||||||
|
reload_doc('item', 'doctype', 'email_notify')
|
||||||
|
webnotes.conn.sql("update `tabItem` set re_order_level = min_order_qty where re_order_level=''")
|
||||||
|
|
@ -446,7 +446,7 @@ class DocType(TransactionBase):
|
|||||||
if not d[0]:
|
if not d[0]:
|
||||||
msgprint("Message: Please enter Reserved Warehouse for item %s as it is stock item."% d[1])
|
msgprint("Message: Please enter Reserved Warehouse for item %s as it is stock item."% d[1])
|
||||||
raise Exception
|
raise Exception
|
||||||
bin = get_obj('Warehouse', d[0]).update_bin( 0, flt(update_stock) * flt(d[2]), 0, 0, 0, d[1], self.doc.transaction_date)
|
bin = get_obj('Warehouse', d[0]).update_bin( 0, flt(update_stock) * flt(d[2]), 0, 0, 0, d[1], self.doc.transaction_date,doc_type=self.doc.doctype,doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
|
||||||
|
|
||||||
# Gets Items from packing list
|
# Gets Items from packing list
|
||||||
#=================================
|
#=================================
|
||||||
|
@ -5,18 +5,19 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:09',
|
'creation': '2010-08-08 17:09:09',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-12-14 15:08:22',
|
'modified': '2011-12-20 11:14:24',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1323855454',
|
'_last_update': '1323855502',
|
||||||
'allow_copy': 1,
|
'allow_copy': 1,
|
||||||
'allow_email': 1,
|
'allow_email': 1,
|
||||||
'allow_print': 1,
|
'allow_print': 1,
|
||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
|
'default_print_format': 'Standard',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'hide_toolbar': 0,
|
'hide_toolbar': 0,
|
||||||
'in_create': 1,
|
'in_create': 1,
|
||||||
@ -27,7 +28,7 @@
|
|||||||
'section_style': 'Tabbed',
|
'section_style': 'Tabbed',
|
||||||
'server_code_error': ' ',
|
'server_code_error': ' ',
|
||||||
'show_in_menu': 1,
|
'show_in_menu': 1,
|
||||||
'version': 516
|
'version': 515
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -239,6 +240,15 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'doctype': 'DocField',
|
||||||
|
'fieldname': 'auto_indent',
|
||||||
|
'fieldtype': 'Check',
|
||||||
|
'label': 'Raise Indent when stock reaches re-order level'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'default': '1',
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -312,20 +322,6 @@
|
|||||||
'options': 'Role'
|
'options': 'Role'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': 'DocField',
|
|
||||||
'fieldtype': 'Column Break'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': 'DocField',
|
|
||||||
'fieldtype': 'HTML',
|
|
||||||
'label': 'Acccount Info',
|
|
||||||
'options': '<div class="help-box">For more accounting defaults, Open <a href="#!List/Company">Company</a></div>'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
# Please edit this list and import only required elements
|
# Please edit this list and import only required elements
|
||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
from webnotes.utils import cint, cstr, flt, nowdate
|
from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
|
||||||
from webnotes.model.code import get_obj
|
from webnotes.model import db_exists
|
||||||
from webnotes import msgprint
|
from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
|
||||||
|
from webnotes.model.doclist import getlist, copy_doclist
|
||||||
|
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
|
||||||
|
from webnotes import session, form, is_testing, msgprint, errprint
|
||||||
|
|
||||||
|
set = webnotes.conn.set
|
||||||
sql = webnotes.conn.sql
|
sql = webnotes.conn.sql
|
||||||
|
get_value = webnotes.conn.get_value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -18,9 +25,9 @@ class DocType:
|
|||||||
# -------------
|
# -------------
|
||||||
# stock update
|
# stock update
|
||||||
# -------------
|
# -------------
|
||||||
def update_stock(self, actual_qty=0, reserved_qty=0, ordered_qty=0, indented_qty=0, planned_qty=0, dt=None, sle_id='', posting_time='', serial_no = '', is_cancelled = 'No'):
|
def update_stock(self, actual_qty=0, reserved_qty=0, ordered_qty=0, indented_qty=0, planned_qty=0, dt=None, sle_id='', posting_time='', serial_no = '', is_cancelled = 'No',doc_type='',doc_name='',is_amended='No'):
|
||||||
|
if not dt:
|
||||||
if not dt: dt = nowdate()
|
dt = nowdate()
|
||||||
# update the stock values (for current quantities)
|
# update the stock values (for current quantities)
|
||||||
self.doc.actual_qty = flt(self.doc.actual_qty) + flt(actual_qty)
|
self.doc.actual_qty = flt(self.doc.actual_qty) + flt(actual_qty)
|
||||||
self.doc.ordered_qty = flt(self.doc.ordered_qty) + flt(ordered_qty)
|
self.doc.ordered_qty = flt(self.doc.ordered_qty) + flt(ordered_qty)
|
||||||
@ -28,9 +35,10 @@ class DocType:
|
|||||||
self.doc.indented_qty = flt(self.doc.indented_qty) + flt(indented_qty)
|
self.doc.indented_qty = flt(self.doc.indented_qty) + flt(indented_qty)
|
||||||
self.doc.planned_qty = flt(self.doc.planned_qty) + flt(planned_qty)
|
self.doc.planned_qty = flt(self.doc.planned_qty) + flt(planned_qty)
|
||||||
self.doc.projected_qty = flt(self.doc.actual_qty) + flt(self.doc.ordered_qty) + flt(self.doc.indented_qty) + flt(self.doc.planned_qty) - flt(self.doc.reserved_qty)
|
self.doc.projected_qty = flt(self.doc.actual_qty) + flt(self.doc.ordered_qty) + flt(self.doc.indented_qty) + flt(self.doc.planned_qty) - flt(self.doc.reserved_qty)
|
||||||
|
|
||||||
self.doc.save()
|
self.doc.save()
|
||||||
|
if(( flt(actual_qty)<0 or flt(reserved_qty)>0 )and is_cancelled == 'No' and is_amended=='No'):
|
||||||
|
msgprint('is_amended '+is_amended)
|
||||||
|
self.reorder_item(doc_type,doc_name)
|
||||||
|
|
||||||
if actual_qty:
|
if actual_qty:
|
||||||
# check actual qty with total number of serial no
|
# check actual qty with total number of serial no
|
||||||
@ -299,13 +307,52 @@ class DocType:
|
|||||||
|
|
||||||
# item re-order
|
# item re-order
|
||||||
# -------------
|
# -------------
|
||||||
def reorder_item(self):
|
def reorder_item(self,doc_type,doc_name):
|
||||||
#check if re-order is required
|
msgprint(get_value('Manage Account', None, 'auto_indent'))
|
||||||
projected_qty = flt(self.doc.actual_qty) + flt(self.doc.indented_qty) + flt(self.doc.ordered_qty)
|
if get_value('Manage Account', None, 'auto_indent'):
|
||||||
item_reorder_level = sql("select reorder_level from `%sItem` where name = '%s'" % (self.prefix, self.doc.item_code))[0][0] or 0
|
#check if re-order is required
|
||||||
if flt(item_reorder_level) > flt(projected_qty):
|
indent_detail_fields = sql("select re_order_level,item_name,description,brand,item_group,lead_time_days,min_order_qty from tabItem where item_code = %s",(self.doc.item_code),as_dict=1)
|
||||||
msgprint("Item: " + self.doc.item_code + " is to be re-ordered. Indent raised (Not Implemented).")
|
i = indent_detail_fields[0]
|
||||||
|
item_reorder_level = i['re_order_level'] or 0
|
||||||
|
if ((flt(item_reorder_level) > flt(self.doc.projected_qty)) and item_reorder_level) :
|
||||||
|
self.reorder_indent(i,item_reorder_level,doc_type,doc_name)
|
||||||
|
|
||||||
|
|
||||||
|
# Re order Auto Intent Generation
|
||||||
|
def reorder_indent(self,i,item_reorder_level,doc_type,doc_name):
|
||||||
|
indent = Document('Indent')
|
||||||
|
indent.transaction_date = nowdate()
|
||||||
|
indent.naming_series = 'IDT'
|
||||||
|
indent.company = get_defaults()['company']
|
||||||
|
indent.fiscal_year = get_defaults()['fiscal_year']
|
||||||
|
indent.remark = "This is an auto generated Indent. It was raised because the projected quantity has fallen below the minimum re-order level"
|
||||||
|
indent.save(1)
|
||||||
|
indent_obj = get_obj('Indent',indent.name,with_children=1)
|
||||||
|
indent_details_child = addchild(indent_obj.doc,'indent_details','Indent Detail',0)
|
||||||
|
indent_details_child.item_code = self.doc.item_code
|
||||||
|
indent_details_child.uom = self.doc.stock_uom
|
||||||
|
indent_details_child.warehouse = self.doc.warehouse
|
||||||
|
indent_details_child.schedule_date= add_days(nowdate(),i['lead_time_days'])
|
||||||
|
indent_details_child.item_name = i['item_name']
|
||||||
|
indent_details_child.description = i['description']
|
||||||
|
indent_details_child.item_group = i['item_group']
|
||||||
|
if (i['min_order_qty'] < ( flt(item_reorder_level)-flt(self.doc.projected_qty) )):
|
||||||
|
indent_details_child.qty =flt(flt(item_reorder_level)-flt(self.doc.projected_qty))
|
||||||
|
else:
|
||||||
|
indent_details_child.qty = i['min_order_qty']
|
||||||
|
indent_details_child.brand = i['brand']
|
||||||
|
indent_details_child.save()
|
||||||
|
indent_obj = get_obj('Indent',indent.name,with_children=1)
|
||||||
|
indent_obj.validate()
|
||||||
|
set(indent_obj.doc,'docstatus',1)
|
||||||
|
indent_obj.on_submit()
|
||||||
|
msgprint("Item: " + self.doc.item_code + " is to be re-ordered. Indent %s raised.Was generated from %s %s"%(indent.name,doc_type, doc_name ))
|
||||||
|
email_list=[d for d in sql("select parent from tabUserRole where role in ('Purchase Manager','Material Manager') ")]
|
||||||
|
#if getattr():
|
||||||
|
msg='An Indent has been raised for %s: %s on %s '%(doc_type, doc_name, nowdate())
|
||||||
|
msgprint(email_list)
|
||||||
|
sendmail(['nijil@iwebnotes.com'], sender='automail@webnotestech.com', \
|
||||||
|
subject='Auto Indent Generation Notification', parts=[['text/plain',msg]])
|
||||||
# validate
|
# validate
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
|
@ -374,8 +374,7 @@ class DocType(TransactionBase):
|
|||||||
# if prevdoc_doctype = "Sales Order"
|
# if prevdoc_doctype = "Sales Order"
|
||||||
if d[3] < 0 :
|
if d[3] < 0 :
|
||||||
# Reduce Reserved Qty from warehouse
|
# Reduce Reserved Qty from warehouse
|
||||||
bin = get_obj('Warehouse', d[0]).update_bin(0, flt(update_stock) * flt(d[3]), 0, 0, 0, d[1], self.doc.transaction_date)
|
bin = get_obj('Warehouse', d[0]).update_bin(0, flt(update_stock) * flt(d[3]), 0, 0, 0, d[1], self.doc.transaction_date,doc_type=self.doc.doctype,doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
|
||||||
|
|
||||||
# Reduce actual qty from warehouse
|
# Reduce actual qty from warehouse
|
||||||
self.make_sl_entry(d, d[0], - flt(d[2]) , 0, update_stock)
|
self.make_sl_entry(d, d[0], - flt(d[2]) , 0, update_stock)
|
||||||
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
|
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
|
||||||
|
@ -5,18 +5,19 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:05',
|
'creation': '2010-08-08 17:09:05',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-08-18 13:03:31',
|
'modified': '2011-12-20 11:15:42',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1313651083',
|
'_last_update': '1323333040',
|
||||||
'allow_attach': 1,
|
'allow_attach': 1,
|
||||||
'allow_trash': 1,
|
'allow_trash': 1,
|
||||||
'autoname': 'field:item_code',
|
'autoname': 'field:item_code',
|
||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
|
'default_print_format': 'Standard',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'document_type': 'Master',
|
'document_type': 'Master',
|
||||||
'max_attachments': 1,
|
'max_attachments': 1,
|
||||||
@ -28,7 +29,7 @@
|
|||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': '%(item_name)s',
|
'subject': '%(item_name)s',
|
||||||
'tag_fields': 'item_group',
|
'tag_fields': 'item_group',
|
||||||
'version': 161
|
'version': 162
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -62,7 +63,6 @@
|
|||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 1,
|
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material Manager',
|
'role': 'Material Manager',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
@ -75,7 +75,6 @@
|
|||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 2,
|
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'Material Manager',
|
'role': 'Material Manager',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
@ -88,7 +87,6 @@
|
|||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 3,
|
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material User',
|
'role': 'Material User',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
@ -101,7 +99,6 @@
|
|||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 4,
|
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'Material User',
|
'role': 'Material User',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
@ -113,7 +110,6 @@
|
|||||||
'cancel': 1,
|
'cancel': 1,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 5,
|
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'Material Master Manager',
|
'role': 'Material Master Manager',
|
||||||
'write': 1
|
'write': 1
|
||||||
@ -123,7 +119,6 @@
|
|||||||
{
|
{
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 6,
|
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material Master Manager',
|
'role': 'Material Master Manager',
|
||||||
'write': 0
|
'write': 0
|
||||||
@ -134,7 +129,6 @@
|
|||||||
'cancel': 1,
|
'cancel': 1,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 7,
|
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'System Manager',
|
'role': 'System Manager',
|
||||||
'write': 1
|
'write': 1
|
||||||
@ -143,7 +137,6 @@
|
|||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 8,
|
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'System Manager'
|
'role': 'System Manager'
|
||||||
},
|
},
|
||||||
@ -152,7 +145,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 1,
|
|
||||||
'label': 'Item',
|
'label': 'Item',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
@ -164,7 +156,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'trash_reason',
|
'fieldname': 'trash_reason',
|
||||||
'fieldtype': 'Small Text',
|
'fieldtype': 'Small Text',
|
||||||
'idx': 2,
|
|
||||||
'label': 'Trash Reason',
|
'label': 'Trash Reason',
|
||||||
'oldfieldname': 'trash_reason',
|
'oldfieldname': 'trash_reason',
|
||||||
'oldfieldtype': 'Small Text',
|
'oldfieldtype': 'Small Text',
|
||||||
@ -178,7 +169,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_code',
|
'fieldname': 'item_code',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'idx': 3,
|
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'Item Code',
|
'label': 'Item Code',
|
||||||
'oldfieldname': 'item_code',
|
'oldfieldname': 'item_code',
|
||||||
@ -193,7 +183,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_name',
|
'fieldname': 'item_name',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'idx': 4,
|
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Item Name',
|
'label': 'Item Name',
|
||||||
'oldfieldname': 'item_name',
|
'oldfieldname': 'item_name',
|
||||||
@ -210,7 +199,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_group',
|
'fieldname': 'item_group',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 5,
|
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Item Group',
|
'label': 'Item Group',
|
||||||
'oldfieldname': 'item_group',
|
'oldfieldname': 'item_group',
|
||||||
@ -224,7 +212,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldtype': 'HTML',
|
||||||
'idx': 6,
|
|
||||||
'label': 'IGHelp',
|
'label': 'IGHelp',
|
||||||
'oldfieldtype': 'HTML',
|
'oldfieldtype': 'HTML',
|
||||||
'options': '<a href="javascript:cur_frm.cscript.IGHelp();">To manage Item Group, click here</a>',
|
'options': '<a href="javascript:cur_frm.cscript.IGHelp();">To manage Item Group, click here</a>',
|
||||||
@ -237,7 +224,6 @@
|
|||||||
'fieldname': 'brand',
|
'fieldname': 'brand',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'hidden': 0,
|
'hidden': 0,
|
||||||
'idx': 7,
|
|
||||||
'label': 'Brand',
|
'label': 'Brand',
|
||||||
'oldfieldname': 'brand',
|
'oldfieldname': 'brand',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
@ -251,7 +237,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 8,
|
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -260,7 +245,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'description',
|
'fieldname': 'description',
|
||||||
'fieldtype': 'Text',
|
'fieldtype': 'Text',
|
||||||
'idx': 9,
|
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'Description',
|
'label': 'Description',
|
||||||
'oldfieldname': 'description',
|
'oldfieldname': 'description',
|
||||||
@ -276,7 +260,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'description_html',
|
'fieldname': 'description_html',
|
||||||
'fieldtype': 'Text',
|
'fieldtype': 'Text',
|
||||||
'idx': 10,
|
|
||||||
'label': 'Description HTML',
|
'label': 'Description HTML',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -287,7 +270,6 @@
|
|||||||
'description': 'Generates HTML to include image (1st attachment) in the description',
|
'description': 'Generates HTML to include image (1st attachment) in the description',
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Button',
|
'fieldtype': 'Button',
|
||||||
'idx': 11,
|
|
||||||
'label': 'Add Image',
|
'label': 'Add Image',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -296,7 +278,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 12,
|
|
||||||
'label': 'Inventory',
|
'label': 'Inventory',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -309,7 +290,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'stock_uom',
|
'fieldname': 'stock_uom',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 13,
|
|
||||||
'label': 'Default UoM',
|
'label': 'Default UoM',
|
||||||
'oldfieldname': 'stock_uom',
|
'oldfieldname': 'stock_uom',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
@ -326,7 +306,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_stock_item',
|
'fieldname': 'is_stock_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 14,
|
|
||||||
'label': 'Is Stock Item',
|
'label': 'Is Stock Item',
|
||||||
'oldfieldname': 'is_stock_item',
|
'oldfieldname': 'is_stock_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -340,7 +319,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'valuation_method',
|
'fieldname': 'valuation_method',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 15,
|
|
||||||
'label': 'Valuation Method',
|
'label': 'Valuation Method',
|
||||||
'oldfieldname': 'valuation_method',
|
'oldfieldname': 'valuation_method',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -353,7 +331,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_warehouse',
|
'fieldname': 'default_warehouse',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 16,
|
|
||||||
'label': 'Default Warehouse',
|
'label': 'Default Warehouse',
|
||||||
'oldfieldname': 'default_warehouse',
|
'oldfieldname': 'default_warehouse',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
@ -368,7 +345,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'tolerance',
|
'fieldname': 'tolerance',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 17,
|
|
||||||
'label': 'Allowance Percent',
|
'label': 'Allowance Percent',
|
||||||
'oldfieldname': 'tolerance',
|
'oldfieldname': 'tolerance',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -380,7 +356,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 're_order_level',
|
'fieldname': 're_order_level',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 18,
|
|
||||||
'label': 'Re-Order Level',
|
'label': 'Re-Order Level',
|
||||||
'oldfieldname': 're_order_level',
|
'oldfieldname': 're_order_level',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -389,18 +364,11 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
|
||||||
'default': '0.00',
|
|
||||||
'description': 'If stock level for this item has reached the minimum inventory level, system will prompt you to raise an Indent (Purchase Requisition).',
|
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'minimum_inventory_level',
|
'fieldname': 'email_notify',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Check',
|
||||||
'idx': 19,
|
'label': 'Send Email Notification when stock reaches re-order level',
|
||||||
'label': 'Minimum Inventory Level',
|
'permlevel': 0
|
||||||
'oldfieldname': 'minimum_inventory_level',
|
|
||||||
'oldfieldtype': 'Currency',
|
|
||||||
'permlevel': 0,
|
|
||||||
'reqd': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -412,7 +380,6 @@
|
|||||||
'fieldname': 'min_order_qty',
|
'fieldname': 'min_order_qty',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'hidden': 0,
|
'hidden': 0,
|
||||||
'idx': 20,
|
|
||||||
'label': 'Minimum Order Qty',
|
'label': 'Minimum Order Qty',
|
||||||
'oldfieldname': 'min_order_qty',
|
'oldfieldname': 'min_order_qty',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -423,7 +390,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 21,
|
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -437,7 +403,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_asset_item',
|
'fieldname': 'is_asset_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 22,
|
|
||||||
'label': 'Is Asset Item',
|
'label': 'Is Asset Item',
|
||||||
'oldfieldname': 'is_asset_item',
|
'oldfieldname': 'is_asset_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -453,7 +418,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'has_batch_no',
|
'fieldname': 'has_batch_no',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 23,
|
|
||||||
'label': 'Has Batch No',
|
'label': 'Has Batch No',
|
||||||
'oldfieldname': 'has_batch_no',
|
'oldfieldname': 'has_batch_no',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -470,7 +434,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'has_serial_no',
|
'fieldname': 'has_serial_no',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 24,
|
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Has Serial No',
|
'label': 'Has Serial No',
|
||||||
'oldfieldname': 'has_serial_no',
|
'oldfieldname': 'has_serial_no',
|
||||||
@ -485,7 +448,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'warranty_period',
|
'fieldname': 'warranty_period',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'idx': 25,
|
|
||||||
'label': 'Warranty Period (in days)',
|
'label': 'Warranty Period (in days)',
|
||||||
'oldfieldname': 'warranty_period',
|
'oldfieldname': 'warranty_period',
|
||||||
'oldfieldtype': 'Data',
|
'oldfieldtype': 'Data',
|
||||||
@ -497,7 +459,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'end_of_life',
|
'fieldname': 'end_of_life',
|
||||||
'fieldtype': 'Date',
|
'fieldtype': 'Date',
|
||||||
'idx': 26,
|
|
||||||
'label': 'End of Life',
|
'label': 'End of Life',
|
||||||
'oldfieldname': 'end_of_life',
|
'oldfieldname': 'end_of_life',
|
||||||
'oldfieldtype': 'Date',
|
'oldfieldtype': 'Date',
|
||||||
@ -509,7 +470,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'nett_weight',
|
'fieldname': 'nett_weight',
|
||||||
'fieldtype': 'Float',
|
'fieldtype': 'Float',
|
||||||
'idx': 27,
|
|
||||||
'label': 'Nett Weight',
|
'label': 'Nett Weight',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -519,7 +479,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'gross_weight',
|
'fieldname': 'gross_weight',
|
||||||
'fieldtype': 'Float',
|
'fieldtype': 'Float',
|
||||||
'idx': 28,
|
|
||||||
'label': 'Gross Weight',
|
'label': 'Gross Weight',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -529,7 +488,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'weight_uom',
|
'fieldname': 'weight_uom',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 29,
|
|
||||||
'label': 'Weight UOM',
|
'label': 'Weight UOM',
|
||||||
'options': 'UOM',
|
'options': 'UOM',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -540,7 +498,6 @@
|
|||||||
'colour': 'White:FFF',
|
'colour': 'White:FFF',
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 30,
|
|
||||||
'label': 'Purchase Details',
|
'label': 'Purchase Details',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -554,7 +511,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_purchase_item',
|
'fieldname': 'is_purchase_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 31,
|
|
||||||
'label': 'Is Purchase Item',
|
'label': 'Is Purchase Item',
|
||||||
'oldfieldname': 'is_purchase_item',
|
'oldfieldname': 'is_purchase_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -570,7 +526,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'lead_time_days',
|
'fieldname': 'lead_time_days',
|
||||||
'fieldtype': 'Int',
|
'fieldtype': 'Int',
|
||||||
'idx': 32,
|
|
||||||
'label': 'Lead Time Days',
|
'label': 'Lead Time Days',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'lead_time_days',
|
'oldfieldname': 'lead_time_days',
|
||||||
@ -585,7 +540,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'purchase_account',
|
'fieldname': 'purchase_account',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 33,
|
|
||||||
'label': 'Default Expense Account',
|
'label': 'Default Expense Account',
|
||||||
'oldfieldname': 'purchase_account',
|
'oldfieldname': 'purchase_account',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
@ -601,7 +555,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'cost_center',
|
'fieldname': 'cost_center',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 34,
|
|
||||||
'label': 'Default Cost Center',
|
'label': 'Default Cost Center',
|
||||||
'oldfieldname': 'cost_center',
|
'oldfieldname': 'cost_center',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
@ -616,7 +569,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'buying_cost',
|
'fieldname': 'buying_cost',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 35,
|
|
||||||
'label': 'Buying Cost',
|
'label': 'Buying Cost',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'buying_cost',
|
'oldfieldname': 'buying_cost',
|
||||||
@ -630,7 +582,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'last_purchase_rate',
|
'fieldname': 'last_purchase_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 36,
|
|
||||||
'label': 'Last Purchase Rate',
|
'label': 'Last Purchase Rate',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'last_purchase_rate',
|
'oldfieldname': 'last_purchase_rate',
|
||||||
@ -643,7 +594,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'standard_rate',
|
'fieldname': 'standard_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 37,
|
|
||||||
'label': 'Standard Rate',
|
'label': 'Standard Rate',
|
||||||
'oldfieldname': 'standard_rate',
|
'oldfieldname': 'standard_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -654,7 +604,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 38,
|
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -665,7 +614,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'uom_conversion_details',
|
'fieldname': 'uom_conversion_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 39,
|
|
||||||
'label': 'UOM Conversion Details',
|
'label': 'UOM Conversion Details',
|
||||||
'oldfieldname': 'uom_conversion_details',
|
'oldfieldname': 'uom_conversion_details',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -677,7 +625,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 40,
|
|
||||||
'label': 'Sales Details',
|
'label': 'Sales Details',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -691,7 +638,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_sales_item',
|
'fieldname': 'is_sales_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 41,
|
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Is Sales Item',
|
'label': 'Is Sales Item',
|
||||||
'oldfieldname': 'is_sales_item',
|
'oldfieldname': 'is_sales_item',
|
||||||
@ -709,7 +655,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_service_item',
|
'fieldname': 'is_service_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 42,
|
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Is Service Item',
|
'label': 'Is Service Item',
|
||||||
'oldfieldname': 'is_service_item',
|
'oldfieldname': 'is_service_item',
|
||||||
@ -727,7 +672,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_sample_item',
|
'fieldname': 'is_sample_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 43,
|
|
||||||
'label': 'Allow Samples',
|
'label': 'Allow Samples',
|
||||||
'oldfieldname': 'is_sample_item',
|
'oldfieldname': 'is_sample_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -741,7 +685,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'max_discount',
|
'fieldname': 'max_discount',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 44,
|
|
||||||
'label': 'Max Discount (%)',
|
'label': 'Max Discount (%)',
|
||||||
'oldfieldname': 'max_discount',
|
'oldfieldname': 'max_discount',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -753,7 +696,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_income_account',
|
'fieldname': 'default_income_account',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 45,
|
|
||||||
'label': 'Default Income Account',
|
'label': 'Default Income Account',
|
||||||
'options': 'Account',
|
'options': 'Account',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -764,7 +706,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_sales_cost_center',
|
'fieldname': 'default_sales_cost_center',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 46,
|
|
||||||
'label': 'Cost Center',
|
'label': 'Cost Center',
|
||||||
'options': 'Cost Center',
|
'options': 'Cost Center',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -776,7 +717,6 @@
|
|||||||
'fieldname': 'sales_rate',
|
'fieldname': 'sales_rate',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 47,
|
|
||||||
'label': 'Sales Rate',
|
'label': 'Sales Rate',
|
||||||
'oldfieldname': 'sales_rate',
|
'oldfieldname': 'sales_rate',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
@ -787,7 +727,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 48,
|
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': '50%'
|
'width': '50%'
|
||||||
@ -800,7 +739,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'ref_rate_details',
|
'fieldname': 'ref_rate_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 49,
|
|
||||||
'label': 'Ref Rate Details',
|
'label': 'Ref Rate Details',
|
||||||
'oldfieldname': 'ref_rate_details',
|
'oldfieldname': 'ref_rate_details',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -814,7 +752,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_customer_details',
|
'fieldname': 'item_customer_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 50,
|
|
||||||
'label': 'Customer Codes',
|
'label': 'Customer Codes',
|
||||||
'options': 'Item Customer Detail',
|
'options': 'Item Customer Detail',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -824,7 +761,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 51,
|
|
||||||
'label': 'Item Tax',
|
'label': 'Item Tax',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -835,7 +771,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_tax',
|
'fieldname': 'item_tax',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 52,
|
|
||||||
'label': 'Item Tax1',
|
'label': 'Item Tax1',
|
||||||
'oldfieldname': 'item_tax',
|
'oldfieldname': 'item_tax',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -847,7 +782,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 53,
|
|
||||||
'label': 'Inspection Criteria',
|
'label': 'Inspection Criteria',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -859,7 +793,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'inspection_required',
|
'fieldname': 'inspection_required',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 54,
|
|
||||||
'label': 'Inspection Required',
|
'label': 'Inspection Required',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
'oldfieldname': 'inspection_required',
|
'oldfieldname': 'inspection_required',
|
||||||
@ -874,7 +807,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'item_specification_details',
|
'fieldname': 'item_specification_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 55,
|
|
||||||
'label': 'Item Specification Detail',
|
'label': 'Item Specification Detail',
|
||||||
'oldfieldname': 'item_specification_details',
|
'oldfieldname': 'item_specification_details',
|
||||||
'oldfieldtype': 'Table',
|
'oldfieldtype': 'Table',
|
||||||
@ -886,7 +818,6 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 56,
|
|
||||||
'label': 'Manufacturing',
|
'label': 'Manufacturing',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -900,7 +831,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_manufactured_item',
|
'fieldname': 'is_manufactured_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 57,
|
|
||||||
'label': 'Allow Bill of Materials',
|
'label': 'Allow Bill of Materials',
|
||||||
'oldfieldname': 'is_manufactured_item',
|
'oldfieldname': 'is_manufactured_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -915,7 +845,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'default_bom',
|
'fieldname': 'default_bom',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 58,
|
|
||||||
'label': 'Default BOM',
|
'label': 'Default BOM',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'oldfieldname': 'default_bom',
|
'oldfieldname': 'default_bom',
|
||||||
@ -932,7 +861,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_pro_applicable',
|
'fieldname': 'is_pro_applicable',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 59,
|
|
||||||
'label': 'Allow Production Order',
|
'label': 'Allow Production Order',
|
||||||
'oldfieldname': 'is_pro_applicable',
|
'oldfieldname': 'is_pro_applicable',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -949,7 +877,6 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'is_sub_contracted_item',
|
'fieldname': 'is_sub_contracted_item',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 60,
|
|
||||||
'label': 'Is Sub Contracted Item',
|
'label': 'Is Sub Contracted Item',
|
||||||
'oldfieldname': 'is_sub_contracted_item',
|
'oldfieldname': 'is_sub_contracted_item',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
@ -964,8 +891,8 @@
|
|||||||
'fieldname': 'file_list',
|
'fieldname': 'file_list',
|
||||||
'fieldtype': 'Text',
|
'fieldtype': 'Text',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 61,
|
|
||||||
'label': 'File List',
|
'label': 'File List',
|
||||||
|
'no_copy': 1,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
},
|
},
|
||||||
@ -976,7 +903,6 @@
|
|||||||
'fieldname': 'customer_code',
|
'fieldname': 'customer_code',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': 'Data',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'idx': 62,
|
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Customer Code',
|
'label': 'Customer Code',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
|
@ -224,7 +224,7 @@ class DocType:
|
|||||||
if v["actual_qty"]:
|
if v["actual_qty"]:
|
||||||
sle_id = self.make_entry(v)
|
sle_id = self.make_entry(v)
|
||||||
|
|
||||||
get_obj('Warehouse', v["warehouse"]).update_bin(flt(v["actual_qty"]), 0, 0, 0, 0, v["item_code"], v["posting_date"], sle_id, v["posting_time"], '', v["is_cancelled"])
|
get_obj('Warehouse', v["warehouse"]).update_bin(flt(v["actual_qty"]), 0, 0, 0, 0, v["item_code"], v["posting_date"], sle_id, v["posting_time"], '', v["is_cancelled"],v["voucher_type"],v["voucher_no"])
|
||||||
|
|
||||||
|
|
||||||
# -----------
|
# -----------
|
||||||
|
@ -52,12 +52,12 @@ class DocType:
|
|||||||
|
|
||||||
# update bin
|
# update bin
|
||||||
# ----------
|
# ----------
|
||||||
def update_bin(self, actual_qty, reserved_qty, ordered_qty, indented_qty, planned_qty, item_code, dt, sle_id = '',posting_time = '', serial_no = '', is_cancelled = 'No'):
|
def update_bin(self, actual_qty, reserved_qty, ordered_qty, indented_qty, planned_qty, item_code, dt, sle_id = '',posting_time = '', serial_no = '', is_cancelled = 'No',doc_type='',doc_name='',is_amended='No'):
|
||||||
self.validate_asset(item_code)
|
self.validate_asset(item_code)
|
||||||
it_det = get_value('Item', item_code, 'is_stock_item')
|
it_det = get_value('Item', item_code, 'is_stock_item')
|
||||||
if it_det and it_det == 'Yes':
|
if it_det and it_det == 'Yes':
|
||||||
bin = self.get_bin(item_code)
|
bin = self.get_bin(item_code)
|
||||||
bin.update_stock(actual_qty, reserved_qty, ordered_qty, indented_qty, planned_qty, dt, sle_id, posting_time, serial_no, is_cancelled)
|
bin.update_stock(actual_qty, reserved_qty, ordered_qty, indented_qty, planned_qty, dt, sle_id, posting_time, serial_no, is_cancelled,doc_type,doc_name,is_amended)
|
||||||
return bin
|
return bin
|
||||||
else:
|
else:
|
||||||
msgprint("[Stock Update] Ignored %s since it is not a stock item" % item_code)
|
msgprint("[Stock Update] Ignored %s since it is not a stock item" % item_code)
|
||||||
|
Loading…
Reference in New Issue
Block a user