From 14e1d20df3db4c4ee57405947478e57e5b9dfcdf Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Wed, 22 Oct 2014 16:55:20 +0530 Subject: [PATCH 1/3] Change position of 'To Time' field for better UX --- .../projects/doctype/time_log/time_log.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json index ee34da04f5..0eed1fc9af 100644 --- a/erpnext/projects/doctype/time_log/time_log.json +++ b/erpnext/projects/doctype/time_log/time_log.json @@ -1,5 +1,5 @@ { - "allow_import": 1, + "allow_import": 1, "autoname": "naming_series:", "creation": "2013-04-03 16:38:41", "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.", @@ -25,14 +25,6 @@ "read_only": 0, "reqd": 1 }, - { - "fieldname": "hours", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Hours", - "permlevel": 0, - "read_only": 0 - }, { "fieldname": "to_time", "fieldtype": "Datetime", @@ -42,6 +34,14 @@ "read_only": 0, "reqd": 1 }, + { + "fieldname": "hours", + "fieldtype": "Float", + "in_list_view": 1, + "label": "Hours", + "permlevel": 0, + "read_only": 0 + }, { "fieldname": "column_break_3", "fieldtype": "Column Break", @@ -151,7 +151,7 @@ "icon": "icon-time", "idx": 1, "is_submittable": 1, - "modified": "2014-08-04 05:23:15.740050", + "modified": "2014-10-22 16:53:26.993828", "modified_by": "Administrator", "module": "Projects", "name": "Time Log", From 10b155a4865ba6342a80c0bc646ef1644ef1243b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 23 Oct 2014 13:18:59 +0530 Subject: [PATCH 2/3] cost center based on project --- erpnext/selling/sales_common.js | 24 +++++++++++--------- erpnext/utilities/doctype/address/address.py | 2 ++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 66e935ab6f..fd16258d6f 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -587,16 +587,18 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ }); frappe.ui.form.on(cur_frm.doctype,"project_name", function(frm) { - frappe.call({ - method:'erpnext.projects.doctype.project.project.get_cost_center_name' , - args: { project_name: frm.doc.project_name }, - callback: function(r, rt) { - if(!r.exc) { - $.each(frm.doc[cur_frm.cscript.fname] || [], function(i, row) { - frappe.model.set_value(row.doctype, row.name, "cost_center", r.message); - msgprint(__("Cost Center For Item with Item Code '"+row.item_name+"' has been Changed to "+ r.message)); - }) + if(in_list(["Delivery Note", "Sales Invoice"], frm.doc.doctype)) { + frappe.call({ + method:'erpnext.projects.doctype.project.project.get_cost_center_name' , + args: { project_name: frm.doc.project_name }, + callback: function(r, rt) { + if(!r.exc) { + $.each(frm.doc[cur_frm.cscript.fname] || [], function(i, row) { + frappe.model.set_value(row.doctype, row.name, "cost_center", r.message); + msgprint(__("Cost Center For Item with Item Code '"+row.item_name+"' has been Changed to "+ r.message)); + }) + } } - } - }) + }) + } }) diff --git a/erpnext/utilities/doctype/address/address.py b/erpnext/utilities/doctype/address/address.py index 8fd5cb1dea..172ce23d66 100644 --- a/erpnext/utilities/doctype/address/address.py +++ b/erpnext/utilities/doctype/address/address.py @@ -52,6 +52,8 @@ class Address(Document): @frappe.whitelist() def get_address_display(address_dict): + if not address_dict: + return if not isinstance(address_dict, dict): address_dict = frappe.db.get_value("Address", address_dict, "*", as_dict=True) or {} From daed0b655a4b3ad2081c5ac63ed6653399dad2a1 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Mon, 27 Oct 2014 09:56:36 +0600 Subject: [PATCH 3/3] bumped to version 4.9.1 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 316191657c..84fddef10e 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.9.0' +__version__ = '4.9.1' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index a1a98f6672..6f4a41ed6e 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.9.0" +app_version = "4.9.1" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index c95b14d8c0..5bdcc94cf0 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.9.0" +version = "4.9.1" with open("requirements.txt", "r") as f: install_requires = f.readlines()