From 169c1fd93b7d085cabcf46b37462c0ce81e9d7b5 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 18 Apr 2014 10:40:17 +0530 Subject: [PATCH] fixed translation for setup-wizard and removed purchase validation for Material Request #925 --- erpnext/setup/page/setup_wizard/setup_wizard.js | 14 +++++++------- erpnext/stock/get_item_details.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js index 9bddf515da..842645cfab 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.js +++ b/erpnext/setup/page/setup_wizard/setup_wizard.js @@ -32,7 +32,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { var d = msgprint(__("There were errors.")); d.custom_onhide = function() { frappe.set_route(erpnext.wiz.page_name, "0"); - } + }; } }) }, @@ -42,16 +42,16 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {

' + __('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') + '

', - working_html: '

\ + working_html: function() { return '

\

'+__('Setting up...')+'

\

' + __('Sit tight while your system is being setup. This may take a few moments.') + - '

', - complete_html: '

\ + '

' }, + complete_html: function() { return '

\

'+__('Setup Complete!')+'

\

' + __('Your setup is complete. Refreshing...') + - '

', + '

'}, slides: [ // User { @@ -373,11 +373,11 @@ frappe.wiz.Wizard = Class.extend({ show_working: function() { this.hide_current_slide(); frappe.set_route(this.page_name); - this.current_slide = {"$wrapper": this.get_message(this.working_html).appendTo(this.parent)}; + this.current_slide = {"$wrapper": this.get_message(this.working_html()).appendTo(this.parent)}; }, show_complete: function() { this.hide_current_slide(); - this.current_slide = {"$wrapper": this.get_message(this.complete_html).appendTo(this.parent)}; + this.current_slide = {"$wrapper": this.get_message(this.complete_html()).appendTo(this.parent)}; }, show: function(id) { if(!this.welcomed) { diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index ef233cef36..be97228b0d 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -104,7 +104,7 @@ def validate_item_details(args, item): elif item.is_sales_item != "Yes": throw(_("Item {0} must be a Sales Item").format(item.name)) - elif args.transaction_type == "buying": + elif args.transaction_type == "buying" and args.doctype != "Material Request": # validate if purchase item or subcontracted item if item.is_purchase_item != "Yes": throw(_("Item {0} must be a Purchase Item").format(item.name))