[merge] [minor] merged with master
This commit is contained in:
commit
da3110fc12
@ -262,13 +262,11 @@ class DocType(BuyingController):
|
|||||||
if d.purchase_order:
|
if d.purchase_order:
|
||||||
submitted = sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order)
|
submitted = sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order)
|
||||||
if not submitted:
|
if not submitted:
|
||||||
msgprint("Purchase Order : "+ cstr(d.purchase_order) +" is not submitted")
|
webnotes.throw("Purchase Order : "+ cstr(d.purchase_order) +" is not submitted")
|
||||||
raise Exception , "Validation Error."
|
|
||||||
if d.purchase_receipt:
|
if d.purchase_receipt:
|
||||||
submitted = sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt)
|
submitted = sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt)
|
||||||
if not submitted:
|
if not submitted:
|
||||||
msgprint("Purchase Receipt : "+ cstr(d.purchase_receipt) +" is not submitted")
|
webnotes.throw("Purchase Receipt : "+ cstr(d.purchase_receipt) +" is not submitted")
|
||||||
raise Exception , "Validation Error."
|
|
||||||
|
|
||||||
|
|
||||||
def update_against_document_in_jv(self):
|
def update_against_document_in_jv(self):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:05",
|
"creation": "2013-05-24 19:29:05",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-31 10:11:41",
|
"modified": "2013-08-31 10:19:01",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.utils import flt
|
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):
|
def execute(filters=None):
|
||||||
if not filters: filters = {}
|
if not filters: filters = {}
|
||||||
@ -21,10 +21,15 @@ def execute(filters=None):
|
|||||||
data = []
|
data = []
|
||||||
for row in source:
|
for row in source:
|
||||||
selling_amount = flt(row.amount)
|
selling_amount = flt(row.amount)
|
||||||
|
|
||||||
buying_amount = get_buying_amount(row.item_code, row.parenttype, row.name, row.item_row,
|
item_sales_bom_map = item_sales_bom.get(row.parenttype, {}).get(row.name, webnotes._dict())
|
||||||
stock_ledger_entries.get((row.item_code, row.warehouse), []),
|
|
||||||
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
|
buying_amount = buying_amount > 0 and buying_amount or 0
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
},
|
},
|
||||||
"writers": {
|
"writers": {
|
||||||
"template": "app/website/templates/pages/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": {
|
"profile": {
|
||||||
"no_cache": true,
|
"no_cache": true,
|
||||||
|
@ -17,7 +17,6 @@ class BuyingController(StockController):
|
|||||||
def onload_post_render(self):
|
def onload_post_render(self):
|
||||||
# contact, address, item details
|
# contact, address, item details
|
||||||
self.set_missing_values()
|
self.set_missing_values()
|
||||||
self.set_taxes("purchase_tax_details", "purchase_other_charges")
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
super(BuyingController, self).validate()
|
super(BuyingController, self).validate()
|
||||||
@ -40,6 +39,8 @@ class BuyingController(StockController):
|
|||||||
self.doc.fields[fieldname] = val
|
self.doc.fields[fieldname] = val
|
||||||
|
|
||||||
self.set_missing_item_details(get_item_details)
|
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):
|
def set_supplier_from_item_default(self):
|
||||||
if self.meta.get_field("supplier") and not self.doc.supplier:
|
if self.meta.get_field("supplier") and not self.doc.supplier:
|
||||||
|
@ -14,15 +14,15 @@ class SellingController(StockController):
|
|||||||
def onload_post_render(self):
|
def onload_post_render(self):
|
||||||
# contact, address, item details and pos details (if applicable)
|
# contact, address, item details and pos details (if applicable)
|
||||||
self.set_missing_values()
|
self.set_missing_values()
|
||||||
self.set_taxes("other_charges", "charge")
|
|
||||||
|
|
||||||
def set_missing_values(self, for_validate=False):
|
def set_missing_values(self, for_validate=False):
|
||||||
super(SellingController, self).set_missing_values(for_validate)
|
super(SellingController, self).set_missing_values(for_validate)
|
||||||
|
|
||||||
# set contact and address details for customer, if they are not mentioned
|
# set contact and address details for customer, if they are not mentioned
|
||||||
self.set_missing_lead_customer_details()
|
self.set_missing_lead_customer_details()
|
||||||
|
|
||||||
self.set_price_list_and_item_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):
|
def set_missing_lead_customer_details(self):
|
||||||
if self.doc.customer:
|
if self.doc.customer:
|
||||||
|
@ -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)
|
|
||||||
|
|
||||||
|
|
23
docs/docs.md
23
docs/docs.md
@ -7,28 +7,25 @@
|
|||||||
"docs.dev",
|
"docs.dev",
|
||||||
"docs.download",
|
"docs.download",
|
||||||
"docs.community",
|
"docs.community",
|
||||||
"docs.blog",
|
"docs.blog"
|
||||||
"docs.about"
|
|
||||||
],
|
],
|
||||||
"_no_toc": 1
|
"_no_toc": 1
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
<div style="margin: 10px 0px">
|
<div class="text-center" style="margin: 10px 0px">
|
||||||
<h1 style="text-align: center">All-in-One Platform to Manage Your Organization.</h1>
|
<h1>ERPNext Docs (beta)</h1>
|
||||||
<h3 style="text-align: center; font-weight: normal; color: #888">100% Free and Open Source.</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>
|
</div>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Welcome to the ERPNext Documentation + Community Site
|
||||||
|
|
||||||
### What is ERPNext?
|
### 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.
|
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.
|
||||||
- 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.
|
|
||||||
|
49
patches/august_2013/fix_fiscal_year.py
Normal file
49
patches/august_2013/fix_fiscal_year.py
Normal 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
|
||||||
|
|
@ -9,17 +9,8 @@ from core.doctype.communication.communication import make
|
|||||||
|
|
||||||
def add_sales_communication(subject, content, sender, real_name, mail=None,
|
def add_sales_communication(subject, content, sender, real_name, mail=None,
|
||||||
status="Open", date=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})
|
lead_name = webnotes.conn.get_value("Lead", {"email_id": sender})
|
||||||
contact_name = webnotes.conn.get_value("Contact", {"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):
|
if not (lead_name or contact_name):
|
||||||
# none, create a new Lead
|
# none, create a new Lead
|
||||||
@ -34,14 +25,13 @@ def add_sales_communication(subject, content, sender, real_name, mail=None,
|
|||||||
lead.insert()
|
lead.insert()
|
||||||
lead_name = lead.doc.name
|
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)
|
lead=lead_name, contact=contact_name, date=date)
|
||||||
|
|
||||||
if contact_name:
|
if mail:
|
||||||
set_status("Contact", contact_name)
|
# save attachments to parent if from mail
|
||||||
elif lead_name:
|
bean = webnotes.bean("Contact" if contact_name else "Lead", contact_name or lead_name)
|
||||||
set_status("Lead", lead_name)
|
mail.save_attachments_in_doc(bean.doc)
|
||||||
|
|
||||||
|
|
||||||
class SalesMailbox(POP3Mailbox):
|
class SalesMailbox(POP3Mailbox):
|
||||||
def setup(self, args=None):
|
def setup(self, args=None):
|
||||||
|
@ -39,17 +39,14 @@ class DocType(SellingController):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
|
if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
|
||||||
msgprint("Please Enter Lost Reason under More Info section")
|
webnotes.throw("Please Enter Lost Reason under More Info section")
|
||||||
raise Exception
|
|
||||||
|
|
||||||
if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
|
if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
|
||||||
msgprint("Please specify campaign name")
|
webnotes.throw("Please specify campaign name")
|
||||||
raise Exception
|
|
||||||
|
|
||||||
if self.doc.email_id:
|
if self.doc.email_id:
|
||||||
if not validate_email_add(self.doc.email_id):
|
if not validate_email_add(self.doc.email_id):
|
||||||
msgprint('Please enter valid email id.')
|
webnotes.throw('Please enter valid email id.')
|
||||||
raise Exception
|
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
self.check_email_id_is_unique()
|
self.check_email_id_is_unique()
|
||||||
|
@ -95,7 +95,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
return{
|
return{
|
||||||
query : "selling.doctype.sales_common.sales_common.get_batch_no",
|
query : "selling.doctype.sales_common.sales_common.get_batch_no",
|
||||||
filters: {
|
filters: {
|
||||||
'item': item.item_code,
|
'item_code': item.item_code,
|
||||||
'posting_date': me.frm.doc.posting_date
|
'posting_date': me.frm.doc.posting_date
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
and batch_no like '%(txt)s'
|
and batch_no like '%(txt)s'
|
||||||
and exists(select * from `tabBatch`
|
and exists(select * from `tabBatch`
|
||||||
where name = sle.batch_no
|
where name = sle.batch_no
|
||||||
and expiry_date >= '%(posting_date)s'
|
and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s')
|
||||||
and docstatus != 2)
|
and docstatus != 2)
|
||||||
%(mcond)s
|
%(mcond)s
|
||||||
group by batch_no having sum(actual_qty) > 0
|
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
|
return webnotes.conn.sql("""select name from tabBatch
|
||||||
where docstatus != 2
|
where docstatus != 2
|
||||||
and item = '%(item_code)s'
|
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'
|
and name like '%(txt)s'
|
||||||
%(mcond)s
|
%(mcond)s
|
||||||
order by name desc
|
order by name desc
|
||||||
limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'],
|
limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'],
|
||||||
'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt,
|
'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt,
|
||||||
'mcond':get_match_cond(doctype, searchfield),'start': start,
|
'mcond':get_match_cond(doctype, searchfield),'start': start,
|
||||||
'page_len': page_len})
|
'page_len': page_len})
|
||||||
|
@ -126,8 +126,9 @@ class DocType(SellingController):
|
|||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
self.validate_proj_cust()
|
self.validate_proj_cust()
|
||||||
self.validate_po()
|
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_for_items()
|
||||||
|
self.validate_warehouse_user()
|
||||||
sales_com_obj = get_obj(dt = 'Sales Common')
|
sales_com_obj = get_obj(dt = 'Sales Common')
|
||||||
sales_com_obj.check_active_sales_items(self)
|
sales_com_obj.check_active_sales_items(self)
|
||||||
sales_com_obj.check_conversion_rate(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.billing_status: self.doc.billing_status = 'Not Billed'
|
||||||
if not self.doc.delivery_status: self.doc.delivery_status = 'Not Delivered'
|
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):
|
def validate_with_previous_doc(self):
|
||||||
super(DocType, self).validate_with_previous_doc(self.tname, {
|
super(DocType, self).validate_with_previous_doc(self.tname, {
|
||||||
"Quotation": {
|
"Quotation": {
|
||||||
|
@ -272,6 +272,29 @@ class TestSalesOrder(unittest.TestCase):
|
|||||||
self.check_reserved_qty(sbom_test_records[0][2]["item_code"],
|
self.check_reserved_qty(sbom_test_records[0][2]["item_code"],
|
||||||
so.doclist[1].reserved_warehouse, 20.0)
|
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_dependencies = ["Sales BOM"]
|
||||||
|
|
||||||
test_records = [
|
test_records = [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-03 10:45:46",
|
"creation": "2013-05-03 10:45:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-14 11:46:49",
|
"modified": "2013-08-30 16:21:38",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -35,7 +35,9 @@
|
|||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read": 1
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"submit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@ -557,20 +559,6 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"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\"",
|
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -878,9 +866,7 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"report": 1,
|
|
||||||
"role": "Material Master Manager",
|
"role": "Material Master Manager",
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -888,9 +874,7 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"report": 1,
|
|
||||||
"role": "Material Manager",
|
"role": "Material Manager",
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -898,21 +882,7 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"report": 1,
|
|
||||||
"role": "Material User",
|
"role": "Material User",
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "DocPerm",
|
|
||||||
"role": "Sales User"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "DocPerm",
|
|
||||||
"role": "Purchase User"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "DocPerm",
|
|
||||||
"role": "Accounts User"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -44,7 +44,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
@ -82,7 +81,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
@ -108,7 +106,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
@ -128,7 +125,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
@ -149,7 +145,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "Yes",
|
"is_pro_applicable": "Yes",
|
||||||
"is_sub_contracted_item": "Yes",
|
"is_sub_contracted_item": "Yes",
|
||||||
@ -168,7 +163,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
@ -188,7 +182,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
@ -209,7 +202,6 @@ test_records = [
|
|||||||
"is_purchase_item": "Yes",
|
"is_purchase_item": "Yes",
|
||||||
"is_sales_item": "Yes",
|
"is_sales_item": "Yes",
|
||||||
"is_service_item": "No",
|
"is_service_item": "No",
|
||||||
"is_sample_item": "No",
|
|
||||||
"inspection_required": "No",
|
"inspection_required": "No",
|
||||||
"is_pro_applicable": "No",
|
"is_pro_applicable": "No",
|
||||||
"is_sub_contracted_item": "No",
|
"is_sub_contracted_item": "No",
|
||||||
|
@ -42,11 +42,42 @@ class TestStockEntry(unittest.TestCase):
|
|||||||
|
|
||||||
def test_warehouse_company_validation(self):
|
def test_warehouse_company_validation(self):
|
||||||
self._clear_stock_account_balance()
|
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
|
from stock.doctype.stock_ledger_entry.stock_ledger_entry import InvalidWarehouseCompany
|
||||||
st1 = webnotes.bean(copy=test_records[0])
|
st1 = webnotes.bean(copy=test_records[0])
|
||||||
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
|
st1.doclist[1].t_warehouse="_Test Warehouse 2 - _TC1"
|
||||||
st1.insert()
|
st1.insert()
|
||||||
self.assertRaises(InvalidWarehouseCompany, st1.submit)
|
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):
|
def test_material_receipt_gl_entry(self):
|
||||||
self._clear_stock_account_balance()
|
self._clear_stock_account_balance()
|
||||||
|
@ -25,12 +25,14 @@ class DocType(DocListController):
|
|||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
from stock.utils import validate_warehouse_user
|
||||||
if not hasattr(webnotes, "new_stock_ledger_entries"):
|
if not hasattr(webnotes, "new_stock_ledger_entries"):
|
||||||
webnotes.new_stock_ledger_entries = []
|
webnotes.new_stock_ledger_entries = []
|
||||||
|
|
||||||
webnotes.new_stock_ledger_entries.append(self.doc)
|
webnotes.new_stock_ledger_entries.append(self.doc)
|
||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
self.validate_item()
|
self.validate_item()
|
||||||
self.validate_warehouse_user()
|
validate_warehouse_user(self.doc.warehouse)
|
||||||
self.validate_warehouse_company()
|
self.validate_warehouse_company()
|
||||||
self.actual_amt_check()
|
self.actual_amt_check()
|
||||||
self.check_stock_frozen_date()
|
self.check_stock_frozen_date()
|
||||||
@ -55,16 +57,6 @@ class DocType(DocListController):
|
|||||||
|
|
||||||
self.doc.fields.pop('batch_bal')
|
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):
|
def validate_warehouse_company(self):
|
||||||
warehouse_company = webnotes.conn.get_value("Warehouse", self.doc.warehouse, "company")
|
warehouse_company = webnotes.conn.get_value("Warehouse", self.doc.warehouse, "company")
|
||||||
if warehouse_company and warehouse_company != self.doc.company:
|
if warehouse_company and warehouse_company != self.doc.company:
|
||||||
|
@ -287,8 +287,8 @@ class DocType(StockController):
|
|||||||
|
|
||||||
stock_value_difference = {}
|
stock_value_difference = {}
|
||||||
for d in self.entries:
|
for d in self.entries:
|
||||||
diff = get_buying_amount(d.item_code, self.doc.doctype, self.doc.name,
|
diff = get_buying_amount(self.doc.doctype, self.doc.name, d.voucher_detail_no,
|
||||||
d.voucher_detail_no, stock_ledger_entries.get((d.item_code, d.warehouse), []))
|
stock_ledger_entries.get((d.item_code, d.warehouse), []))
|
||||||
stock_value_difference.setdefault(d.warehouse, 0.0)
|
stock_value_difference.setdefault(d.warehouse, 0.0)
|
||||||
stock_value_difference[d.warehouse] -= diff
|
stock_value_difference[d.warehouse] -= diff
|
||||||
|
|
||||||
|
@ -17,7 +17,11 @@ test_records = [
|
|||||||
[{
|
[{
|
||||||
"doctype": "Warehouse",
|
"doctype": "Warehouse",
|
||||||
"warehouse_name": "_Test Warehouse 2",
|
"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"
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-08-20 15:08:10",
|
"creation": "2013-08-20 15:08:10",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-20 15:10:43",
|
"modified": "2013-08-20 15:10:45",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -10,7 +10,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"name": "__common__",
|
"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",
|
"ref_doctype": "Item",
|
||||||
"report_name": "Items To Be Requested",
|
"report_name": "Items To Be Requested",
|
||||||
"report_type": "Query Report"
|
"report_type": "Query Report"
|
||||||
|
@ -8,6 +8,7 @@ from webnotes.utils import flt, cstr, nowdate, add_days, cint
|
|||||||
from webnotes.defaults import get_global_default
|
from webnotes.defaults import get_global_default
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
|
|
||||||
|
class UserNotAllowedForWarehouse(webnotes.ValidationError): pass
|
||||||
|
|
||||||
def get_stock_balance_on(warehouse_list, posting_date=None):
|
def get_stock_balance_on(warehouse_list, posting_date=None):
|
||||||
if not posting_date: posting_date = nowdate()
|
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])
|
wlist.append([w])
|
||||||
return wlist
|
return wlist
|
||||||
|
|
||||||
def get_buying_amount(item_code, voucher_type, voucher_no, voucher_detail_no,
|
def validate_warehouse_user(warehouse):
|
||||||
stock_ledger_entries, item_sales_bom=None):
|
if webnotes.session.user=="Administrator":
|
||||||
if item_sales_bom and item_sales_bom.get(item_code):
|
return
|
||||||
# sales bom item
|
warehouse_users = [p[0] for p in webnotes.conn.sql("""select user from `tabWarehouse User`
|
||||||
buying_amount = 0.0
|
where parent=%s""", warehouse)]
|
||||||
for bom_item in item_sales_bom[item_code]:
|
|
||||||
if bom_item.get("parent_detail_docname")==voucher_detail_no:
|
if warehouse_users and not (webnotes.session.user in warehouse_users):
|
||||||
buying_amount += _get_buying_amount(voucher_type, voucher_no, voucher_detail_no, stock_ledger_entries)
|
webnotes.throw(_("Not allowed entry in Warehouse") \
|
||||||
return buying_amount
|
+ ": " + warehouse, UserNotAllowedForWarehouse)
|
||||||
else:
|
|
||||||
# doesn't have sales bom
|
def get_sales_bom_buying_amount(item_code, warehouse, voucher_type, voucher_no, voucher_detail_no,
|
||||||
return _get_buying_amount(voucher_type, voucher_no, voucher_detail_no, stock_ledger_entries)
|
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
|
# IMP NOTE
|
||||||
# stock_ledger_entries should already be filtered by item_code and warehouse and
|
# stock_ledger_entries should already be filtered by item_code and warehouse and
|
||||||
# sorted by posting_date desc, posting_time desc
|
# sorted by posting_date desc, posting_time desc
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-01 10:36:25",
|
"creation": "2013-02-01 10:36:25",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-08 14:22:34",
|
"modified": "2013-08-28 18:29:06",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -224,17 +224,6 @@
|
|||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
"read_only": 1
|
"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",
|
"doctype": "DocField",
|
||||||
"fieldname": "first_responded_on",
|
"fieldname": "first_responded_on",
|
||||||
@ -254,6 +243,17 @@
|
|||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"search_index": 0
|
"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",
|
"doctype": "DocField",
|
||||||
"fieldname": "content_type",
|
"fieldname": "content_type",
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<p>
|
<p>
|
||||||
<input id="lead-email" type="email"
|
<input id="lead-email" type="email"
|
||||||
class="form-control" placeholder="Your Email Id">
|
class="form-control" placeholder="Your Email Id (optional)">
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<button type="submit" id="login_btn"
|
<button type="submit" id="login_btn"
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
Table:,Item,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
Table:,Item,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
"If you are uploading new records, leave the ""name"" (ID) column 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.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
"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.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
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.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
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,
|
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 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,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
|
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,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
|
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,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
|
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: 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,,
|
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,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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 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,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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 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,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 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,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,,,,,,,,,,,
|
,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,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,,,,,,,,,,,
|
,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,,,,,,,,,,,
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RFD/00029,Standard Selling,30.8,Selling,USD,,,,,,,,,,,
|
|
@ -29,7 +29,7 @@ prob = {
|
|||||||
"Purchase Receipt": { "make": 0.7, "qty": (1,15) },
|
"Purchase Receipt": { "make": 0.7, "qty": (1,15) },
|
||||||
}
|
}
|
||||||
|
|
||||||
def make(reset=False):
|
def make(reset=False, simulate=True):
|
||||||
webnotes.connect()
|
webnotes.connect()
|
||||||
#webnotes.print_messages = True
|
#webnotes.print_messages = True
|
||||||
webnotes.mute_emails = True
|
webnotes.mute_emails = True
|
||||||
@ -37,7 +37,8 @@ def make(reset=False):
|
|||||||
|
|
||||||
if reset:
|
if reset:
|
||||||
setup()
|
setup()
|
||||||
simulate()
|
if simulate:
|
||||||
|
simulate()
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
install()
|
install()
|
||||||
@ -266,11 +267,11 @@ def make_stock_entry_from_pro(pro_id, purpose, current_date):
|
|||||||
from stock.stock_ledger import NegativeStockError
|
from stock.stock_ledger import NegativeStockError
|
||||||
from stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, DuplicateEntryForProductionOrderError
|
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:
|
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()
|
st.insert()
|
||||||
webnotes.conn.commit()
|
webnotes.conn.commit()
|
||||||
st.submit()
|
st.submit()
|
||||||
@ -278,7 +279,7 @@ def make_stock_entry_from_pro(pro_id, purpose, current_date):
|
|||||||
except NegativeStockError: pass
|
except NegativeStockError: pass
|
||||||
except IncorrectValuationRateError: pass
|
except IncorrectValuationRateError: pass
|
||||||
except DuplicateEntryForProductionOrderError: pass
|
except DuplicateEntryForProductionOrderError: pass
|
||||||
|
|
||||||
def make_quotation(current_date):
|
def make_quotation(current_date):
|
||||||
b = webnotes.bean([{
|
b = webnotes.bean([{
|
||||||
"creation": current_date,
|
"creation": current_date,
|
||||||
@ -406,7 +407,7 @@ def import_data(dt, submit=False):
|
|||||||
|
|
||||||
for doctype in dt:
|
for doctype in dt:
|
||||||
print "Importing", doctype.replace("_", " "), "..."
|
print "Importing", doctype.replace("_", " "), "..."
|
||||||
webnotes.form_dict = {}
|
webnotes.form_dict = webnotes._dict()
|
||||||
if submit:
|
if submit:
|
||||||
webnotes.form_dict["params"] = json.dumps({"_submit": 1})
|
webnotes.form_dict["params"] = json.dumps({"_submit": 1})
|
||||||
webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", doctype+".csv")
|
webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", doctype+".csv")
|
||||||
|
@ -3,12 +3,29 @@ if __name__=="__main__":
|
|||||||
sys.path.extend([".", "lib", "app"])
|
sys.path.extend([".", "lib", "app"])
|
||||||
|
|
||||||
import webnotes, os
|
import webnotes, os
|
||||||
|
import utilities.demo.make_demo
|
||||||
|
|
||||||
def make_demo_app():
|
def make_demo_app():
|
||||||
import utilities.demo.make_demo
|
|
||||||
utilities.demo.make_demo.make(reset=True)
|
|
||||||
|
|
||||||
def make_demo_user():
|
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"):
|
if webnotes.conn.exists("Profile", "demo@erpnext.com"):
|
||||||
webnotes.delete_doc("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.send_invite_email = 0
|
||||||
p.doc.new_password = "demo"
|
p.doc.new_password = "demo"
|
||||||
p.insert()
|
p.insert()
|
||||||
|
add_roles(p)
|
||||||
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
|
|
||||||
})
|
|
||||||
|
|
||||||
p.save()
|
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()
|
webnotes.conn.commit()
|
||||||
|
|
||||||
def make_demo_login_page():
|
def make_demo_login_page():
|
||||||
@ -60,7 +88,10 @@ def make_demo_login_page():
|
|||||||
|
|
||||||
p.insert()
|
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()
|
webnotes.conn.commit()
|
||||||
|
|
||||||
@ -71,11 +102,20 @@ def make_demo_on_login_script():
|
|||||||
s.doc.script_type = "Server"
|
s.doc.script_type = "Server"
|
||||||
with open(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), "r") as dfile:
|
with open(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), "r") as dfile:
|
||||||
s.doc.script = dfile.read()
|
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__":
|
if __name__=="__main__":
|
||||||
webnotes.connect()
|
# webnotes.connect()
|
||||||
webnotes.mute_emails = 1
|
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_user()
|
||||||
make_demo_login_page()
|
make_demo_login_page()
|
||||||
make_demo_on_login_script()
|
make_demo_on_login_script()
|
||||||
|
utilities.demo.make_demo.make(reset=False, simulate=True)
|
@ -7,7 +7,7 @@ from webnotes.utils import cstr
|
|||||||
|
|
||||||
from utilities.transaction_base import TransactionBase
|
from utilities.transaction_base import TransactionBase
|
||||||
|
|
||||||
class DocType(TransactionBase):
|
class DocType(TransactionBase):
|
||||||
def __init__(self, doc, doclist=[]):
|
def __init__(self, doc, doclist=[]):
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
|
@ -55,6 +55,8 @@ class TransactionBase(StatusUpdater):
|
|||||||
return self._party_type_and_name
|
return self._party_type_and_name
|
||||||
|
|
||||||
def get_customer_defaults(self):
|
def get_customer_defaults(self):
|
||||||
|
if not self.doc.customer: return {}
|
||||||
|
|
||||||
out = self.get_default_address_and_contact("customer")
|
out = self.get_default_address_and_contact("customer")
|
||||||
|
|
||||||
customer = webnotes.doc("Customer", self.doc.customer)
|
customer = webnotes.doc("Customer", self.doc.customer)
|
||||||
|
@ -18,14 +18,6 @@ img {
|
|||||||
padding-bottom: 30px;
|
padding-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.outer {
|
|
||||||
padding: 0px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
|
||||||
margin: 0px -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding: 0px 20px;
|
padding: 0px 20px;
|
||||||
@ -56,6 +48,7 @@ img {
|
|||||||
|
|
||||||
div.web-footer {
|
div.web-footer {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web-footer-menu ul {
|
.web-footer-menu ul {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
|
from webnotes import _
|
||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, d, dl):
|
def __init__(self, d, dl):
|
||||||
@ -23,3 +24,18 @@ class DocType:
|
|||||||
b.doc.blogger = self.doc.name
|
b.doc.blogger = self.doc.name
|
||||||
b.save()
|
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
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-25 16:00:51",
|
"creation": "2013-03-25 16:00:51",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:27:34",
|
"modified": "2013-08-30 16:35:24",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -39,6 +39,12 @@
|
|||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"name": "Blogger"
|
"name": "Blogger"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"doctype": "DocField",
|
||||||
|
"fieldname": "disabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Disabled"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Will be used in url (usually first name).",
|
"description": "Will be used in url (usually first name).",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
|
@ -119,18 +119,3 @@ def get_blog_template_args():
|
|||||||
}
|
}
|
||||||
args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
|
args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
|
||||||
return args
|
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
|
|
@ -20,7 +20,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
|
|||||||
|
|
||||||
# make lead / communication
|
# make lead / communication
|
||||||
from selling.doctype.lead.get_leads import add_sales_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)
|
mail=None, status=status)
|
||||||
|
|
||||||
# guest method, cap max writes per hour
|
# 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"
|
webnotes.response["message"] = "Sorry: we believe we have received an unreasonably high number of requests of this kind. Please try later"
|
||||||
return
|
return
|
||||||
|
|
||||||
webnotes.response["message"] = 'Thank You'
|
webnotes.response.status = "okay"
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
<style>
|
<style>
|
||||||
[itemprop="articleBody"] {
|
|
||||||
font-size: 120%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment-title {
|
.comment-title {
|
||||||
color:#777;
|
color:#777;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<hr />
|
<hr />
|
||||||
{% if categories %}
|
{% if categories %}
|
||||||
<h5>Explore posts by categories</h5>
|
<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 %}
|
{% for category in categories %}
|
||||||
<li><a href="blog?category={{ category }}">{{ category }}</a>
|
<li><a href="blog?category={{ category }}">{{ category }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% extends "lib/templates/base.html" %}
|
{% extends "lib/templates/base.html" %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
{% include "app/website/templates/html/navbar.html" %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="pull-right" style="margin:4px;" id="user-tools">
|
<div class="pull-right" style="margin:4px;" id="user-tools">
|
||||||
{% if shopping_cart_enabled -%}
|
{% if shopping_cart_enabled -%}
|
||||||
@ -23,7 +24,6 @@
|
|||||||
<div class="col-md-12">{{ banner_html }}</div>
|
<div class="col-md-12">{{ banner_html }}</div>
|
||||||
</div>{% endif %}
|
</div>{% endif %}
|
||||||
<div class="outer">
|
<div class="outer">
|
||||||
{% include "app/website/templates/html/navbar.html" %}
|
|
||||||
<div class="content row" id="page-{{ name }}" style="display: block;">
|
<div class="content row" id="page-{{ name }}" style="display: block;">
|
||||||
{%- block content -%}
|
{%- block content -%}
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
@ -26,7 +26,12 @@ $(document).ready(function() {
|
|||||||
sender: email,
|
sender: email,
|
||||||
message: message,
|
message: message,
|
||||||
callback: function(r) {
|
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('');
|
$(':input').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% if obj.doc.address %}
|
{% 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>
|
<h4><i class="icon-map-marker"></i> {{ obj.address.address_title }}</h4>
|
||||||
{% if obj.address.address_line1 %}
|
{% if obj.address.address_line1 %}
|
||||||
<span itemprop="streetAddress">{{ obj.address.address_line1 }}</span><br>
|
<span itemprop="streetAddress">{{ obj.address.address_line1 }}</span><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user