diff --git a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js index d243717806..febc0ee996 100755 --- a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js +++ b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js @@ -16,8 +16,8 @@ report.customize_filters = function() { this.hide_all_filters(); - filter_list = ['From Voucher Date', 'To Voucher Date', 'Debit To', 'From Posting Date', 'To Posting Date'] - for(var i=0;iTo manage Item Groups, click here' + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'IGHelp', + 'options': u'To manage Item Groups, click here' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_stock_uom', - 'fieldtype': 'Link', - 'label': 'Default Stock UOM', - 'options': 'UOM' + 'doctype': u'DocField', + 'fieldname': u'default_stock_uom', + 'fieldtype': u'Link', + 'label': u'Default Stock UOM', + 'options': u'UOM' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_valuation_method', - 'fieldtype': 'Select', - 'label': 'Default Valuation Method', - 'options': 'FIFO\nMoving Average' + 'doctype': u'DocField', + 'fieldname': u'default_valuation_method', + 'fieldtype': u'Select', + 'label': u'Default Valuation Method', + 'options': u'FIFO\nMoving Average' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_warehouse_type', - 'fieldtype': 'Link', - 'label': 'Default Warehouse Type', - 'options': 'Warehouse Type' + 'colour': u'White:FFF', + 'description': u'Applicable only if valuation method is moving average', + 'doctype': u'DocField', + 'fieldname': u'allow_negative_stock', + 'fieldtype': u'Check', + 'label': u'Allow Negative Stock' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'auto_indent', - 'fieldtype': 'Check', - 'label': 'Raise Indent when stock reaches re-order level' + 'doctype': u'DocField', + 'fieldname': u'default_warehouse_type', + 'fieldtype': u'Link', + 'label': u'Default Warehouse Type', + 'options': u'Warehouse Type' }, # DocField { - 'default': '1', - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'width': '50%' + 'doctype': u'DocField', + 'fieldname': u'auto_indent', + 'fieldtype': u'Check', + 'label': u'Raise Indent when stock reaches re-order level' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Percentage you are allowed to receive or deliver more against the quantity ordered.

For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units

', - 'doctype': 'DocField', - 'fieldname': 'tolerance', - 'fieldtype': 'Currency', - 'label': 'Allowance Percent' + 'default': u'1', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Stock level frozen up to this date, nobody can do / modify entry except authorized person', - 'doctype': 'DocField', - 'fieldname': 'stock_frozen_upto', - 'fieldtype': 'Date', - 'label': 'Stock Frozen Upto' + 'colour': u'White:FFF', + 'description': u'Percentage you are allowed to receive or deliver more against the quantity ordered.

For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units

', + 'doctype': u'DocField', + 'fieldname': u'tolerance', + 'fieldtype': u'Currency', + 'label': u'Allowance Percent' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Users with this role are allowed to do / modify stock entry before frozen date', - 'doctype': 'DocField', - 'fieldname': 'stock_auth_role', - 'fieldtype': 'Link', - 'label': 'Authorized Role (Frozen Entry)', - 'options': 'Role' + 'colour': u'White:FFF', + 'description': u'Stock level frozen up to this date, nobody can do / modify entry except authorized person', + 'doctype': u'DocField', + 'fieldname': u'stock_frozen_upto', + 'fieldtype': u'Date', + 'label': u'Stock Frozen Upto' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Accounts' + 'colour': u'White:FFF', + 'description': u'Users with this role are allowed to do / modify stock entry before frozen date', + 'doctype': u'DocField', + 'fieldname': u'stock_auth_role', + 'fieldtype': u'Link', + 'label': u'Authorized Role (Frozen Entry)', + 'options': u'Role' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Accounting entry frozen up to this date, nobody can do / modify entry except authorized person', - 'doctype': 'DocField', - 'fieldname': 'acc_frozen_upto', - 'fieldtype': 'Date', - 'label': 'Accounts Frozen Upto' + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Accounts' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Users with this role are allowed to do / modify accounting entry before frozen date', - 'doctype': 'DocField', - 'fieldname': 'bde_auth_role', - 'fieldtype': 'Link', - 'label': 'Authourized Role (Frozen Entry)', - 'options': 'Role' + 'colour': u'White:FFF', + 'description': u'Accounting entry frozen up to this date, nobody can do / modify entry except authorized person', + 'doctype': u'DocField', + 'fieldname': u'acc_frozen_upto', + 'fieldtype': u'Date', + 'label': u'Accounts Frozen Upto' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'credit_controller', - 'fieldtype': 'Link', - 'label': 'Credit Controller', - 'options': 'Role' + 'colour': u'White:FFF', + 'description': u'Users with this role are allowed to do / modify accounting entry before frozen date', + 'doctype': u'DocField', + 'fieldname': u'bde_auth_role', + 'fieldtype': u'Link', + 'label': u'Authourized Role (Frozen Entry)', + 'options': u'Role' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break' + 'doctype': u'DocField', + 'fieldname': u'credit_controller', + 'fieldtype': u'Link', + 'label': u'Credit Controller', + 'options': u'Role' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Account Info', - 'options': '
For more accounting defaults, Open Company
' + 'doctype': u'DocField', + 'fieldtype': u'Column Break' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Selling' + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Account Info', + 'options': u'
For more accounting defaults, Open Company
' }, # DocField { - 'colour': 'White:FFF', - 'default': 'Customer Name', - 'doctype': 'DocField', - 'fieldname': 'cust_master_name', - 'fieldtype': 'Select', - 'label': 'Customer Master created by ', - 'options': 'Customer Name\nNaming Series' + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Selling' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_customer_group', - 'fieldtype': 'Link', - 'label': 'Default Customer Group', - 'options': 'Customer Group' + 'colour': u'White:FFF', + 'default': u'Customer Name', + 'doctype': u'DocField', + 'fieldname': u'cust_master_name', + 'fieldtype': u'Select', + 'label': u'Customer Master created by ', + 'options': u'\nCustomer Name\nNaming Series' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'CGHelp', - 'options': 'To manage Customer Groups, click here' + 'doctype': u'DocField', + 'fieldname': u'default_customer_group', + 'fieldtype': u'Link', + 'label': u'Default Customer Group', + 'options': u'Customer Group' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_territory', - 'fieldtype': 'Link', - 'label': 'Default Territory', - 'options': 'Territory' + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'CGHelp', + 'options': u'To manage Customer Groups, click here' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'TerritoryHelp', - 'options': 'To manage Territory, click here' + 'doctype': u'DocField', + 'fieldname': u'default_territory', + 'fieldtype': u'Link', + 'label': u'Default Territory', + 'options': u'Territory' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'width': '50%' + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'TerritoryHelp', + 'options': u'To manage Territory, click here' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_price_list', - 'fieldtype': 'Link', - 'label': 'Default Price List', - 'options': 'Price List' + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_price_list_currency', - 'fieldtype': 'Link', - 'label': 'Default Price List Currency', - 'options': 'Currency' + 'doctype': u'DocField', + 'fieldname': u'default_price_list', + 'fieldtype': u'Link', + 'label': u'Default Price List', + 'options': u'Price List' }, # DocField { - 'colour': 'White:FFF', - 'default': 'No', - 'doctype': 'DocField', - 'fieldname': 'so_required', - 'fieldtype': 'Select', - 'label': 'Sales Order Required', - 'options': 'No\nYes' + 'doctype': u'DocField', + 'fieldname': u'default_price_list_currency', + 'fieldtype': u'Link', + 'label': u'Default Price List Currency', + 'options': u'Currency' }, # DocField { - 'colour': 'White:FFF', - 'default': 'No', - 'doctype': 'DocField', - 'fieldname': 'dn_required', - 'fieldtype': 'Select', - 'label': 'Delivery Note Required', - 'options': 'No\nYes' + 'colour': u'White:FFF', + 'default': u'No', + 'doctype': u'DocField', + 'fieldname': u'so_required', + 'fieldtype': u'Select', + 'label': u'Sales Order Required', + 'options': u'No\nYes' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Buying' + 'colour': u'White:FFF', + 'default': u'No', + 'doctype': u'DocField', + 'fieldname': u'dn_required', + 'fieldtype': u'Select', + 'label': u'Delivery Note Required', + 'options': u'No\nYes' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'default_supplier_type', - 'fieldtype': 'Link', - 'label': 'Default Supplier Type', - 'options': 'Supplier Type' + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Buying' }, # DocField { - 'colour': 'White:FFF', - 'default': 'Supplier Name', - 'doctype': 'DocField', - 'fieldname': 'supp_master_name', - 'fieldtype': 'Select', - 'label': 'Supplier Master created by ', - 'options': 'Supplier Name\nNaming Series' + 'doctype': u'DocField', + 'fieldname': u'default_supplier_type', + 'fieldtype': u'Link', + 'label': u'Default Supplier Type', + 'options': u'Supplier Type' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'width': '50%' + 'colour': u'White:FFF', + 'default': u'Supplier Name', + 'doctype': u'DocField', + 'fieldname': u'supp_master_name', + 'fieldtype': u'Select', + 'label': u'Supplier Master created by ', + 'options': u'Supplier Name\nNaming Series' }, # DocField { - 'colour': 'White:FFF', - 'default': 'No', - 'doctype': 'DocField', - 'fieldname': 'po_required', - 'fieldtype': 'Select', - 'label': 'Purchase Order Required', - 'options': 'No\nYes' + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'default': 'No', - 'doctype': 'DocField', - 'fieldname': 'pr_required', - 'fieldtype': 'Select', - 'label': 'Purchase Receipt Required', - 'options': 'No\nYes' + 'colour': u'White:FFF', + 'default': u'No', + 'doctype': u'DocField', + 'fieldname': u'po_required', + 'fieldtype': u'Select', + 'label': u'Purchase Order Required', + 'options': u'No\nYes' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'HR', - 'options': '
HR
' + 'colour': u'White:FFF', + 'default': u'No', + 'doctype': u'DocField', + 'fieldname': u'pr_required', + 'fieldtype': u'Select', + 'label': u'Purchase Receipt Required', + 'options': u'No\nYes' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Employee record is created using selected field. ', - 'doctype': 'DocField', - 'fieldname': 'emp_created_by', - 'fieldtype': 'Select', - 'label': 'Employee Records to be created by ', - 'options': '\nNaming Series\nEmployee Number' + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'HR', + 'options': u'
HR
' + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Employee record is created using selected field. ', + 'doctype': u'DocField', + 'fieldname': u'emp_created_by', + 'fieldtype': u'Select', + 'label': u'Employee Records to be created by ', + 'options': u'\nNaming Series\nEmployee Number' } ] \ No newline at end of file diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index de2d1315c4..8e1c949b6d 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -183,18 +183,20 @@ class DocType: # get moving average inventory values # ------------------------------------ def get_moving_average_inventory_values(self, val_rate, in_rate, opening_qty, actual_qty, is_cancelled): + #msgprint(actual_qty) if flt(in_rate) <= 0: # In case of delivery/stock issue in_rate = 0 or wrong incoming rate in_rate = val_rate - if in_rate and val_rate == 0: # First entry - val_rate = in_rate # val_rate is same as previous entry if : # 1. actual qty is negative(delivery note / stock entry) # 2. cancelled entry # 3. val_rate is negative # Otherwise it will be calculated as per moving average - elif actual_qty > 0 and (opening_qty + actual_qty) > 0 and is_cancelled == 'No' and ((opening_qty * val_rate) + (actual_qty * in_rate)) > 0: + if actual_qty > 0 and (opening_qty + actual_qty) > 0 and is_cancelled == 'No' and ((opening_qty * val_rate) + (actual_qty * in_rate)) > 0: + opening_qty = opening_qty > 0 and opening_qty or 0 val_rate = ((opening_qty *val_rate) + (actual_qty * in_rate)) / (opening_qty + actual_qty) + elif (opening_qty + actual_qty) <= 0: + val_rate = 0 stock_val = val_rate return val_rate, stock_val @@ -248,8 +250,10 @@ class DocType: # get stock value # ---------------- def get_stock_value(self, val_method, cqty, stock_val, serial_nos): - if val_method == 'Moving Average' or serial_nos: + if serial_nos: stock_val = flt(stock_val) * flt(cqty) + elif val_method == 'Moving Average': + stock_val = flt(cqty) > 0 and flt(stock_val) * flt(cqty) or 0 elif val_method == 'FIFO': stock_val = sum([flt(d[0])*flt(d[1]) for d in self.fcfs_bal]) return stock_val @@ -277,6 +281,11 @@ class DocType: # get valuation method val_method = get_obj('Valuation Control').get_valuation_method(self.doc.item_code) + # allow negative stock (only for moving average method) + from webnotes.utils import get_defaults + allow_negative_stock = get_defaults().get('allow_negative_stock', 0) + + # recalculate the balances for all stock ledger entries # after the prev sle sll = sql(""" @@ -289,10 +298,10 @@ class DocType: order by timestamp(posting_date, posting_time) asc, name asc""", \ (self.doc.item_code, self.doc.warehouse, \ prev_sle.get('posting_date','1900-01-01'), prev_sle.get('posting_time', '12:00')), as_dict = 1) - for sle in sll: # block if stock level goes negative on any date - self.validate_negative_stock(cqty, sle) + if val_method != 'Moving Average' or flt(allow_negative_stock) == 0: + self.validate_negative_stock(cqty, sle) stock_val, in_rate = 0, sle['incoming_rate'] # IN serial_nos = sle["serial_no"] and ("'"+"', '".join(cstr(sle["serial_no"]).split('\n')) \ diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 3d8a1011fc..aeccc43fa1 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -321,7 +321,6 @@ class DocType(TransactionBase): def on_submit(self): self.validate_packed_qty() set(self.doc, 'message', 'Items against your Order #%s have been delivered. Delivery #%s: ' % (self.doc.po_no, self.doc.name)) - self.check_qty_in_stock() # Check for Approving Authority get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self) sl_obj = get_obj("Stock Ledger") @@ -360,14 +359,6 @@ class DocType(TransactionBase): webnotes.msgprint("Packing Error:\n" + err_msg, raise_exception=1) - # *********** Checks whether actual quantity is present in warehouse ************* - def check_qty_in_stock(self): - for d in getlist(self.doclist, 'packing_details'): - is_stock_item = sql("select is_stock_item from `tabItem` where name = '%s'" % d.item_code)[0][0] - if is_stock_item == 'Yes' and d.warehouse and flt(d.qty) > flt(d.actual_qty): - msgprint("For Item: " + cstr(d.item_code) + " at Warehouse: " + cstr(d.warehouse) + " Quantity: " + cstr(d.qty) +" is not Available. (Must be less than or equal to " + cstr(d.actual_qty) + " )") - raise Exception, "Validation Error" - # ON CANCEL diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py index 9b421d3e96..36f019bbae 100644 --- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py +++ b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py @@ -42,9 +42,9 @@ class DocType : def pull_item_details(self): if self.doc.return_type == 'Sales Return': if self.doc.delivery_note_no: - det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.basic_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no) + det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.export_rate * t3.conversion_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no) elif self.doc.sales_invoice_no: - det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.basic_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no) + det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.export_rate * t2.conversion_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no) elif self.doc.return_type == 'Purchase Return' and self.doc.purchase_receipt_no: det = sql("select t1.name, t1.item_code, t1.description, t1.received_qty, t1.uom, t1.purchase_rate, t2.supplier, t2.supplier_name, t2.supplier_address, t1.serial_no, t1.batch_no from `tabPurchase Receipt Detail` t1, `tabPurchase Receipt` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.purchase_receipt_no) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index a6fbba02b0..a1cec399b0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -265,9 +265,6 @@ class DocType(TransactionBase): if flt(d.transfer_qty) <= 0: msgprint("Transfer Quantity can not be less than or equal to zero at Row No " + cstr(d.idx)) raise Exception - if d.s_warehouse and flt(d.transfer_qty) > flt(d.actual_qty): - msgprint("Transfer Quantity is more than Available Qty at Row No " + cstr(d.idx)) - raise Exception def calc_amount(self): diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt index bef15f8e2a..b9d982b883 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt @@ -3,19 +3,18 @@ # These values are common in all dictionaries { - 'creation': '2010-08-08 17:09:25', + 'creation': '2009-05-12 16:46:51', 'docstatus': 0, - 'modified': '2012-03-21 14:04:38', + 'modified': '2012-04-18 11:59:34', 'modified_by': u'Administrator', 'owner': u'Administrator' }, # These values are common for all DocType { - '_last_update': u'1322549701', + '_last_update': u'1334728856', 'autoname': u'SLE/.########', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_toolbar': 1, 'in_create': 1, @@ -24,7 +23,7 @@ 'section_style': u'Simple', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 53 + 'version': 54 }, # These values are common for all DocField @@ -38,17 +37,12 @@ # These values are common for all DocPerm { - 'amend': 0, - 'cancel': 0, - 'create': 0, 'doctype': u'DocPerm', 'name': '__common__', 'parent': u'Stock Ledger Entry', 'parentfield': u'permissions', 'parenttype': u'DocType', - 'read': 1, - 'submit': 0, - 'write': 0 + 'read': 1 }, # DocType, Stock Ledger Entry @@ -57,20 +51,6 @@ 'name': u'Stock Ledger Entry' }, - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'System Manager' - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Material User' - }, - # DocPerm { 'doctype': u'DocPerm', @@ -80,9 +60,26 @@ # DocPerm { + 'amend': 0, + 'cancel': 0, + 'create': 0, 'doctype': u'DocPerm', 'permlevel': 1, - 'role': u'Material User' + 'role': u'Material User', + 'submit': 0, + 'write': 0 + }, + + # DocPerm + { + 'amend': 0, + 'cancel': 0, + 'create': 0, + 'doctype': u'DocPerm', + 'permlevel': 0, + 'role': u'Material User', + 'submit': 0, + 'write': 0 }, # DocPerm @@ -97,12 +94,14 @@ 'doctype': u'DocField', 'fieldname': u'item_code', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 1, 'label': u'Item Code', 'oldfieldname': u'item_code', 'oldfieldtype': u'Link', 'options': u'Item', 'permlevel': 1, + 'print_hide': 0, 'reqd': 0, 'search_index': 1, 'width': u'100px' @@ -125,10 +124,13 @@ 'doctype': u'DocField', 'fieldname': u'batch_no', 'fieldtype': u'Data', + 'hidden': 0, 'label': u'Batch No', 'oldfieldname': u'batch_no', 'oldfieldtype': u'Data', - 'permlevel': 0 + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0 }, # DocField @@ -136,12 +138,15 @@ 'doctype': u'DocField', 'fieldname': u'warehouse', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 1, 'label': u'Warehouse', 'oldfieldname': u'warehouse', 'oldfieldtype': u'Link', 'options': u'Warehouse', 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, 'search_index': 1, 'width': u'100px' }, @@ -151,13 +156,16 @@ 'doctype': u'DocField', 'fieldname': u'warehouse_type', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 1, 'label': u'Warehouse Type', 'oldfieldname': u'warehouse_type', 'oldfieldtype': u'Select', - 'options': u'link:Warehouse Type', + 'options': u'\nStores', 'permlevel': 1, - 'search_index': 0 + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1 }, # DocField @@ -166,11 +174,13 @@ 'doctype': u'DocField', 'fieldname': u'posting_date', 'fieldtype': u'Date', + 'hidden': 0, 'in_filter': 1, 'label': u'Posting Date', 'oldfieldname': u'posting_date', 'oldfieldtype': u'Date', 'permlevel': 1, + 'print_hide': 0, 'reqd': 0, 'search_index': 1, 'width': u'100px' @@ -181,11 +191,14 @@ 'doctype': u'DocField', 'fieldname': u'posting_time', 'fieldtype': u'Time', + 'hidden': 0, 'in_filter': 0, 'label': u'Posting Time', 'oldfieldname': u'posting_time', 'oldfieldtype': u'Time', 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, 'search_index': 0, 'width': u'100px' }, @@ -196,12 +209,15 @@ 'doctype': u'DocField', 'fieldname': u'transaction_date', 'fieldtype': u'Date', + 'hidden': 0, 'in_filter': 1, 'label': u'Transaction Date', 'oldfieldname': u'transaction_date', 'oldfieldtype': u'Date', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'100px' }, @@ -210,12 +226,15 @@ 'doctype': u'DocField', 'fieldname': u'voucher_type', 'fieldtype': u'Data', + 'hidden': 0, 'in_filter': 1, 'label': u'Voucher Type', 'oldfieldname': u'voucher_type', 'oldfieldtype': u'Data', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'150px' }, @@ -224,12 +243,15 @@ 'doctype': u'DocField', 'fieldname': u'voucher_no', 'fieldtype': u'Data', + 'hidden': 0, 'in_filter': 1, 'label': u'Voucher No', 'oldfieldname': u'voucher_no', 'oldfieldtype': u'Data', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'150px' }, @@ -238,10 +260,13 @@ 'doctype': u'DocField', 'fieldname': u'voucher_detail_no', 'fieldtype': u'Data', + 'hidden': 0, 'label': u'Voucher Detail No', 'oldfieldname': u'voucher_detail_no', 'oldfieldtype': u'Data', 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, 'width': u'150px' }, @@ -251,11 +276,14 @@ 'doctype': u'DocField', 'fieldname': u'actual_qty', 'fieldtype': u'Currency', + 'hidden': 0, 'in_filter': 1, 'label': u'Actual Quantity', 'oldfieldname': u'actual_qty', 'oldfieldtype': u'Currency', 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, 'width': u'150px' }, @@ -264,10 +292,13 @@ 'doctype': u'DocField', 'fieldname': u'incoming_rate', 'fieldtype': u'Currency', + 'hidden': 0, 'label': u'Incoming Rate', 'oldfieldname': u'incoming_rate', 'oldfieldtype': u'Currency', - 'permlevel': 0 + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0 }, # DocField @@ -275,10 +306,13 @@ 'doctype': u'DocField', 'fieldname': u'stock_uom', 'fieldtype': u'Data', + 'hidden': 0, 'label': u'Stock UOM', 'oldfieldname': u'stock_uom', 'oldfieldtype': u'Data', 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, 'width': u'150px' }, @@ -287,11 +321,14 @@ 'doctype': u'DocField', 'fieldname': u'bin_aqat', 'fieldtype': u'Currency', + 'hidden': 0, 'in_filter': 1, 'label': u'Bin Actual Qty After Transaction', 'oldfieldname': u'bin_aqat', 'oldfieldtype': u'Currency', 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, 'width': u'150px' }, @@ -306,7 +343,8 @@ 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, - 'report_hide': 1 + 'report_hide': 1, + 'reqd': 0 }, # DocField @@ -320,7 +358,8 @@ 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, - 'report_hide': 1 + 'report_hide': 1, + 'reqd': 0 }, # DocField @@ -328,10 +367,13 @@ 'doctype': u'DocField', 'fieldname': u'valuation_rate', 'fieldtype': u'Currency', + 'hidden': 0, 'label': u'Valuation Rate', 'oldfieldname': u'valuation_rate', 'oldfieldtype': u'Currency', 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0, 'width': u'150px' }, @@ -340,14 +382,18 @@ 'doctype': u'DocField', 'fieldname': u'stock_value', 'fieldtype': u'Currency', + 'hidden': 0, 'label': u'Stock Value', 'oldfieldname': u'stock_value', 'oldfieldtype': u'Currency', - 'permlevel': 0 + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0 }, # DocField { + 'colour': u'White:FFF', 'doctype': u'DocField', 'fieldname': u'fcfs_stack', 'fieldtype': u'Text', @@ -359,6 +405,7 @@ 'permlevel': 2, 'print_hide': 1, 'report_hide': 1, + 'reqd': 0, 'search_index': 0 }, @@ -367,13 +414,16 @@ 'doctype': u'DocField', 'fieldname': u'company', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 1, 'label': u'Company', 'oldfieldname': u'company', 'oldfieldtype': u'Data', - 'options': u'link:Company', + 'options': u'\nWeb Notes Technologies Pvt Ltd', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'150px' }, @@ -382,12 +432,15 @@ 'doctype': u'DocField', 'fieldname': u'fiscal_year', 'fieldtype': u'Data', + 'hidden': 0, 'in_filter': 1, 'label': u'Fiscal Year', 'oldfieldname': u'fiscal_year', 'oldfieldtype': u'Data', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'150px' }, @@ -396,13 +449,16 @@ 'doctype': u'DocField', 'fieldname': u'is_cancelled', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 1, 'label': u'Is Cancelled', 'oldfieldname': u'is_cancelled', 'oldfieldtype': u'Select', 'options': u'\nYes\nNo', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'100px' }, @@ -411,13 +467,16 @@ 'doctype': u'DocField', 'fieldname': u'is_stock_entry', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 1, 'label': u'Is Stock Entry', 'oldfieldname': u'is_stock_entry', 'oldfieldtype': u'Select', 'options': u'\nYes\nNo', 'permlevel': 1, - 'search_index': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 1, 'width': u'100px' } ] \ No newline at end of file