mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
[cleanup] Default Warehouses created on Company creation. Warehouse names have Company abbreviation as suffix
This commit is contained in:
@@ -27,7 +27,12 @@ class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
|
||||
def autoname(self):
|
||||
suffix = " - " + webnotes.conn.get_value("Company", self.doc.company, "abbr")
|
||||
if not self.doc.warehouse_name.endswith(suffix):
|
||||
self.doc.name = self.doc.warehouse_name + suffix
|
||||
|
||||
def get_bin(self, item_code, warehouse=None):
|
||||
warehouse = warehouse or self.doc.name
|
||||
bin = sql("select name from tabBin where item_code = %s and \
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
{
|
||||
"creation": "2013-03-07 18:50:32",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 18:37:24",
|
||||
"modified": "2013-07-10 18:46:40",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:warehouse_name",
|
||||
"description": "A logical Warehouse against which stock entries are made.",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
|
||||
Reference in New Issue
Block a user