diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index dc9f1dd7e4..6c66f75c52 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -121,4 +121,40 @@ patch_list = [ 'patch_file': 'fix_packing_slip', 'description': 'Update Mapper Delivery Note-Packing Slip' }, + { + 'patch_module': 'patches.jan_mar_2012.apps', + 'patch_file': 'todo_item', + 'description': 'Reloads todo item' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'convert_tables_to_utf8', + 'description': 'Convert tables to UTF-8' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'pending_patches', + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'pos_setting_patch', + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'reload_doctype', + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'reload_po_pr_mapper', + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'delete_pur_of_service', + 'description': 'Deletes purpose of service' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'navupdate', + 'description': 'New Navigation Pages' + }, ] diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py index 75cc038bb1..708b32ac5a 100644 --- a/erpnext/setup/doctype/setup_control/setup_control.py +++ b/erpnext/setup/doctype/setup_control/setup_control.py @@ -65,16 +65,18 @@ class DocType: # --------------- def setup_account(self, args): import webnotes, json - locals().update(args) + args = json.loads(args) - curr_fiscal_year, fy_start_date = self.get_fy_details(fy_start) - self.currency = currency + curr_fiscal_year, fy_start_date = self.get_fy_details(args.get('fy_start')) + + args['name'] = webnotes.session.get('user') # Update Profile - if last_name=='None': last_name = None + if not args.get('last_name') or args.get('last_name')=='None': args['last_name'] = None webnotes.conn.sql("""\ - UPDATE `tabProfile` SET first_name=%s, last_name=%s - WHERE name=%s AND docstatus<2""", (first_name, last_name, webnotes.user.name)) + UPDATE `tabProfile` SET first_name=%(first_name)s, + last_name=%(last_name)s + WHERE name=%(name)s AND docstatus<2""", args) # Fiscal Year @@ -82,15 +84,15 @@ class DocType: self.create_records(master_dict) # Company - master_dict = {'Company':{'company_name':company_name, - 'abbr':company_abbr, - 'default_currency':currency - }} + master_dict = {'Company':{'company_name':args.get('company_name'), + 'abbr':args.get('company_abbr'), + 'default_currency':args.get('currency') + }} self.create_records(master_dict) def_args = {'current_fiscal_year':curr_fiscal_year, - 'default_currency': currency, - 'default_company':company_name, + 'default_currency': args.get('currency'), + 'default_company':args.get('company_name'), 'default_valuation_method':'FIFO', 'default_stock_uom':'Nos', 'date_format':'dd-mm-yyyy', @@ -102,7 +104,8 @@ class DocType: 'emp_created_by':'Naming Series', 'cust_master_name':'Customer Name', 'supp_master_name':'Supplier Name', - 'default_currency_format': (currency=='INR') and 'Lacs' or 'Millions' + 'default_currency_format': \ + (args.get('currency')=='INR') and 'Lacs' or 'Millions' } # Set @@ -114,31 +117,35 @@ class DocType: msgprint("Company setup is complete") import webnotes.utils - user_fullname = (first_name or '') + (last_name and (" " + last_name) or '') + user_fullname = (args.get('first_name') or '') + (args.get('last_name') + and (" " + args.get('last_name')) or '') return {'sys_defaults': webnotes.utils.get_defaults(), 'user_fullname': user_fullname} def create_feed_and_todo(self): """update activty feed and create todo for creation of item, customer, vendor""" import home - home.make_feed('Comment', '', '', webnotes.session['user'], - '"' + doc.comment + '"', '#6B24B3') + home.make_feed('Comment', 'ToDo Item', '', webnotes.session['user'], + '"' + 'Setup Complete. Please check your To Do List' + '"', '#6B24B3') d = Document('ToDo Item') - d.description = 'Create your first Customer' + d.description = 'Create your first Customer' d.priority = 'High' d.date = nowdate() + d.reference_type = 'Customer' d.save(1) d = Document('ToDo Item') - d.description = 'Create your first Item' + d.description = 'Create your first Item' d.priority = 'High' d.date = nowdate() + d.reference_type = 'Item' d.save(1) d = Document('ToDo Item') - d.description = 'Create your first Supplier' + d.description = 'Create your first Supplier' d.priority = 'High' d.date = nowdate() + d.reference_type = 'Supplier' d.save(1) diff --git a/erpnext/setup/page/import_data/import_data.html b/erpnext/setup/page/import_data/import_data.html index 5f9556b5af..29f0cc3dd8 100644 --- a/erpnext/setup/page/import_data/import_data.html +++ b/erpnext/setup/page/import_data/import_data.html @@ -41,6 +41,7 @@
  • Select the saved CSV file, identify the date format if any
  • Click on "Import"
  • +

    Over-writing Guide

    1. To over-write data, click on "Do you want to over-write records?" and then download template
    2. @@ -48,6 +49,30 @@
    3. Over-writing of child table data will delete all previous data of child table and re-import. so before over-writing child tables, export all data from system, modify them and then re-import
    4. Over-write checkbox will be checked while importing
    +
    +

    Do you have Non-English data?

    + You may need to save the file with UTF-8 encoding for data to be imported correctly. +

    + Microsoft Excel Users:
    + There is no obvious way of saving a CSV file with UTF-8 encoding.
    + You will need to follow these steps: +
      +
    1. In Excel, save the file in CSV (Comma Delimited) format
    2. +
    3. Open this saved file in Notepad
    4. +
    5. Click on File -> Save As
    6. +
    7. File Name: <your filename>.csv
      + Save as type: Text Documents (*.txt)
      + Encoding: UTF-8 +
    8. +
    9. Click on Save
    10. +
    +
    + OpenOffice or LibreOffice Users:
    +
      +
    1. While saving as CSV, check "Edit Filter Settings".
    2. +
    3. You will be prompted for Encoding.
    4. +
    5. Make sure it is "UTF-8" and click on OK.
    6. +
    diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js index 663c7b97f0..26b2d3b689 100644 --- a/erpnext/startup/js/complete_setup.js +++ b/erpnext/startup/js/complete_setup.js @@ -35,7 +35,7 @@ erpnext.complete_setup = function() { var d = new wn.widgets.Dialog({ title: "Setup", fields: [ - {fieldname:'first_name', label:'Your First Name', fieldtype:'Data'}, + {fieldname:'first_name', label:'Your First Name', fieldtype:'Data', reqd: 1}, {fieldname:'last_name', label:'Your Last Name', fieldtype:'Data'}, {fieldname:'company_name', label:'Company Name', fieldtype:'Data', reqd:1, description: 'e.g. "My Company LLC"'}, @@ -43,9 +43,9 @@ erpnext.complete_setup = function() { description:'e.g. "MC"',reqd:1}, {fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select', description:'Your financial year begins on"', reqd:1, - options=['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'].join('\n')}, - {fieldname:'currency': label: 'Default Currency', reqd:1, - options=currency_list.join('\n')}, + options: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'].join('\n')}, + {fieldname:'currency', label: 'Default Currency', reqd:1, + options: currency_list.join('\n'), fieldtype: 'Select'}, {fieldname:'update', label:'Setup',fieldtype:'Button'} ] }) @@ -65,7 +65,7 @@ erpnext.complete_setup = function() { // set first name, last name if(user_fullname) { - u = user_fullname.spilt(' '); + u = user_fullname.split(' '); if(u[0]) { d.fields_dict.first_name.input.value = u[0]; } @@ -90,4 +90,4 @@ erpnext.complete_setup = function() { } d.show(); -} \ No newline at end of file +} diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt index 3c50836af5..73dfd4b6a9 100644 --- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt +++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2012-02-07 13:28:20', + 'modified': '2012-02-29 17:55:13', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -22,7 +22,6 @@ # These values are common for all Field Mapper Detail { 'doctype': u'Field Mapper Detail', - 'map': u'Yes', 'name': '__common__', 'parent': u'Purchase Order-Purchase Receipt', 'parentfield': u'field_mapper_details', @@ -50,6 +49,7 @@ 'checking_operator': u'=', 'doctype': u'Field Mapper Detail', 'from_field': u'supplier', + 'map': u'Yes', 'match_id': 0, 'to_field': u'supplier' }, @@ -59,6 +59,7 @@ 'checking_operator': u'=', 'doctype': u'Field Mapper Detail', 'from_field': u'company', + 'map': u'Yes', 'match_id': 0, 'to_field': u'company' }, @@ -68,6 +69,7 @@ 'checking_operator': u'=', 'doctype': u'Field Mapper Detail', 'from_field': u'currency', + 'map': u'Yes', 'match_id': 0, 'to_field': u'currency' }, @@ -76,6 +78,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'name', + 'map': u'Yes', 'match_id': 1, 'to_field': u'prevdoc_detail_docname' }, @@ -84,6 +87,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'parent', + 'map': u'Yes', 'match_id': 1, 'to_field': u'prevdoc_docname' }, @@ -92,6 +96,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'parenttype', + 'map': u'Yes', 'match_id': 1, 'to_field': u'prevdoc_doctype' }, @@ -101,6 +106,7 @@ 'checking_operator': u'=', 'doctype': u'Field Mapper Detail', 'from_field': u'item_code', + 'map': u'Yes', 'match_id': 1, 'to_field': u'item_code' }, @@ -109,6 +115,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ', + 'map': u'Yes', 'match_id': 1, 'to_field': u'received_qty' }, @@ -117,6 +124,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ', + 'map': u'Yes', 'match_id': 1, 'to_field': u'qty' }, @@ -125,6 +133,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)', + 'map': u'Yes', 'match_id': 1, 'to_field': u'stock_qty' }, @@ -133,6 +142,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)', + 'map': u'Yes', 'match_id': 1, 'to_field': u'import_amount' }, @@ -141,6 +151,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.purchase_rate)', + 'map': u'Yes', 'match_id': 1, 'to_field': u'amount' }, @@ -149,6 +160,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'schedule_date', + 'map': u'Yes', 'match_id': 1, 'to_field': u'schedule_date' }, @@ -157,6 +169,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'net_total', + 'map': u'Yes', 'match_id': 0, 'to_field': u'net_total' }, @@ -165,6 +178,7 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'grand_total', + 'map': u'Yes', 'match_id': 0, 'to_field': u'grand_total' }, @@ -173,14 +187,25 @@ { 'doctype': u'Field Mapper Detail', 'from_field': u'total_tax', + 'map': u'Yes', 'match_id': 0, 'to_field': u'total_tax' }, + # Field Mapper Detail + { + 'doctype': u'Field Mapper Detail', + 'from_field': u'transaction_date', + 'map': u'No', + 'match_id': 0, + 'to_field': u'transaction_date' + }, + # Field Mapper Detail { 'doctype': u'Field Mapper Detail', 'from_field': u'conversion_rate', + 'map': u'Yes', 'match_id': 0, 'to_field': u'conversion_rate' }, diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js index 435002301b..dfaa7cdecf 100644 --- a/erpnext/utilities/page/todo/todo.js +++ b/erpnext/utilities/page/todo/todo.js @@ -46,14 +46,22 @@ erpnext.todo.ToDoItem = Class.extend({ } todo.labelclass = label_map[todo.priority]; todo.userdate = dateutil.str_to_user(todo.date); + if(todo.reference_name && todo.reference_type) { + todo.link = repl('\ + %(reference_name)s', todo); + } else if(todo.reference_type) { + todo.link = repl('\ + %(reference_type)s', todo); + } else { + todo.link = ''; + } $('#todo-list').append(repl('
    \ \ %(priority)s\ %(userdate)s\ %(description)s\ →\ - \ - [%(reference_name)s]\ + %(link)s\ ×\
    ', todo)); $todo = $('div.todoitem:last'); @@ -62,7 +70,7 @@ erpnext.todo.ToDoItem = Class.extend({ $todo.find('.description').css('text-decoration', 'line-through'); } - if(!todo.reference_name) + if(!todo.reference_type) $todo.find('.ref_link').toggle(false); $todo.find('.description') @@ -145,4 +153,4 @@ erpnext.todo.save = function(btn) { wn.pages.todo.onload = function() { // load todos erpnext.todo.refresh(); -} \ No newline at end of file +} diff --git a/version.num b/version.num index 988e00fe6b..c1891366fd 100644 --- a/version.num +++ b/version.num @@ -1 +1 @@ -768 \ No newline at end of file +769 \ No newline at end of file