Merge branch 'master' of github.com:webnotes/erpnext into edge
This commit is contained in:
commit
2beca173e0
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2012-11-28 11:24:29",
|
||||
"creation": "2013-02-21 14:26:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-02-21 11:41:51",
|
||||
"modified": "2013-02-22 10:46:13",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -10,7 +10,7 @@
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"query": "select \n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n`tabDelivery Note`.`status` as \"Status\",\n `tabDelivery Note`.`posting_date` as \"Date:Date\",\n `tabDelivery Note`.`project_name` as \"Project\",\n `tabDelivery Note Item`.item_code as \"Item:Link/Item:120\",\n `tabDelivery Note Item`.description as \"Description:Data:120\",\n `tabDelivery Note Item`.amount as \"Amount:Currency:110\",\n (`tabDelivery Note Item`.billed_amt * ifnull(`tabDelivery Note`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabDelivery Note Item`.amount,0) - (ifnull(`tabDelivery Note Item`.billed_amt,0) * ifnull(`tabDelivery Note`.conversion_rate, 1))) as \"Pending Amount:Currency:120\"\nfrom\n `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note Item`.`parent` = `tabDelivery Note`.`name`\n and `tabDelivery Note`.docstatus = 1\n and `tabDelivery Note`.status != \"Stopped\"\n and ifnull(`tabDelivery Note Item`.billed_amt,0) < ifnull(`tabDelivery Note Item`.export_amount,0)\norder by `tabDelivery Note`.posting_date asc",
|
||||
"query": "select \n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n`tabDelivery Note`.`status` as \"Status\",\n `tabDelivery Note`.`posting_date` as \"Date:Date\",\n `tabDelivery Note`.`project_name` as \"Project\",\n `tabDelivery Note Item`.item_code as \"Item:Link/Item:120\",\n `tabDelivery Note Item`.amount as \"Amount:Currency:110\",\n (`tabDelivery Note Item`.billed_amt * ifnull(`tabDelivery Note`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabDelivery Note Item`.amount,0) - (ifnull(`tabDelivery Note Item`.billed_amt,0) * ifnull(`tabDelivery Note`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabDelivery Note Item`.item_name as \"Item Name::150\",\n `tabDelivery Note Item`.description as \"Description:Data:200\"\nfrom\n `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note Item`.`parent` = `tabDelivery Note`.`name`\n and `tabDelivery Note`.docstatus = 1\n and `tabDelivery Note`.status != \"Stopped\"\n and ifnull(`tabDelivery Note Item`.billed_amt,0) < ifnull(`tabDelivery Note Item`.export_amount,0)\norder by `tabDelivery Note`.posting_date asc",
|
||||
"ref_doctype": "Sales Invoice"
|
||||
},
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2012-12-14 14:27:05",
|
||||
"creation": "2013-02-21 14:26:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-02-21 11:42:29",
|
||||
"modified": "2013-02-22 10:47:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -10,7 +10,7 @@
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.description as \"Description:Data:120\",\n `tabSales Order Item`.amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.export_amount,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.export_amount,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"ref_doctype": "Sales Invoice"
|
||||
},
|
||||
{
|
||||
|
@ -36,6 +36,7 @@ class DocType(DocListController):
|
||||
self.validate_balance_leaves()
|
||||
self.validate_leave_overlap()
|
||||
self.validate_max_days()
|
||||
self.show_block_day_warning()
|
||||
self.validate_block_days()
|
||||
|
||||
def on_update(self):
|
||||
@ -60,6 +61,17 @@ class DocType(DocListController):
|
||||
# notify leave applier about cancellation
|
||||
self.notify_employee("cancelled")
|
||||
|
||||
def show_block_day_warning(self):
|
||||
from hr.doctype.leave_block_list.leave_block_list import get_applicable_block_dates
|
||||
|
||||
block_dates = get_applicable_block_dates(self.doc.from_date, self.doc.to_date,
|
||||
self.doc.employee, self.doc.company, all_lists=True)
|
||||
|
||||
if block_dates:
|
||||
webnotes.msgprint(_("Warning: Leave application contains following block dates") + ":")
|
||||
for d in block_dates:
|
||||
webnotes.msgprint(formatdate(d.block_date) + ": " + d.reason)
|
||||
|
||||
def validate_block_days(self):
|
||||
from hr.doctype.leave_block_list.leave_block_list import get_applicable_block_dates
|
||||
|
||||
@ -67,11 +79,8 @@ class DocType(DocListController):
|
||||
self.doc.employee, self.doc.company)
|
||||
|
||||
if block_dates:
|
||||
webnotes.msgprint(_("Following dates are blocked for Leave") + ":")
|
||||
for d in block_dates:
|
||||
webnotes.msgprint(formatdate(d.block_date) + ": " + d.reason)
|
||||
|
||||
if self.doc.status == "Approved":
|
||||
webnotes.msgprint(_("Cannot approve leave as you are not authorized to approve leaves on Block Dates."))
|
||||
raise LeaveDayBlockedError
|
||||
|
||||
def get_holidays(self):
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-10 16:34:17",
|
||||
"creation": "2013-01-29 19:25:50",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-29 17:01:19",
|
||||
"modified": "2013-02-22 11:06:22",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -25,20 +25,13 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"name": "__common__",
|
||||
"parent": "Project",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Projects User",
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
"role": "Projects User"
|
||||
},
|
||||
{
|
||||
"doctype": "DocType",
|
||||
@ -289,88 +282,6 @@
|
||||
"reqd": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_name",
|
||||
"fieldtype": "Data",
|
||||
"in_filter": 1,
|
||||
"label": "Customer Name",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "customer_name",
|
||||
"oldfieldtype": "Data",
|
||||
"read_only": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_address",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Customer Address",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "customer_address",
|
||||
"oldfieldtype": "Small Text",
|
||||
"read_only": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Contact Person",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "contact_person",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Contact",
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "territory",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Territory",
|
||||
"oldfieldname": "territory",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Territory",
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_no",
|
||||
"fieldtype": "Data",
|
||||
"label": "Contact No",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "contact_no",
|
||||
"oldfieldtype": "Data",
|
||||
"read_only": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "email_id",
|
||||
"fieldtype": "Data",
|
||||
"label": "Email Id",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "email_id",
|
||||
"oldfieldtype": "Data",
|
||||
"read_only": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_group",
|
||||
"fieldtype": "Link",
|
||||
"label": "Customer Group",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "customer_group",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Customer Group",
|
||||
"read_only": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "trash_reason",
|
||||
@ -394,6 +305,16 @@
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm"
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1
|
||||
}
|
||||
]
|
@ -108,6 +108,7 @@ EditableText = function(args) {
|
||||
this.set_display(me.text);
|
||||
|
||||
if(me.height) me.$w.find('.ed-text-input').css('height', me.height);
|
||||
if(me.width) me.$w.find('.ed-text-input').css('width', me.width);
|
||||
|
||||
// edit
|
||||
me.$w.find('.ed-text-edit').click(function() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-02-02 22:33:12",
|
||||
"creation": "2013-02-21 14:26:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-02-21 11:40:05",
|
||||
"modified": "2013-02-22 10:43:27",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -10,7 +10,7 @@
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.description as \"Description\",\n `tabSales Order Item`.qty as \"Qty:Float\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.qty as \"Qty:Float\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"ref_doctype": "Delivery Note"
|
||||
},
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-02-02 22:33:12",
|
||||
"creation": "2013-02-21 14:26:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-02-21 11:40:58",
|
||||
"modified": "2013-02-22 10:44:34",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -10,7 +10,7 @@
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n `tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n `tabPurchase Order`.`project_name` as \"Project\",\n `tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n `tabPurchase Order Item`.description as \"Description::180\",\n `tabPurchase Order Item`.qty as \"Qty:Float:100\",\n `tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n (`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\"\nfrom\n `tabPurchase Order`, `tabPurchase Order Item`\nwhere\n `tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n and `tabPurchase Order`.docstatus = 1\n and `tabPurchase Order`.status != \"Stopped\"\n and ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n `tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n `tabPurchase Order`.`project_name` as \"Project\",\n `tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n `tabPurchase Order Item`.qty as \"Qty:Float:100\",\n `tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n (`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n `tabPurchase Order Item`.item_name as \"Item Name::150\",\n `tabPurchase Order Item`.description as \"Description::200\"\nfrom\n `tabPurchase Order`, `tabPurchase Order Item`\nwhere\n `tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n and `tabPurchase Order`.docstatus = 1\n and `tabPurchase Order`.status != \"Stopped\"\n and ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"ref_doctype": "Purchase Receipt"
|
||||
},
|
||||
{
|
||||
|
@ -90,6 +90,7 @@ KBQuestionView = function(w, qid, qtext) {
|
||||
$(w.add_answer_area, '<h3>Add your Answer</h3>\
|
||||
<div class="help">In markdown format</div>');
|
||||
this.input = $a(w.add_answer_area, 'textarea');
|
||||
$(this.input).css({width: "90%", height: "200px"});
|
||||
//wn.tinymce.add_simple(this.input);
|
||||
|
||||
this.btn = $btn($a(w.add_answer_area, 'div'), 'Post', function() {
|
||||
@ -174,7 +175,8 @@ KBAnswer = function(body, data, ans_list) {
|
||||
text: data.answer,
|
||||
inp_class: 'qv-ans-input',
|
||||
disp_class: 'qv-ans-text',
|
||||
height: '300px'
|
||||
height: '300px',
|
||||
width: '90%'
|
||||
});
|
||||
|
||||
$(edtxt.wrapper).addClass('well');
|
||||
|
@ -25,19 +25,17 @@ pscript.onload_questions = function(wrapper) {
|
||||
// kb
|
||||
var kb = new KnowledgeBase(body);
|
||||
|
||||
// sidebar
|
||||
this.sidebar = new wn.widgets.PageSidebar($(wrapper).find('.questions-tags').get(0), {
|
||||
sections: [
|
||||
{
|
||||
title: 'Top Tags',
|
||||
render: function(body) {
|
||||
new wn.widgets.TagCloud(body, 'Question', function(tag)
|
||||
{ kb.set_tag_filter(tag) });
|
||||
wn.model.with_doctype("Question", function() {
|
||||
this.sidebar_stats = new wn.views.SidebarStats({
|
||||
doctype: "Question",
|
||||
stats: ["_user_tags"],
|
||||
parent: $(wrapper).find('.questions-tags'),
|
||||
set_filter: function(fieldname, label) {
|
||||
kb.set_filter(fieldname, label);
|
||||
//me.set_filter(fieldname, label);
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
set_title('Knowledge Base');
|
||||
})
|
||||
}
|
||||
|
||||
// knowledge base object
|
||||
@ -137,6 +135,9 @@ function KnowledgeBase(w) {
|
||||
|
||||
}
|
||||
|
||||
this.set_filter = function(fieldname, label) {
|
||||
this.set_tag_filter({label:label});
|
||||
}
|
||||
// add a tag filter to the search in the
|
||||
// main page
|
||||
this.set_tag_filter = function(tag) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
{% include 'html/product_missing_image.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="height: 80px; overflow: hidden; font-size: 80%;">
|
||||
<div style="height: 100px; overflow: hidden; font-size: 80%;">
|
||||
<h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4>
|
||||
<p class="help">Item Code: {{ name }}</p>
|
||||
</div>
|
||||
|
@ -11,8 +11,7 @@
|
||||
{% set title="ERPNext - Web Based, Open Source ERP" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="layout-attributions">
|
||||
<div class="layout-main">
|
||||
<div class="layout-attributions span12">
|
||||
<h3>This website is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
|
||||
<hr>
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -106,5 +105,4 @@
|
||||
|
||||
<p class="alert">Note: A link to this page must be easily accessible.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user