[merge] [minor] merged with master

This commit is contained in:
Nabin Hait 2013-09-02 13:07:49 +05:30
commit da3110fc12
40 changed files with 364 additions and 265 deletions

View File

@ -262,13 +262,11 @@ class DocType(BuyingController):
if d.purchase_order:
submitted = sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order)
if not submitted:
msgprint("Purchase Order : "+ cstr(d.purchase_order) +" is not submitted")
raise Exception , "Validation Error."
webnotes.throw("Purchase Order : "+ cstr(d.purchase_order) +" is not submitted")
if d.purchase_receipt:
submitted = sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt)
if not submitted:
msgprint("Purchase Receipt : "+ cstr(d.purchase_receipt) +" is not submitted")
raise Exception , "Validation Error."
webnotes.throw("Purchase Receipt : "+ cstr(d.purchase_receipt) +" is not submitted")
def update_against_document_in_jv(self):

View File

@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:05",
"docstatus": 0,
"modified": "2013-08-31 10:11:41",
"modified": "2013-08-31 10:19:01",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -4,7 +4,7 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
from stock.utils import get_buying_amount
from stock.utils import get_buying_amount, get_sales_bom_buying_amount
def execute(filters=None):
if not filters: filters = {}
@ -21,10 +21,15 @@ def execute(filters=None):
data = []
for row in source:
selling_amount = flt(row.amount)
buying_amount = get_buying_amount(row.item_code, row.parenttype, row.name, row.item_row,
stock_ledger_entries.get((row.item_code, row.warehouse), []),
item_sales_bom.get(row.parenttype, {}).get(row.name, webnotes._dict()))
item_sales_bom_map = item_sales_bom.get(row.parenttype, {}).get(row.name, webnotes._dict())
if item_sales_bom_map.get(row.item_code):
buying_amount = get_sales_bom_buying_amount(row.item_code, row.warehouse,
row.parenttype, row.name, row.item_row, stock_ledger_entries, item_sales_bom_map)
else:
buying_amount = get_buying_amount(row.parenttype, row.name, row.item_row,
stock_ledger_entries.get((row.item_code, row.warehouse), []))
buying_amount = buying_amount > 0 and buying_amount or 0

View File

@ -130,7 +130,7 @@
},
"writers": {
"template": "app/website/templates/pages/writers",
"args_method": "website.helpers.blog.get_writers_args"
"args_method": "website.doctype.blogger.blogger.get_writers_args"
},
"profile": {
"no_cache": true,

View File

@ -17,7 +17,6 @@ class BuyingController(StockController):
def onload_post_render(self):
# contact, address, item details
self.set_missing_values()
self.set_taxes("purchase_tax_details", "purchase_other_charges")
def validate(self):
super(BuyingController, self).validate()
@ -40,6 +39,8 @@ class BuyingController(StockController):
self.doc.fields[fieldname] = val
self.set_missing_item_details(get_item_details)
if self.doc.fields.get("__islocal"):
self.set_taxes("purchase_tax_details", "purchase_other_charges")
def set_supplier_from_item_default(self):
if self.meta.get_field("supplier") and not self.doc.supplier:

View File

@ -14,15 +14,15 @@ class SellingController(StockController):
def onload_post_render(self):
# contact, address, item details and pos details (if applicable)
self.set_missing_values()
self.set_taxes("other_charges", "charge")
def set_missing_values(self, for_validate=False):
super(SellingController, self).set_missing_values(for_validate)
# set contact and address details for customer, if they are not mentioned
self.set_missing_lead_customer_details()
self.set_price_list_and_item_details()
if self.doc.fields.get("__islocal"):
self.set_taxes("other_charges", "charge")
def set_missing_lead_customer_details(self):
if self.doc.customer:

View File

@ -1,14 +0,0 @@
---
{
"_label": "Get Involved"
}
---
If you are an ERPNext user:
[https://groups.google.com/group/erpnext-user-forum](https://groups.google.com/group/erpnext-user-forum)
If you are an ERPNext developer:
[https://groups.google.com/group/erpnext-developer-forum](https://groups.google.com/group/erpnext-developer-forum)

View File

@ -7,28 +7,25 @@
"docs.dev",
"docs.download",
"docs.community",
"docs.blog",
"docs.about"
"docs.blog"
],
"_no_toc": 1
}
---
<div style="margin: 10px 0px">
<h1 style="text-align: center">All-in-One Platform to Manage Your Organization.</h1>
<h3 style="text-align: center; font-weight: normal; color: #888">100% Free and Open Source.</h1>
<div class="text-center" style="margin: 10px 0px">
<h1>ERPNext Docs (beta)</h1>
<h3 class="text-muted">Open Source ERP Built for The Web.</h3>
<p>For the main site, go to <a href="https://erpnext.com/">https://erpnext.com</a></p>
</div>
![Home Screen](img/home.png)
Welcome to the ERPNext Documentation + Community Site
### What is ERPNext?
ERPNext is an information system that links together an entire organization's operations. It is a software package that offers convenience of managing all the business functions from a single platform. No need of going to different applications to process different requests. No need of saving data in different functional packages. Under one ERP "roof" you can manage Accounting, Warehouse Management, CRM, Human Resources, Supply Chain Management, Sales Management, and Website Design.
ERPNext is an Open Source integrated app (that manages Financial Accounting, Inventory, CRM) that is built grounds up for the web, using some of the latest web technologies and frameworks. ERPNext helps your organization manage Financial Accounting, Inventory, Sales, Purchase, Payroll, Customer Support, E-Commerce all in one platform. Learn more at [https://erpnext.com](https://erpnext.com)
ERPNext is written by Web Notes Technologies keeping small and medium businesses in mind.
### Site Contents
- It gives better access to crucial information as a whole rather than in fragments of different versions.
- It provides comparable financial reports.
- It avoids duplication of reports and redundant data.
- It allows better alignment across cross-functional departments.
- It facilitates Website Design and provides shopping cart facility.
- It gives better deployment on mobiles, tablets, desktops and large screens.
This site contains the full User and Developer Documentation for ERPNext. This is still a work-in-progress. Please feel free to contribute issues and documentation.

View File

@ -0,0 +1,49 @@
import webnotes
def execute():
create_fiscal_years()
doctypes = webnotes.conn.sql_list("""select parent from tabDocField
where (fieldtype="Link" and options='Fiscal Year')
or (fieldtype="Select" and options='link:Fiscal Year')""")
for dt in doctypes:
date_fields = webnotes.conn.sql_list("""select fieldname from tabDocField
where parent=%s and fieldtype='Date'""", dt)
date_field = get_date_field(date_fields, dt)
if not date_field:
print dt, date_field
else:
webnotes.conn.sql("""update `tab%s` set fiscal_year =
if(%s<='2013-06-30', '2012-2013', '2013-2014')""" % (dt, date_field))
def create_fiscal_years():
fiscal_years = {
"2012-2013": ["2012-07-01", "2013-06-30"],
"2013-2014": ["2013-07-01", "2014-06-30"]
}
for d in fiscal_years:
webnotes.bean({
"doctype": "Fiscal Year",
"year": d,
"year_start_date": fiscal_years[d][0],
"is_fiscal_year_closed": "No"
}).insert()
def get_date_field(date_fields, dt):
date_field = None
if date_fields:
if "posting_date" in date_fields:
date_field = "posting_date"
elif "transaction_date" in date_fields:
date_field = 'transaction_date'
else:
date_field = date_fields[0]
# print dt, date_fields
return date_field

View File

@ -9,17 +9,8 @@ from core.doctype.communication.communication import make
def add_sales_communication(subject, content, sender, real_name, mail=None,
status="Open", date=None):
def set_status(doctype, name):
w = webnotes.bean(doctype, name)
w.ignore_permissions = True
w.doc.status = is_system_user and "Replied" or status
w.doc.save()
if mail:
mail.save_attachments_in_doc(w.doc)
lead_name = webnotes.conn.get_value("Lead", {"email_id": sender})
contact_name = webnotes.conn.get_value("Contact", {"email_id": sender})
is_system_user = webnotes.conn.get_value("Profile", sender)
if not (lead_name or contact_name):
# none, create a new Lead
@ -34,14 +25,13 @@ def add_sales_communication(subject, content, sender, real_name, mail=None,
lead.insert()
lead_name = lead.doc.name
make(content=content, sender=sender, subject=subject,
message = make(content=content, sender=sender, subject=subject,
lead=lead_name, contact=contact_name, date=date)
if contact_name:
set_status("Contact", contact_name)
elif lead_name:
set_status("Lead", lead_name)
if mail:
# save attachments to parent if from mail
bean = webnotes.bean("Contact" if contact_name else "Lead", contact_name or lead_name)
mail.save_attachments_in_doc(bean.doc)
class SalesMailbox(POP3Mailbox):
def setup(self, args=None):

View File

@ -39,17 +39,14 @@ class DocType(SellingController):
def validate(self):
if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
msgprint("Please Enter Lost Reason under More Info section")
raise Exception
webnotes.throw("Please Enter Lost Reason under More Info section")
if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
msgprint("Please specify campaign name")
raise Exception
webnotes.throw("Please specify campaign name")
if self.doc.email_id:
if not validate_email_add(self.doc.email_id):
msgprint('Please enter valid email id.')
raise Exception
webnotes.throw('Please enter valid email id.')
def on_update(self):
self.check_email_id_is_unique()

View File

@ -95,7 +95,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
return{
query : "selling.doctype.sales_common.sales_common.get_batch_no",
filters: {
'item': item.item_code,
'item_code': item.item_code,
'posting_date': me.frm.doc.posting_date
}
}

View File

@ -340,7 +340,7 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
and batch_no like '%(txt)s'
and exists(select * from `tabBatch`
where name = sle.batch_no
and expiry_date >= '%(posting_date)s'
and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s')
and docstatus != 2)
%(mcond)s
group by batch_no having sum(actual_qty) > 0
@ -353,11 +353,11 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
return webnotes.conn.sql("""select name from tabBatch
where docstatus != 2
and item = '%(item_code)s'
and expiry_date >= '%(posting_date)s'
and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s')
and name like '%(txt)s'
%(mcond)s
order by name desc
limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'],
'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt,
'mcond':get_match_cond(doctype, searchfield),'start': start,
'page_len': page_len})
'page_len': page_len})

View File

@ -126,8 +126,9 @@ class DocType(SellingController):
self.validate_mandatory()
self.validate_proj_cust()
self.validate_po()
self.validate_uom_is_integer("stock_uom", "qty")
self.validate_uom_is_integer("stock_uom", "qty")
self.validate_for_items()
self.validate_warehouse_user()
sales_com_obj = get_obj(dt = 'Sales Common')
sales_com_obj.check_active_sales_items(self)
sales_com_obj.check_conversion_rate(self)
@ -147,6 +148,16 @@ class DocType(SellingController):
if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
if not self.doc.delivery_status: self.doc.delivery_status = 'Not Delivered'
def validate_warehouse_user(self):
from stock.utils import validate_warehouse_user
warehouses = list(set([d.reserved_warehouse for d in
self.doclist.get({"doctype": self.tname}) if d.reserved_warehouse]))
for w in warehouses:
validate_warehouse_user(w)
def validate_with_previous_doc(self):
super(DocType, self).validate_with_previous_doc(self.tname, {
"Quotation": {

View File

@ -272,6 +272,29 @@ class TestSalesOrder(unittest.TestCase):
self.check_reserved_qty(sbom_test_records[0][2]["item_code"],
so.doclist[1].reserved_warehouse, 20.0)
def test_warehouse_user(self):
webnotes.session.user = "test@example.com"
webnotes.bean("Profile", "test@example.com").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
webnotes.bean("Profile", "test2@example.com").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
from stock.utils import UserNotAllowedForWarehouse
so = webnotes.bean(copy = test_records[0])
so.doc.company = "_Test Company 1"
so.doc.conversion_rate = 0.02
so.doc.plc_conversion_rate = 0.02
so.doclist[1].reserved_warehouse = "_Test Warehouse 2 - _TC1"
self.assertRaises(UserNotAllowedForWarehouse, so.insert)
webnotes.session.user = "test2@example.com"
so.insert()
webnotes.session.user = "Administrator"
test_dependencies = ["Sales BOM"]
test_records = [

View File

@ -2,7 +2,7 @@
{
"creation": "2013-05-03 10:45:46",
"docstatus": 0,
"modified": "2013-08-14 11:46:49",
"modified": "2013-08-30 16:21:38",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -35,7 +35,9 @@
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1
"read": 1,
"report": 1,
"submit": 0
},
{
"doctype": "DocType",
@ -557,20 +559,6 @@
"read_only": 0,
"reqd": 1
},
{
"default": "No",
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
"description": "Select \"Yes\" if this item is to be sent to a customer or received from a supplier as a sample. Delivery notes and Purchase Receipts will update stock levels but there will be no invoice against this item.",
"doctype": "DocField",
"fieldname": "is_sample_item",
"fieldtype": "Select",
"label": "Allow Samples",
"oldfieldname": "is_sample_item",
"oldfieldtype": "Select",
"options": "Yes\nNo",
"read_only": 0,
"reqd": 1
},
{
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
"doctype": "DocField",
@ -878,9 +866,7 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"report": 1,
"role": "Material Master Manager",
"submit": 0,
"write": 1
},
{
@ -888,9 +874,7 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"report": 1,
"role": "Material Manager",
"submit": 0,
"write": 0
},
{
@ -898,21 +882,7 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"report": 1,
"role": "Material User",
"submit": 0,
"write": 0
},
{
"doctype": "DocPerm",
"role": "Sales User"
},
{
"doctype": "DocPerm",
"role": "Purchase User"
},
{
"doctype": "DocPerm",
"role": "Accounts User"
}
]

View File

@ -44,7 +44,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@ -82,7 +81,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@ -108,7 +106,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@ -128,7 +125,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@ -149,7 +145,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "Yes",
"is_sub_contracted_item": "Yes",
@ -168,7 +163,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@ -188,7 +182,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@ -209,7 +202,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
"is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",

View File

@ -42,11 +42,42 @@ class TestStockEntry(unittest.TestCase):
def test_warehouse_company_validation(self):
self._clear_stock_account_balance()
webnotes.session.user = "test2@example.com"
webnotes.bean("Profile", "test2@example.com").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
from stock.doctype.stock_ledger_entry.stock_ledger_entry import InvalidWarehouseCompany
st1 = webnotes.bean(copy=test_records[0])
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
self.assertRaises(InvalidWarehouseCompany, st1.submit)
webnotes.session.user = "Administrator"
def test_warehouse_user(self):
from stock.utils import UserNotAllowedForWarehouse
webnotes.session.user = "test@example.com"
webnotes.bean("Profile", "test@example.com").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
webnotes.bean("Profile", "test2@example.com").get_controller()\
.add_roles("Sales User", "Sales Manager", "Material User", "Material Manager")
st1 = webnotes.bean(copy=test_records[0])
st1.doc.company = "_Test Company 1"
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
self.assertRaises(UserNotAllowedForWarehouse, st1.submit)
webnotes.session.user = "test2@example.com"
st1 = webnotes.bean(copy=test_records[0])
st1.doc.company = "_Test Company 1"
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
st1.submit()
webnotes.session.user = "Administrator"
def test_material_receipt_gl_entry(self):
self._clear_stock_account_balance()

View File

@ -25,12 +25,14 @@ class DocType(DocListController):
self.doclist = doclist
def validate(self):
from stock.utils import validate_warehouse_user
if not hasattr(webnotes, "new_stock_ledger_entries"):
webnotes.new_stock_ledger_entries = []
webnotes.new_stock_ledger_entries.append(self.doc)
self.validate_mandatory()
self.validate_item()
self.validate_warehouse_user()
validate_warehouse_user(self.doc.warehouse)
self.validate_warehouse_company()
self.actual_amt_check()
self.check_stock_frozen_date()
@ -55,16 +57,6 @@ class DocType(DocListController):
self.doc.fields.pop('batch_bal')
def validate_warehouse_user(self):
if webnotes.session.user=="Administrator":
return
warehouse_users = [p[0] for p in webnotes.conn.sql("""select user from `tabWarehouse User`
where parent=%s""", self.doc.warehouse)]
if warehouse_users and not webnotes.session.user in warehouse_users:
webnotes.msgprint(_("User not allowed entry in the Warehouse") \
+ ": " + webnotes.session.user + " / " + self.doc.warehouse, raise_exception = 1)
def validate_warehouse_company(self):
warehouse_company = webnotes.conn.get_value("Warehouse", self.doc.warehouse, "company")
if warehouse_company and warehouse_company != self.doc.company:

View File

@ -287,8 +287,8 @@ class DocType(StockController):
stock_value_difference = {}
for d in self.entries:
diff = get_buying_amount(d.item_code, self.doc.doctype, self.doc.name,
d.voucher_detail_no, stock_ledger_entries.get((d.item_code, d.warehouse), []))
diff = get_buying_amount(self.doc.doctype, self.doc.name, d.voucher_detail_no,
stock_ledger_entries.get((d.item_code, d.warehouse), []))
stock_value_difference.setdefault(d.warehouse, 0.0)
stock_value_difference[d.warehouse] -= diff

View File

@ -17,7 +17,11 @@ test_records = [
[{
"doctype": "Warehouse",
"warehouse_name": "_Test Warehouse 2",
"company": "_Test Company 1",
"account": "_Test Account Stock In Hand - _TC1"
"account": "_Test Account Stock In Hand - _TC1",
"company": "_Test Company 1"
}, {
"doctype": "Warehouse User",
"parentfield": "warehouse_users",
"user": "test2@example.com"
}]
]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-08-20 15:08:10",
"docstatus": 0,
"modified": "2013-08-20 15:10:43",
"modified": "2013-08-20 15:10:45",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,7 +10,7 @@
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"query": "SELECT\n tabBin.item_code as \"Item:Link/Item:120\",\n tabBin.warehouse as \"Item:Link/Warehouse:120\",\n tabBin.actual_qty as \"Actual:Float:90\",\n tabBin.indented_qty as \"Requested:Float:90\",\n tabBin.reserved_qty as \"Reserved:Float:90\",\n tabBin.ordered_qty as \"Ordered:Float:90\",\n tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n tabBin, tabItem\nWHERE\n tabBin.item_code = tabItem.name\n AND tabItem.is_purchase_item = \"Yes\"\n AND tabBin.projected_qty < 0\nORDER BY\n tabBin.projected_qty ASC",
"query": "SELECT\n tabBin.item_code as \"Item:Link/Item:120\",\n tabBin.warehouse as \"Warehouse:Link/Warehouse:120\",\n tabBin.actual_qty as \"Actual:Float:90\",\n tabBin.indented_qty as \"Requested:Float:90\",\n tabBin.reserved_qty as \"Reserved:Float:90\",\n tabBin.ordered_qty as \"Ordered:Float:90\",\n tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n tabBin, tabItem\nWHERE\n tabBin.item_code = tabItem.name\n AND tabItem.is_purchase_item = \"Yes\"\n AND tabBin.projected_qty < 0\nORDER BY\n tabBin.projected_qty ASC",
"ref_doctype": "Item",
"report_name": "Items To Be Requested",
"report_type": "Query Report"

View File

@ -8,6 +8,7 @@ from webnotes.utils import flt, cstr, nowdate, add_days, cint
from webnotes.defaults import get_global_default
from webnotes.utils.email_lib import sendmail
class UserNotAllowedForWarehouse(webnotes.ValidationError): pass
def get_stock_balance_on(warehouse_list, posting_date=None):
if not posting_date: posting_date = nowdate()
@ -208,20 +209,28 @@ def get_warehouse_list(doctype, txt, searchfield, start, page_len, filters):
wlist.append([w])
return wlist
def get_buying_amount(item_code, voucher_type, voucher_no, voucher_detail_no,
stock_ledger_entries, item_sales_bom=None):
if item_sales_bom and item_sales_bom.get(item_code):
# sales bom item
buying_amount = 0.0
for bom_item in item_sales_bom[item_code]:
if bom_item.get("parent_detail_docname")==voucher_detail_no:
buying_amount += _get_buying_amount(voucher_type, voucher_no, voucher_detail_no, stock_ledger_entries)
return buying_amount
else:
# doesn't have sales bom
return _get_buying_amount(voucher_type, voucher_no, voucher_detail_no, stock_ledger_entries)
def validate_warehouse_user(warehouse):
if webnotes.session.user=="Administrator":
return
warehouse_users = [p[0] for p in webnotes.conn.sql("""select user from `tabWarehouse User`
where parent=%s""", warehouse)]
if warehouse_users and not (webnotes.session.user in warehouse_users):
webnotes.throw(_("Not allowed entry in Warehouse") \
+ ": " + warehouse, UserNotAllowedForWarehouse)
def get_sales_bom_buying_amount(item_code, warehouse, voucher_type, voucher_no, voucher_detail_no,
stock_ledger_entries, item_sales_bom):
# sales bom item
buying_amount = 0.0
for bom_item in item_sales_bom[item_code]:
if bom_item.get("parent_detail_docname")==voucher_detail_no:
buying_amount += get_buying_amount(voucher_type, voucher_no, voucher_detail_no,
stock_ledger_entries.get((bom_item.item_code, warehouse), []))
return buying_amount
def _get_buying_amount(voucher_type, voucher_no, item_row, stock_ledger_entries):
def get_buying_amount(voucher_type, voucher_no, item_row, stock_ledger_entries):
# IMP NOTE
# stock_ledger_entries should already be filtered by item_code and warehouse and
# sorted by posting_date desc, posting_time desc

View File

@ -2,7 +2,7 @@
{
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"modified": "2013-08-08 14:22:34",
"modified": "2013-08-28 18:29:06",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -224,17 +224,6 @@
"oldfieldtype": "Column Break",
"read_only": 1
},
{
"depends_on": "eval:!doc.__islocal",
"doctype": "DocField",
"fieldname": "resolution_details",
"fieldtype": "Small Text",
"label": "Resolution Details",
"no_copy": 1,
"oldfieldname": "resolution_details",
"oldfieldtype": "Text",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "first_responded_on",
@ -254,6 +243,17 @@
"read_only": 1,
"search_index": 0
},
{
"depends_on": "eval:!doc.__islocal",
"doctype": "DocField",
"fieldname": "resolution_details",
"fieldtype": "Small Text",
"label": "Resolution Details",
"no_copy": 1,
"oldfieldname": "resolution_details",
"oldfieldtype": "Text",
"read_only": 0
},
{
"doctype": "DocField",
"fieldname": "content_type",

View File

@ -8,7 +8,7 @@
<div class="panel-body">
<p>
<input id="lead-email" type="email"
class="form-control" placeholder="Your Email Id">
class="form-control" placeholder="Your Email Id (optional)">
</p>
<p>
<button type="submit" id="login_btn"

View File

@ -1,50 +1,50 @@
Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Table:,Item,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DocType:,Item,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,Item Reorder,item_reorder,,,,-,UOM Conversion Detail,uom_conversion_details,,-,Item Supplier,item_supplier_details,,-,Item Customer Detail,item_customer_details,,-,Item Tax,item_tax,,-,Item Price,ref_rate_details,,,,-,Item Quality Inspection Parameter,item_specification_details,,-,Website Item Group,website_item_groups,-,Item Website Specification,item_website_specifications,
Column Labels:,ID,Last Updated On,Item Name,Item Group,Default Unit of Measure,Description,Is Stock Item,Is Asset Item,Has Batch No,Has Serial No,Is Purchase Item,Is Sales Item,Is Service Item,Allow Samples,Inspection Required,Allow Bill of Materials,Allow Production Order,Is Sub Contracted Item,Document Numbering Series,Item Code,Brand,Barcode,Image,Description HTML,Default Warehouse,Allowance Percent,Valuation Method,Minimum Order Qty,Serial Number Series,Warranty Period (in days),End of Life,Net Weight,Weight UOM,Re-Order Level,Re-Order Qty,Default Supplier,Lead Time Days,Default Expense Account,Default Cost Center,Last Purchase Rate,Standard Rate,Manufacturer,Manufacturer Part Number,Max Discount (%),Default Income Account,Cost Center,Default BOM,Show in Website,Page Name,Weightage,Slideshow,Image,Website Warehouse,Website Description,-,ID,Warehouse,Re-order Level,Material Request Type,Re-order Qty,-,ID,UOM,Conversion Factor,-,ID,Supplier,Supplier Part Number,-,ID,Customer Name,Ref Code,-,ID,Tax,Tax Rate,-,ID,Price List Name,Ref Rate,Valid for Buying or Selling?,Currency,-,ID,Parameter,Acceptance Criteria,-,ID,Item Group,-,ID,Label,Description
Column Name:,name,modified,item_name,item_group,stock_uom,description,is_stock_item,is_asset_item,has_batch_no,has_serial_no,is_purchase_item,is_sales_item,is_service_item,is_sample_item,inspection_required,is_manufactured_item,is_pro_applicable,is_sub_contracted_item,naming_series,item_code,brand,barcode,image,description_html,default_warehouse,tolerance,valuation_method,min_order_qty,serial_no_series,warranty_period,end_of_life,net_weight,weight_uom,re_order_level,re_order_qty,default_supplier,lead_time_days,purchase_account,cost_center,last_purchase_rate,standard_rate,manufacturer,manufacturer_part_no,max_discount,default_income_account,default_sales_cost_center,default_bom,show_in_website,page_name,weightage,slideshow,website_image,website_warehouse,web_long_description,-,name,warehouse,warehouse_reorder_level,material_request_type,warehouse_reorder_qty,-,name,uom,conversion_factor,-,name,supplier,supplier_part_no,-,name,customer_name,ref_code,-,name,tax_type,tax_rate,-,name,price_list,ref_rate,buying_or_selling,ref_currency,-,name,specification,value,-,name,item_group,-,name,label,description
Mandatory:,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,-,Yes,Yes,Yes,Yes,No,-,Yes,No,No,-,Yes,No,No,-,Yes,Yes,Yes,-,Yes,Yes,No,-,Yes,Yes,Yes,Yes,No,-,Yes,Yes,No,-,Yes,No,-,Yes,No,No
Type:,Data (text),Data,Data,Link,Link,Small Text,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Data,Link,Data,Select,Small Text,Link,Float,Select,Float,Data,Data,Date,Float,Link,Float,Float,Link,Int,Link,Link,Float,Float,Data,Data,Float,Link,Link,Link,Check,Data,Int,Link,Select,Link,Text Editor,-,Data,Link,Float,Select,Float,-,Data,Link,Float,-,Data,Link,Data,-,Data,Link,Data,-,Data,Link,Float,-,Data,Link,Currency,Select,Link,-,Data,Data,Data,-,Data,Link,-,Data,Data,Text
Info:,,Don't change!,,Valid Item Group,Valid UOM,,"One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No",One of: ITEM,,Valid Brand,,One of: attach_files:,,Valid Warehouse,,"One of: FIFO, Moving Average",,,,,,Valid UOM,,,Valid Supplier,Integer,Valid Account,Valid Cost Center,,,,,,Valid Account,Valid Cost Center,Valid BOM,0 or 1,,Integer,Valid Website Slideshow,One of: attach_files:,Valid Warehouse,,-,Leave blank for new records,Valid Warehouse,,"One of: Purchase, Transfer",,-,Leave blank for new records,Valid UOM,,-,Leave blank for new records,Valid Supplier,,-,Leave blank for new records,Valid Customer,,-,Leave blank for new records,Valid Account,,-,Leave blank for new records,Valid Price List,,"One of: Buying, Selling",Valid Currency,-,Leave blank for new records,,,-,Leave blank for new records,Valid Item Group,-,Leave blank for new records,,
Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,Base Bearing Plate,"""2013-08-20 11:11:53""",Base Bearing Plate,Raw Material,Nos,1/4 in. x 6 in. x 6 in. Mild Steel Plate,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Base Bearing Plate,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,15.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00001,Nos,1.0,,,,,,,,,,,,,,RFD/00001,Standard Buying,15.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00017,Standard Selling,21.0,Selling,USD,,,,,,,,,,,
,Base Plate,"""2013-08-20 11:11:53""",Base Plate,Raw Material,Nos,3/4 in. x 2 ft. x 4 ft. Pine Plywood,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Base Plate,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,20.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00002,Nos,1.0,,,,,,,,,,,,,,RFD/00002,Standard Buying,20.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00018,Standard Selling,28.0,Selling,USD,,,,,,,,,,,
,Bearing Assembly,"""2013-08-20 11:11:55""",Bearing Assembly,Sub Assemblies,Nos,Bearing Assembly,Yes,No,No,No,No,Yes,No,No,No,Yes,Yes,No,,Bearing Assembly,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Asiatic Solutions,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00003,Nos,1.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,Bearing Block,"""2013-08-20 11:11:54""",Bearing Block,Raw Material,Nos,"CAST IRON, MCMASTER PART NO. 3710T13",Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Bearing Block,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Nan Duskin,0,,,10.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00004,Nos,1.0,,,,,,,,,,,,,,RFD/00003,Standard Buying,10.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00019,Standard Selling,14.0,Selling,USD,,,,,,,,,,,
,Bearing Collar,"""2013-08-20 11:11:54""",Bearing Collar,Raw Material,Nos,1 in. x 3 in. x 1 ft. Multipurpose Al Alloy Bar,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Bearing Collar,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,20.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00005,Nos,1.0,,,,,,,,,,,,,,RFD/00004,Standard Buying,20.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00020,Standard Selling,28.0,Selling,USD,,,,,,,,,,,
,Bearing Pipe,"""2013-08-20 11:11:54""",Bearing Pipe,Raw Material,Nos,1.5 in. Diameter x 36 in. Mild Steel Tubing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Bearing Pipe,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,15.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00006,Nos,1.0,,,,,,,,,,,,,,RFD/00005,Standard Buying,15.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00021,Standard Selling,21.0,Selling,USD,,,,,,,,,,,
,Blade Rib,"""2013-08-20 11:11:54""",Blade Rib,Raw Material,Nos,1/2 in. x 2 ft. x 4 ft. Pine Plywood,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Blade Rib,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Ks Merchandise,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00007,Nos,1.0,,,,,,,,,,,,,,RFD/00006,Standard Buying,10.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00022,Standard Selling,14.0,Selling,USD,,,,,,,,,,,
,Disc Collars,"""2013-08-20 11:11:54""",Disc Collars,Raw Material,Nos,For Upper Bearing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Disc Collars,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Asiatic Solutions,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00008,Nos,1.0,,,,,,,,,,,,,,RFD/00007,Standard Buying,74.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00023,Standard Selling,103.6,Selling,USD,,,,,,,,,,,
,External Disc,"""2013-08-20 11:11:54""",External Disc,Raw Material,Nos,15/32 in. x 4 ft. x 8 ft. 3-Ply Rtd Sheathing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,External Disc,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,45.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00009,Nos,1.0,,,,,,,,,,,,,,RFD/00008,Standard Buying,45.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00024,Standard Selling,63.0,Selling,USD,,,,,,,,,,,
,Internal Disc,"""2013-08-20 11:11:54""",Internal Disc,Raw Material,Nos,For Bearing Collar,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Internal Disc,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,33.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00010,Nos,1.0,,,,,,,,,,,,,,RFD/00009,Standard Buying,33.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00025,Standard Selling,46.2,Selling,USD,,,,,,,,,,,
,Shaft,"""2013-08-20 11:11:54""",Shaft,Raw Material,Nos,1.25 in. Diameter x 6 ft. Mild Steel Tubing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Shaft,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,30.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00011,Nos,1.0,,,,,,,,,,,,,,RFD/00010,Standard Buying,30.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00026,Standard Selling,42.0,Selling,USD,,,,,,,,,,,
,Stand,"""2013-08-20 11:11:54""",Stand,Raw Material,Nos,N/A,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Stand,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Scott Ties,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00012,Nos,1.0,,,,,,,,,,,,,,RFD/00011,Standard Buying,40.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00027,Standard Selling,56.0,Selling,USD,,,,,,,,,,,
,Upper Bearing Plate,"""2013-08-20 11:11:54""",Upper Bearing Plate,Raw Material,Nos,3/16 in. x 6 in. x 6 in. Low Carbon Steel Plate,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Upper Bearing Plate,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,50.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00013,Nos,1.0,,,,,,,,,,,,,,RFD/00012,Standard Buying,50.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00028,Standard Selling,70.0,Selling,USD,,,,,,,,,,,
,Wind Mill A Series,"""2013-08-20 11:27:46""",Wind Mill A Series,Products,Nos,Wind Mill A Series for Home Use 9ft,Yes,No,No,Yes,No,Yes,Yes,No,No,Yes,Yes,No,,Wind Mill A Series,,,,,Finished Goods - WP,0.0,,0.0,WMA,,,0.0,,0.0,0.0,,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00014,Nos,1.0,,,,,,,,,,,,,,RFD/00015,Standard Selling,340.0,Selling,USD,,,,,,,,,,,
,Wind MIll C Series,"""2013-08-20 11:27:27""",Wind MIll C Series,Products,Nos,Wind Mill C Series for Commercial Use 18ft,Yes,No,No,Yes,No,Yes,Yes,No,No,Yes,Yes,No,,Wind MIll C Series,,,,,Finished Goods - WP,0.0,,0.0,WMC,,,0.0,,0.0,0.0,,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00015,Nos,1.0,,,,,,,,,,,,,,RFD/00016,Standard Selling,400.0,Selling,USD,,,,,,,,,,,
,Wind Turbine,"""2013-08-20 11:29:26""",Wind Turbine,Products,Nos,Small Wind Turbine for Home Use,Yes,No,No,Yes,No,Yes,Yes,No,No,Yes,Yes,No,,Wind Turbine,,,,,Finished Goods - WP,0.0,,0.0,WTU,,,0.0,,0.0,0.0,,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00016,Nos,1.0,,,,,,,,,,,,,,RFD/00014,Standard Selling,300.0,Selling,USD,,,,,,,,,,,
,Wing Sheet,"""2013-08-20 11:11:55""",Wing Sheet,Raw Material,Nos,1/32 in. x 24 in. x 47 in. HDPE Opaque Sheet,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,No,,Wing Sheet,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,New World Realty,0,,,22.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00017,Nos,1.0,,,,,,,,,,,,,,RFD/00013,Standard Buying,22.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00029,Standard Selling,30.8,Selling,USD,,,,,,,,,,,
Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Table:,Item,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DocType:,Item,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,Item Reorder,item_reorder,,,,-,UOM Conversion Detail,uom_conversion_details,,-,Item Supplier,item_supplier_details,,-,Item Customer Detail,item_customer_details,,-,Item Tax,item_tax,,-,Item Price,ref_rate_details,,,,-,Item Quality Inspection Parameter,item_specification_details,,-,Website Item Group,website_item_groups,-,Item Website Specification,item_website_specifications,
Column Labels:,ID,Last Updated On,Item Name,Item Group,Default Unit of Measure,Description,Is Stock Item,Is Asset Item,Has Batch No,Has Serial No,Is Purchase Item,Is Sales Item,Is Service Item,Inspection Required,Allow Bill of Materials,Allow Production Order,Is Sub Contracted Item,Document Numbering Series,Item Code,Brand,Barcode,Image,Description HTML,Default Warehouse,Allowance Percent,Valuation Method,Minimum Order Qty,Serial Number Series,Warranty Period (in days),End of Life,Net Weight,Weight UOM,Re-Order Level,Re-Order Qty,Default Supplier,Lead Time Days,Default Expense Account,Default Cost Center,Last Purchase Rate,Standard Rate,Manufacturer,Manufacturer Part Number,Max Discount (%),Default Income Account,Cost Center,Default BOM,Show in Website,Page Name,Weightage,Slideshow,Image,Website Warehouse,Website Description,-,ID,Warehouse,Re-order Level,Material Request Type,Re-order Qty,-,ID,UOM,Conversion Factor,-,ID,Supplier,Supplier Part Number,-,ID,Customer Name,Ref Code,-,ID,Tax,Tax Rate,-,ID,Price List Name,Ref Rate,Valid for Buying or Selling?,Currency,-,ID,Parameter,Acceptance Criteria,-,ID,Item Group,-,ID,Label,Description
Column Name:,name,modified,item_name,item_group,stock_uom,description,is_stock_item,is_asset_item,has_batch_no,has_serial_no,is_purchase_item,is_sales_item,is_service_item,inspection_required,is_manufactured_item,is_pro_applicable,is_sub_contracted_item,naming_series,item_code,brand,barcode,image,description_html,default_warehouse,tolerance,valuation_method,min_order_qty,serial_no_series,warranty_period,end_of_life,net_weight,weight_uom,re_order_level,re_order_qty,default_supplier,lead_time_days,purchase_account,cost_center,last_purchase_rate,standard_rate,manufacturer,manufacturer_part_no,max_discount,default_income_account,default_sales_cost_center,default_bom,show_in_website,page_name,weightage,slideshow,website_image,website_warehouse,web_long_description,-,name,warehouse,warehouse_reorder_level,material_request_type,warehouse_reorder_qty,-,name,uom,conversion_factor,-,name,supplier,supplier_part_no,-,name,customer_name,ref_code,-,name,tax_type,tax_rate,-,name,price_list,ref_rate,buying_or_selling,ref_currency,-,name,specification,value,-,name,item_group,-,name,label,description
Mandatory:,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,-,Yes,Yes,Yes,Yes,No,-,Yes,No,No,-,Yes,No,No,-,Yes,Yes,Yes,-,Yes,Yes,No,-,Yes,Yes,Yes,Yes,No,-,Yes,Yes,No,-,Yes,No,-,Yes,No,No
Type:,Data (text),Data,Data,Link,Link,Small Text,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Select,Data,Link,Data,Select,Small Text,Link,Float,Select,Float,Data,Data,Date,Float,Link,Float,Float,Link,Int,Link,Link,Float,Float,Data,Data,Float,Link,Link,Link,Check,Data,Int,Link,Select,Link,Text Editor,-,Data,Link,Float,Select,Float,-,Data,Link,Float,-,Data,Link,Data,-,Data,Link,Data,-,Data,Link,Float,-,Data,Link,Currency,Select,Link,-,Data,Data,Data,-,Data,Link,-,Data,Data,Text
Info:,,Don't change!,,Valid Item Group,Valid UOM,,"One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No","One of: Yes, No",One of: ITEM,,Valid Brand,,One of: attach_files:,,Valid Warehouse,,"One of: FIFO, Moving Average",,,,,,Valid UOM,,,Valid Supplier,Integer,Valid Account,Valid Cost Center,,,,,,Valid Account,Valid Cost Center,Valid BOM,0 or 1,,Integer,Valid Website Slideshow,One of: attach_files:,Valid Warehouse,,-,Leave blank for new records,Valid Warehouse,,"One of: Purchase, Transfer",,-,Leave blank for new records,Valid UOM,,-,Leave blank for new records,Valid Supplier,,-,Leave blank for new records,Valid Customer,,-,Leave blank for new records,Valid Account,,-,Leave blank for new records,Valid Price List,,"One of: Buying, Selling",Valid Currency,-,Leave blank for new records,,,-,Leave blank for new records,Valid Item Group,-,Leave blank for new records,,
Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,Base Bearing Plate,"""2013-08-20 11:11:53""",Base Bearing Plate,Raw Material,Nos,1/4 in. x 6 in. x 6 in. Mild Steel Plate,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Base Bearing Plate,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,15.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00001,Nos,1.0,,,,,,,,,,,,,,RFD/00001,Standard Buying,15.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00017,Standard Selling,21.0,Selling,USD,,,,,,,,,,,
,Base Plate,"""2013-08-20 11:11:53""",Base Plate,Raw Material,Nos,3/4 in. x 2 ft. x 4 ft. Pine Plywood,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Base Plate,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,20.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00002,Nos,1.0,,,,,,,,,,,,,,RFD/00002,Standard Buying,20.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00018,Standard Selling,28.0,Selling,USD,,,,,,,,,,,
,Bearing Assembly,"""2013-08-20 11:11:55""",Bearing Assembly,Sub Assemblies,Nos,Bearing Assembly,Yes,No,No,No,No,Yes,No,No,Yes,Yes,No,,Bearing Assembly,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Asiatic Solutions,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00003,Nos,1.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,Bearing Block,"""2013-08-20 11:11:54""",Bearing Block,Raw Material,Nos,"CAST IRON, MCMASTER PART NO. 3710T13",Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Bearing Block,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Nan Duskin,0,,,10.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00004,Nos,1.0,,,,,,,,,,,,,,RFD/00003,Standard Buying,10.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00019,Standard Selling,14.0,Selling,USD,,,,,,,,,,,
,Bearing Collar,"""2013-08-20 11:11:54""",Bearing Collar,Raw Material,Nos,1 in. x 3 in. x 1 ft. Multipurpose Al Alloy Bar,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Bearing Collar,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,20.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00005,Nos,1.0,,,,,,,,,,,,,,RFD/00004,Standard Buying,20.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00020,Standard Selling,28.0,Selling,USD,,,,,,,,,,,
,Bearing Pipe,"""2013-08-20 11:11:54""",Bearing Pipe,Raw Material,Nos,1.5 in. Diameter x 36 in. Mild Steel Tubing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Bearing Pipe,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,15.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00006,Nos,1.0,,,,,,,,,,,,,,RFD/00005,Standard Buying,15.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00021,Standard Selling,21.0,Selling,USD,,,,,,,,,,,
,Blade Rib,"""2013-08-20 11:11:54""",Blade Rib,Raw Material,Nos,1/2 in. x 2 ft. x 4 ft. Pine Plywood,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Blade Rib,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Ks Merchandise,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00007,Nos,1.0,,,,,,,,,,,,,,RFD/00006,Standard Buying,10.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00022,Standard Selling,14.0,Selling,USD,,,,,,,,,,,
,Disc Collars,"""2013-08-20 11:11:54""",Disc Collars,Raw Material,Nos,For Upper Bearing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Disc Collars,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Asiatic Solutions,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00008,Nos,1.0,,,,,,,,,,,,,,RFD/00007,Standard Buying,74.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00023,Standard Selling,103.6,Selling,USD,,,,,,,,,,,
,External Disc,"""2013-08-20 11:11:54""",External Disc,Raw Material,Nos,15/32 in. x 4 ft. x 8 ft. 3-Ply Rtd Sheathing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,External Disc,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,45.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00009,Nos,1.0,,,,,,,,,,,,,,RFD/00008,Standard Buying,45.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00024,Standard Selling,63.0,Selling,USD,,,,,,,,,,,
,Internal Disc,"""2013-08-20 11:11:54""",Internal Disc,Raw Material,Nos,For Bearing Collar,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Internal Disc,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,HomeBase,0,,,33.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00010,Nos,1.0,,,,,,,,,,,,,,RFD/00009,Standard Buying,33.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00025,Standard Selling,46.2,Selling,USD,,,,,,,,,,,
,Shaft,"""2013-08-20 11:11:54""",Shaft,Raw Material,Nos,1.25 in. Diameter x 6 ft. Mild Steel Tubing,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Shaft,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,30.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00011,Nos,1.0,,,,,,,,,,,,,,RFD/00010,Standard Buying,30.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00026,Standard Selling,42.0,Selling,USD,,,,,,,,,,,
,Stand,"""2013-08-20 11:11:54""",Stand,Raw Material,Nos,N/A,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Stand,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Scott Ties,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00012,Nos,1.0,,,,,,,,,,,,,,RFD/00011,Standard Buying,40.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00027,Standard Selling,56.0,Selling,USD,,,,,,,,,,,
,Upper Bearing Plate,"""2013-08-20 11:11:54""",Upper Bearing Plate,Raw Material,Nos,3/16 in. x 6 in. x 6 in. Low Carbon Steel Plate,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Upper Bearing Plate,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,Eagle Hardware,0,,,50.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00013,Nos,1.0,,,,,,,,,,,,,,RFD/00012,Standard Buying,50.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00028,Standard Selling,70.0,Selling,USD,,,,,,,,,,,
,Wind Mill A Series,"""2013-08-20 11:27:46""",Wind Mill A Series,Products,Nos,Wind Mill A Series for Home Use 9ft,Yes,No,No,Yes,No,Yes,Yes,No,Yes,Yes,No,,Wind Mill A Series,,,,,Finished Goods - WP,0.0,,0.0,WMA,,,0.0,,0.0,0.0,,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00014,Nos,1.0,,,,,,,,,,,,,,RFD/00015,Standard Selling,340.0,Selling,USD,,,,,,,,,,,
,Wind MIll C Series,"""2013-08-20 11:27:27""",Wind MIll C Series,Products,Nos,Wind Mill C Series for Commercial Use 18ft,Yes,No,No,Yes,No,Yes,Yes,No,Yes,Yes,No,,Wind MIll C Series,,,,,Finished Goods - WP,0.0,,0.0,WMC,,,0.0,,0.0,0.0,,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00015,Nos,1.0,,,,,,,,,,,,,,RFD/00016,Standard Selling,400.0,Selling,USD,,,,,,,,,,,
,Wind Turbine,"""2013-08-20 11:29:26""",Wind Turbine,Products,Nos,Small Wind Turbine for Home Use,Yes,No,No,Yes,No,Yes,Yes,No,Yes,Yes,No,,Wind Turbine,,,,,Finished Goods - WP,0.0,,0.0,WTU,,,0.0,,0.0,0.0,,0,,,0.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00016,Nos,1.0,,,,,,,,,,,,,,RFD/00014,Standard Selling,300.0,Selling,USD,,,,,,,,,,,
,Wing Sheet,"""2013-08-20 11:11:55""",Wing Sheet,Raw Material,Nos,1/32 in. x 24 in. x 47 in. HDPE Opaque Sheet,Yes,No,No,No,Yes,Yes,Yes,No,No,No,No,,Wing Sheet,,,,,Stores - WP,0.0,,0.0,,,,0.0,,0.0,0.0,New World Realty,0,,,22.0,0.0,,,0.0,,,,0,,0,,,,,,,,,,,,UCDD/00017,Nos,1.0,,,,,,,,,,,,,,RFD/00013,Standard Buying,22.0,Buying,USD,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00029,Standard Selling,30.8,Selling,USD,,,,,,,,,,,
1 Data Import Template
2 Table: Item
3
4
5 Notes:
6 Please do not change the template headings.
7 First data column must be blank.
8 If you are uploading new records, leave the "name" (ID) column blank.
9 If you are uploading new records, "Naming Series" becomes mandatory, if present.
10 Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.
11 For updating, you can update only selective columns.
12 You can only upload upto 5000 records in one go. (may be less in some cases)
13
14 DocType: Item - - Item Reorder Item Reorder item_reorder item_reorder - - UOM Conversion Detail UOM Conversion Detail uom_conversion_details uom_conversion_details - - Item Supplier Item Supplier item_supplier_details item_supplier_details - - Item Customer Detail Item Customer Detail item_customer_details item_customer_details - - Item Tax Item Tax item_tax item_tax - - Item Price Item Price ref_rate_details ref_rate_details - - Item Quality Inspection Parameter Item Quality Inspection Parameter item_specification_details item_specification_details - - Website Item Group Website Item Group website_item_groups website_item_groups - - Item Website Specification Item Website Specification item_website_specifications item_website_specifications
15 Column Labels: ID Last Updated On Item Name Item Group Default Unit of Measure Description Is Stock Item Is Asset Item Has Batch No Has Serial No Is Purchase Item Is Sales Item Is Service Item Allow Samples Inspection Required Inspection Required Allow Bill of Materials Allow Bill of Materials Allow Production Order Allow Production Order Is Sub Contracted Item Is Sub Contracted Item Document Numbering Series Document Numbering Series Item Code Item Code Brand Brand Barcode Barcode Image Image Description HTML Description HTML Default Warehouse Default Warehouse Allowance Percent Allowance Percent Valuation Method Valuation Method Minimum Order Qty Minimum Order Qty Serial Number Series Serial Number Series Warranty Period (in days) Warranty Period (in days) End of Life End of Life Net Weight Net Weight Weight UOM Weight UOM Re-Order Level Re-Order Level Re-Order Qty Re-Order Qty Default Supplier Default Supplier Lead Time Days Lead Time Days Default Expense Account Default Expense Account Default Cost Center Default Cost Center Last Purchase Rate Last Purchase Rate Standard Rate Standard Rate Manufacturer Manufacturer Manufacturer Part Number Manufacturer Part Number Max Discount (%) Max Discount (%) Default Income Account Default Income Account Cost Center Cost Center Default BOM Default BOM Show in Website Show in Website Page Name Page Name Weightage Weightage Slideshow Slideshow Image Image Website Warehouse Website Warehouse Website Description Website Description - - ID ID Warehouse Warehouse Re-order Level Re-order Level Material Request Type Material Request Type Re-order Qty Re-order Qty - - ID ID UOM UOM Conversion Factor Conversion Factor - - ID ID Supplier Supplier Supplier Part Number Supplier Part Number - - ID ID Customer Name Customer Name Ref Code Ref Code - - ID ID Tax Tax Tax Rate Tax Rate - - ID ID Price List Name Price List Name Ref Rate Ref Rate Valid for Buying or Selling? Valid for Buying or Selling? Currency Currency - - ID ID Parameter Parameter Acceptance Criteria Acceptance Criteria - - ID ID Item Group Item Group - - ID ID Label Label Description Description
16 Column Name: name modified item_name item_group stock_uom description is_stock_item is_asset_item has_batch_no has_serial_no is_purchase_item is_sales_item is_service_item is_sample_item inspection_required inspection_required is_manufactured_item is_manufactured_item is_pro_applicable is_pro_applicable is_sub_contracted_item is_sub_contracted_item naming_series naming_series item_code item_code brand brand barcode barcode image image description_html description_html default_warehouse default_warehouse tolerance tolerance valuation_method valuation_method min_order_qty min_order_qty serial_no_series serial_no_series warranty_period warranty_period end_of_life end_of_life net_weight net_weight weight_uom weight_uom re_order_level re_order_level re_order_qty re_order_qty default_supplier default_supplier lead_time_days lead_time_days purchase_account purchase_account cost_center cost_center last_purchase_rate last_purchase_rate standard_rate standard_rate manufacturer manufacturer manufacturer_part_no manufacturer_part_no max_discount max_discount default_income_account default_income_account default_sales_cost_center default_sales_cost_center default_bom default_bom show_in_website show_in_website page_name page_name weightage weightage slideshow slideshow website_image website_image website_warehouse website_warehouse web_long_description web_long_description - - name name warehouse warehouse warehouse_reorder_level warehouse_reorder_level material_request_type material_request_type warehouse_reorder_qty warehouse_reorder_qty - - name name uom uom conversion_factor conversion_factor - - name name supplier supplier supplier_part_no supplier_part_no - - name name customer_name customer_name ref_code ref_code - - name name tax_type tax_type tax_rate tax_rate - - name name price_list price_list ref_rate ref_rate buying_or_selling buying_or_selling ref_currency ref_currency - - name name specification specification value value - - name name item_group item_group - - name name label label description description
17 Mandatory: Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No - - Yes Yes Yes Yes Yes No No - - Yes Yes No No No - - Yes Yes No No No - - Yes Yes Yes Yes - - Yes Yes Yes No No - - Yes Yes Yes Yes Yes No No - - Yes Yes Yes No No - - Yes Yes No No - - Yes Yes No No No
18 Type: Data (text) Data Data Link Link Small Text Select Select Select Select Select Select Select Select Select Select Select Select Select Data Data Link Link Data Data Select Select Small Text Small Text Link Link Float Float Select Select Float Float Data Data Data Date Date Float Float Link Link Float Float Float Link Link Int Int Link Link Link Float Float Float Data Data Data Float Float Link Link Link Link Check Check Data Data Int Int Link Link Select Select Link Link Text Editor Text Editor - - Data Data Link Link Float Float Select Select Float Float - - Data Data Link Link Float Float - - Data Data Link Link Data Data - - Data Data Link Link Data Data - - Data Data Link Link Float Float - - Data Data Link Link Currency Currency Select Select Link Link - - Data Data Data Data - - Data Data Link Link - - Data Data Data Text Text
19 Info: Don't change! Valid Item Group Valid UOM One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: Yes, No One of: ITEM One of: ITEM Valid Brand Valid Brand One of: attach_files: One of: attach_files: Valid Warehouse Valid Warehouse One of: FIFO, Moving Average One of: FIFO, Moving Average Valid UOM Valid UOM Valid Supplier Valid Supplier Integer Integer Valid Account Valid Account Valid Cost Center Valid Cost Center Valid Account Valid Account Valid Cost Center Valid Cost Center Valid BOM Valid BOM 0 or 1 0 or 1 Integer Integer Valid Website Slideshow Valid Website Slideshow One of: attach_files: One of: attach_files: Valid Warehouse Valid Warehouse - - Leave blank for new records Leave blank for new records Valid Warehouse Valid Warehouse One of: Purchase, Transfer One of: Purchase, Transfer - - Leave blank for new records Leave blank for new records Valid UOM Valid UOM - - Leave blank for new records Leave blank for new records Valid Supplier Valid Supplier - - Leave blank for new records Leave blank for new records Valid Customer Valid Customer - - Leave blank for new records Leave blank for new records Valid Account Valid Account - - Leave blank for new records Leave blank for new records Valid Price List Valid Price List One of: Buying, Selling One of: Buying, Selling Valid Currency Valid Currency - - Leave blank for new records Leave blank for new records - - Leave blank for new records Leave blank for new records Valid Item Group Valid Item Group - - Leave blank for new records Leave blank for new records
20 Start entering data below this line
21 Base Bearing Plate "2013-08-20 11:11:53" Base Bearing Plate Raw Material Nos 1/4 in. x 6 in. x 6 in. Mild Steel Plate Yes No No No Yes Yes Yes No No No No No Base Bearing Plate Base Bearing Plate Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Eagle Hardware Eagle Hardware 0 0 15.0 15.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00001 UCDD/00001 Nos Nos 1.0 1.0 RFD/00001 RFD/00001 Standard Buying Standard Buying 15.0 15.0 Buying Buying USD USD
22 RFD/00017 RFD/00017 Standard Selling Standard Selling 21.0 21.0 Selling Selling USD USD
23 Base Plate "2013-08-20 11:11:53" Base Plate Raw Material Nos 3/4 in. x 2 ft. x 4 ft. Pine Plywood Yes No No No Yes Yes Yes No No No No No Base Plate Base Plate Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 HomeBase HomeBase 0 0 20.0 20.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00002 UCDD/00002 Nos Nos 1.0 1.0 RFD/00002 RFD/00002 Standard Buying Standard Buying 20.0 20.0 Buying Buying USD USD
24 RFD/00018 RFD/00018 Standard Selling Standard Selling 28.0 28.0 Selling Selling USD USD
25 Bearing Assembly "2013-08-20 11:11:55" Bearing Assembly Sub Assemblies Nos Bearing Assembly Yes No No No No Yes No No No Yes Yes Yes No No Bearing Assembly Bearing Assembly Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Asiatic Solutions Asiatic Solutions 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00003 UCDD/00003 Nos Nos 1.0 1.0
26 Bearing Block "2013-08-20 11:11:54" Bearing Block Raw Material Nos CAST IRON, MCMASTER PART NO. 3710T13 Yes No No No Yes Yes Yes No No No No No Bearing Block Bearing Block Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Nan Duskin Nan Duskin 0 0 10.0 10.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00004 UCDD/00004 Nos Nos 1.0 1.0 RFD/00003 RFD/00003 Standard Buying Standard Buying 10.0 10.0 Buying Buying USD USD
27 RFD/00019 RFD/00019 Standard Selling Standard Selling 14.0 14.0 Selling Selling USD USD
28 Bearing Collar "2013-08-20 11:11:54" Bearing Collar Raw Material Nos 1 in. x 3 in. x 1 ft. Multipurpose Al Alloy Bar Yes No No No Yes Yes Yes No No No No No Bearing Collar Bearing Collar Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Eagle Hardware Eagle Hardware 0 0 20.0 20.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00005 UCDD/00005 Nos Nos 1.0 1.0 RFD/00004 RFD/00004 Standard Buying Standard Buying 20.0 20.0 Buying Buying USD USD
29 RFD/00020 RFD/00020 Standard Selling Standard Selling 28.0 28.0 Selling Selling USD USD
30 Bearing Pipe "2013-08-20 11:11:54" Bearing Pipe Raw Material Nos 1.5 in. Diameter x 36 in. Mild Steel Tubing Yes No No No Yes Yes Yes No No No No No Bearing Pipe Bearing Pipe Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 HomeBase HomeBase 0 0 15.0 15.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00006 UCDD/00006 Nos Nos 1.0 1.0 RFD/00005 RFD/00005 Standard Buying Standard Buying 15.0 15.0 Buying Buying USD USD
31 RFD/00021 RFD/00021 Standard Selling Standard Selling 21.0 21.0 Selling Selling USD USD
32 Blade Rib "2013-08-20 11:11:54" Blade Rib Raw Material Nos 1/2 in. x 2 ft. x 4 ft. Pine Plywood Yes No No No Yes Yes Yes No No No No No Blade Rib Blade Rib Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Ks Merchandise Ks Merchandise 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00007 UCDD/00007 Nos Nos 1.0 1.0 RFD/00006 RFD/00006 Standard Buying Standard Buying 10.0 10.0 Buying Buying USD USD
33 RFD/00022 RFD/00022 Standard Selling Standard Selling 14.0 14.0 Selling Selling USD USD
34 Disc Collars "2013-08-20 11:11:54" Disc Collars Raw Material Nos For Upper Bearing Yes No No No Yes Yes Yes No No No No No Disc Collars Disc Collars Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Asiatic Solutions Asiatic Solutions 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00008 UCDD/00008 Nos Nos 1.0 1.0 RFD/00007 RFD/00007 Standard Buying Standard Buying 74.0 74.0 Buying Buying USD USD
35 RFD/00023 RFD/00023 Standard Selling Standard Selling 103.6 103.6 Selling Selling USD USD
36 External Disc "2013-08-20 11:11:54" External Disc Raw Material Nos 15/32 in. x 4 ft. x 8 ft. 3-Ply Rtd Sheathing Yes No No No Yes Yes Yes No No No No No External Disc External Disc Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 HomeBase HomeBase 0 0 45.0 45.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00009 UCDD/00009 Nos Nos 1.0 1.0 RFD/00008 RFD/00008 Standard Buying Standard Buying 45.0 45.0 Buying Buying USD USD
37 RFD/00024 RFD/00024 Standard Selling Standard Selling 63.0 63.0 Selling Selling USD USD
38 Internal Disc "2013-08-20 11:11:54" Internal Disc Raw Material Nos For Bearing Collar Yes No No No Yes Yes Yes No No No No No Internal Disc Internal Disc Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 HomeBase HomeBase 0 0 33.0 33.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00010 UCDD/00010 Nos Nos 1.0 1.0 RFD/00009 RFD/00009 Standard Buying Standard Buying 33.0 33.0 Buying Buying USD USD
39 RFD/00025 RFD/00025 Standard Selling Standard Selling 46.2 46.2 Selling Selling USD USD
40 Shaft "2013-08-20 11:11:54" Shaft Raw Material Nos 1.25 in. Diameter x 6 ft. Mild Steel Tubing Yes No No No Yes Yes Yes No No No No No Shaft Shaft Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Eagle Hardware Eagle Hardware 0 0 30.0 30.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00011 UCDD/00011 Nos Nos 1.0 1.0 RFD/00010 RFD/00010 Standard Buying Standard Buying 30.0 30.0 Buying Buying USD USD
41 RFD/00026 RFD/00026 Standard Selling Standard Selling 42.0 42.0 Selling Selling USD USD
42 Stand "2013-08-20 11:11:54" Stand Raw Material Nos N/A Yes No No No Yes Yes Yes No No No No No Stand Stand Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Scott Ties Scott Ties 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00012 UCDD/00012 Nos Nos 1.0 1.0 RFD/00011 RFD/00011 Standard Buying Standard Buying 40.0 40.0 Buying Buying USD USD
43 RFD/00027 RFD/00027 Standard Selling Standard Selling 56.0 56.0 Selling Selling USD USD
44 Upper Bearing Plate "2013-08-20 11:11:54" Upper Bearing Plate Raw Material Nos 3/16 in. x 6 in. x 6 in. Low Carbon Steel Plate Yes No No No Yes Yes Yes No No No No No Upper Bearing Plate Upper Bearing Plate Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Eagle Hardware Eagle Hardware 0 0 50.0 50.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00013 UCDD/00013 Nos Nos 1.0 1.0 RFD/00012 RFD/00012 Standard Buying Standard Buying 50.0 50.0 Buying Buying USD USD
45 RFD/00028 RFD/00028 Standard Selling Standard Selling 70.0 70.0 Selling Selling USD USD
46 Wind Mill A Series "2013-08-20 11:27:46" Wind Mill A Series Products Nos Wind Mill A Series for Home Use 9ft Yes No No Yes No Yes Yes No No Yes Yes Yes No No Wind Mill A Series Wind Mill A Series Finished Goods - WP Finished Goods - WP 0.0 0.0 0.0 0.0 WMA WMA 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00014 UCDD/00014 Nos Nos 1.0 1.0 RFD/00015 RFD/00015 Standard Selling Standard Selling 340.0 340.0 Selling Selling USD USD
47 Wind MIll C Series "2013-08-20 11:27:27" Wind MIll C Series Products Nos Wind Mill C Series for Commercial Use 18ft Yes No No Yes No Yes Yes No No Yes Yes Yes No No Wind MIll C Series Wind MIll C Series Finished Goods - WP Finished Goods - WP 0.0 0.0 0.0 0.0 WMC WMC 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00015 UCDD/00015 Nos Nos 1.0 1.0 RFD/00016 RFD/00016 Standard Selling Standard Selling 400.0 400.0 Selling Selling USD USD
48 Wind Turbine "2013-08-20 11:29:26" Wind Turbine Products Nos Small Wind Turbine for Home Use Yes No No Yes No Yes Yes No No Yes Yes Yes No No Wind Turbine Wind Turbine Finished Goods - WP Finished Goods - WP 0.0 0.0 0.0 0.0 WTU WTU 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00016 UCDD/00016 Nos Nos 1.0 1.0 RFD/00014 RFD/00014 Standard Selling Standard Selling 300.0 300.0 Selling Selling USD USD
49 Wing Sheet "2013-08-20 11:11:55" Wing Sheet Raw Material Nos 1/32 in. x 24 in. x 47 in. HDPE Opaque Sheet Yes No No No Yes Yes Yes No No No No No Wing Sheet Wing Sheet Stores - WP Stores - WP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 New World Realty New World Realty 0 0 22.0 22.0 0.0 0.0 0.0 0.0 0 0 0 0 UCDD/00017 UCDD/00017 Nos Nos 1.0 1.0 RFD/00013 RFD/00013 Standard Buying Standard Buying 22.0 22.0 Buying Buying USD USD
50 RFD/00029 RFD/00029 Standard Selling Standard Selling 30.8 30.8 Selling Selling USD USD

View File

@ -29,7 +29,7 @@ prob = {
"Purchase Receipt": { "make": 0.7, "qty": (1,15) },
}
def make(reset=False):
def make(reset=False, simulate=True):
webnotes.connect()
#webnotes.print_messages = True
webnotes.mute_emails = True
@ -37,7 +37,8 @@ def make(reset=False):
if reset:
setup()
simulate()
if simulate:
simulate()
def setup():
install()
@ -266,11 +267,11 @@ def make_stock_entry_from_pro(pro_id, purpose, current_date):
from stock.stock_ledger import NegativeStockError
from stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, DuplicateEntryForProductionOrderError
st = webnotes.bean(make_stock_entry(pro_id, purpose))
st.doc.posting_date = current_date
st.doc.fiscal_year = "2013"
st.doc.expense_adjustment_account = "Stock in Hand - WP"
try:
st = webnotes.bean(make_stock_entry(pro_id, purpose))
st.doc.posting_date = current_date
st.doc.fiscal_year = "2013"
st.doc.expense_adjustment_account = "Stock in Hand - WP"
st.insert()
webnotes.conn.commit()
st.submit()
@ -278,7 +279,7 @@ def make_stock_entry_from_pro(pro_id, purpose, current_date):
except NegativeStockError: pass
except IncorrectValuationRateError: pass
except DuplicateEntryForProductionOrderError: pass
def make_quotation(current_date):
b = webnotes.bean([{
"creation": current_date,
@ -406,7 +407,7 @@ def import_data(dt, submit=False):
for doctype in dt:
print "Importing", doctype.replace("_", " "), "..."
webnotes.form_dict = {}
webnotes.form_dict = webnotes._dict()
if submit:
webnotes.form_dict["params"] = json.dumps({"_submit": 1})
webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", doctype+".csv")

View File

@ -3,12 +3,29 @@ if __name__=="__main__":
sys.path.extend([".", "lib", "app"])
import webnotes, os
import utilities.demo.make_demo
def make_demo_app():
import utilities.demo.make_demo
utilities.demo.make_demo.make(reset=True)
def make_demo_user():
roles = ["Accounts Manager", "Analytics", "Expense Approver", "Accounts User",
"Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager",
"HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager",
"Material Master Manager", "Material User", "Partner", "Manufacturing Manager",
"Manufacturing User", "Projects User", "Purchase Manager", "Purchase Master Manager",
"Purchase User", "Quality Manager", "Report Manager", "Sales Master Manager",
"Sales User", "Supplier", "Support Team"]
def add_roles(bean):
for role in roles:
p.doclist.append({
"doctype": "UserRole",
"parentfield": "user_roles",
"role": role
})
# make demo user
if webnotes.conn.exists("Profile", "demo@erpnext.com"):
webnotes.delete_doc("Profile", "demo@erpnext.com")
@ -21,21 +38,32 @@ def make_demo_user():
p.doc.send_invite_email = 0
p.doc.new_password = "demo"
p.insert()
for role in ("Accounts Manager", "Analytics", "Expense Approver", "Accounts User",
"Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager",
"HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager",
"Material Master Manager", "Material User", "Partner", "Manufacturing Manager",
"Manufacturing User", "Projects User", "Purchase Manager", "Purchase Master Manager",
"Purchase User", "Quality Manager", "Report Manager", "Sales Master Manager", "Sales User",
"Supplier", "Support Team"):
p.doclist.append({
"doctype": "UserRole",
"parentfield": "user_roles",
"role": role
})
add_roles(p)
p.save()
# make system manager user
if webnotes.conn.exists("Profile", "admin@erpnext.com"):
webnotes.delete_doc("Profile", "admin@erpnext.com")
p = webnotes.new_bean("Profile")
p.doc.email = "admin@erpnext.com"
p.doc.first_name = "Admin"
p.doc.last_name = "User"
p.doc.enabled = 1
p.doc.user_type = "System User"
p.doc.send_invite_email = 0
p.doc.new_password = "admin010123"
p.insert()
roles.append("System Manager")
add_roles(p)
p.save()
# only read for newsletter
webnotes.conn.sql("""update `tabDocPerm` set `write`=0, `create`=0, `cancel`=0
where parent='Newsletter'""")
webnotes.conn.sql("""update `tabDocPerm` set `write`=0, `create`=0, `cancel`=0
where parent='Profile' and role='All'""")
webnotes.conn.commit()
def make_demo_login_page():
@ -60,7 +88,10 @@ def make_demo_login_page():
p.insert()
webnotes.conn.set_value("Website Settings", None, "home_page", "demo-login")
website_settings = webnotes.bean("Website Settings", "Website Settings")
website_settings.doc.home_page = "demo-login"
website_settings.doc.disable_signup = 1
website_settings.save()
webnotes.conn.commit()
@ -71,11 +102,20 @@ def make_demo_on_login_script():
s.doc.script_type = "Server"
with open(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), "r") as dfile:
s.doc.script = dfile.read()
s.insert()
cp = webnotes.bean("Control Panel")
cp.doc.custom_startup_code = """wn.ui.toolbar.show_banner('You are using ERPNext Demo. To start your own ERPNext Trial, <a href="https://erpnext.com/pricing-and-signup" target="_blank">click here</a>')"""
cp.save()
webnotes.conn.commit()
if __name__=="__main__":
webnotes.connect()
# webnotes.connect()
webnotes.mute_emails = 1
make_demo_app()
utilities.demo.make_demo.make(reset=True, simulate=False)
# setup demo user etc so that the site it up faster, while the data loads
make_demo_user()
make_demo_login_page()
make_demo_on_login_script()
make_demo_on_login_script()
utilities.demo.make_demo.make(reset=False, simulate=True)

View File

@ -7,7 +7,7 @@ from webnotes.utils import cstr
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
class DocType(TransactionBase):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist

View File

@ -55,6 +55,8 @@ class TransactionBase(StatusUpdater):
return self._party_type_and_name
def get_customer_defaults(self):
if not self.doc.customer: return {}
out = self.get_default_address_and_contact("customer")
customer = webnotes.doc("Customer", self.doc.customer)

View File

@ -18,14 +18,6 @@ img {
padding-bottom: 30px;
}
.outer {
padding: 0px 20px;
}
.navbar {
margin: 0px -20px;
}
.banner {
margin-top: 20px;
padding: 0px 20px;
@ -56,6 +48,7 @@ img {
div.web-footer {
padding-top: 10px;
padding-bottom: 20px;
}
.web-footer-menu ul {

View File

@ -5,6 +5,7 @@
from __future__ import unicode_literals
import webnotes
from webnotes import _
class DocType:
def __init__(self, d, dl):
@ -23,3 +24,18 @@ class DocType:
b.doc.blogger = self.doc.name
b.save()
def get_writers_args():
bloggers = webnotes.conn.sql("""select * from `tabBlogger`
where ifnull(posts,0) > 0 and ifnull(disabled,0)=0
order by posts desc""", as_dict=1)
args = {
"bloggers": bloggers,
"texts": {
"all_posts_by": _("All posts by")
},
"categories": webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
}
args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
return args

View File

@ -2,7 +2,7 @@
{
"creation": "2013-03-25 16:00:51",
"docstatus": 0,
"modified": "2013-07-05 14:27:34",
"modified": "2013-08-30 16:35:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -39,6 +39,12 @@
"doctype": "DocType",
"name": "Blogger"
},
{
"doctype": "DocField",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
},
{
"description": "Will be used in url (usually first name).",
"doctype": "DocField",

View File

@ -119,18 +119,3 @@ def get_blog_template_args():
}
args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
return args
def get_writers_args():
bloggers = webnotes.conn.sql("""select * from `tabBlogger`
order by posts desc""", as_dict=1)
args = {
"bloggers": bloggers,
"texts": {
"all_posts_by": _("All posts by")
},
"categories": webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
}
args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
return args

View File

@ -20,7 +20,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
# make lead / communication
from selling.doctype.lead.get_leads import add_sales_communication
add_sales_communication(subject or "Website Query", message, sender, sender,
message = add_sales_communication(subject or "Website Query", message, sender, sender,
mail=None, status=status)
# guest method, cap max writes per hour
@ -29,4 +29,4 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
webnotes.response["message"] = "Sorry: we believe we have received an unreasonably high number of requests of this kind. Please try later"
return
webnotes.response["message"] = 'Thank You'
webnotes.response.status = "okay"

View File

@ -1,8 +1,4 @@
<style>
[itemprop="articleBody"] {
font-size: 120%;
}
.comment-title {
color:#777;
}

View File

@ -2,7 +2,7 @@
<hr />
{% if categories %}
<h5>Explore posts by categories</h5>
<ul class="breadcrumb" style="background-color: transparent; padding-left: 0px;">
<ul class="breadcrumb" style="background-color: transparent; padding-left: 20px;">
{% for category in categories %}
<li><a href="blog?category={{ category }}">{{ category }}</a>
{% endfor %}

View File

@ -1,6 +1,7 @@
{% extends "lib/templates/base.html" %}
{% block body %}
{% include "app/website/templates/html/navbar.html" %}
<div class="container">
<div class="pull-right" style="margin:4px;" id="user-tools">
{% if shopping_cart_enabled -%}
@ -23,7 +24,6 @@
<div class="col-md-12">{{ banner_html }}</div>
</div>{% endif %}
<div class="outer">
{% include "app/website/templates/html/navbar.html" %}
<div class="content row" id="page-{{ name }}" style="display: block;">
{%- block content -%}
{%- endblock -%}

View File

@ -26,7 +26,12 @@ $(document).ready(function() {
sender: email,
message: message,
callback: function(r) {
msgprint(r.message);
if(r.status==="okay") {
msgprint(r.message || "Thank you for your message.")
} else {
msgprint("There were errors");
console.log(r.exc);
}
$(':input').val('');
}
});

View File

@ -32,7 +32,7 @@
</p>
</div>
{% if obj.doc.address %}
<div class="col-md-3 col-md-offset-1 alert" style="margin-top: 20px;" itemscope itemtype="http://schema.org/PostalAddress">
<div class="col-md-3 col-md-offset-1 alert alert-warning" style="margin-top: 20px;" itemscope itemtype="http://schema.org/PostalAddress">
<h4><i class="icon-map-marker"></i> {{ obj.address.address_title }}</h4>
{% if obj.address.address_line1 %}
<span itemprop="streetAddress">{{ obj.address.address_line1 }}</span><br>