Merge branch 'master' into production

This commit is contained in:
Nabin Hait
2012-12-18 13:49:07 +05:30
41 changed files with 519 additions and 489 deletions

View File

@@ -80,8 +80,8 @@ class DocType(TransactionBase):
def pull_project_customer(self):
res = sql("select customer from `tabProject` where name = '%s'"%self.doc.project_name)
if res:
res = sql("select customer from `tabProject` where name = '%s'" % self.doc.project_name)
if res and res[0][0]:
get_obj('DocType Mapper', 'Project-Delivery Note').dt_map('Project', 'Delivery Note', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Delivery Note']]")

View File

@@ -0,0 +1,22 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@@ -138,4 +138,15 @@ cur_frm.fields_dict.item_customer_details.grid.get_field("customer_name").get_qu
erpnext.utils.customer_query;
cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query =
erpnext.utils.supplier_query;
erpnext.utils.supplier_query;
cur_frm.cscript.on_remove_attachment = function(doc) {
// refresh image list before unsetting image
refresh_field("image");
if(!inList(cur_frm.fields_dict.image.df.options.split("\n"), doc.image)) {
// if the selected image is removed from attachment, unset it
cur_frm.set_value("image", "");
msgprint(wn._("Attachment removed. You may need to update: ")
+ wn.meta.get_docfield(doc.doctype, "description_html").label);
}
};

View File

@@ -2,9 +2,9 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-12-11 15:58:47",
"creation": "2012-12-17 14:56:32",
"modified_by": "Administrator",
"modified": "2012-12-11 16:08:49"
"modified": "2012-12-17 16:02:00"
},
{
"allow_attach": 1,
@@ -459,6 +459,7 @@
"permlevel": 0
},
{
"no_copy": 1,
"oldfieldtype": "Table",
"doctype": "DocField",
"label": "UOM Conversion Details",
@@ -779,6 +780,48 @@
"fieldtype": "Select",
"permlevel": 0
},
{
"doctype": "DocField",
"fieldname": "cb72",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "Show Price in Website (if set)",
"depends_on": "show_in_website",
"doctype": "DocField",
"label": "Website Price List",
"options": "Price List",
"fieldname": "website_price_list",
"fieldtype": "Link",
"permlevel": 0
},
{
"description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.",
"depends_on": "show_in_website",
"doctype": "DocField",
"label": "Website Warehouse",
"options": "Warehouse",
"fieldname": "website_warehouse",
"fieldtype": "Link",
"permlevel": 0
},
{
"depends_on": "show_in_website",
"doctype": "DocField",
"fieldname": "sb72",
"fieldtype": "Section Break",
"permlevel": 0
},
{
"depends_on": "show_in_website",
"doctype": "DocField",
"label": "Item Website Specifications",
"options": "Item Website Specification",
"fieldname": "item_website_specifications",
"fieldtype": "Table",
"permlevel": 0
},
{
"depends_on": "show_in_website",
"doctype": "DocField",
@@ -791,7 +834,6 @@
"depends_on": "show_in_website",
"doctype": "DocField",
"label": "Long Description",
"options": "Markdown",
"fieldname": "web_long_description",
"fieldtype": "Text Editor",
"permlevel": 0

View File

@@ -0,0 +1,8 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-12-07 15:42:25",
"modified_by": "Administrator",
"modified": "2012-12-07 15:44:18"
"modified": "2012-12-17 15:29:37"
},
{
"istable": 1,