user background
This commit is contained in:
commit
4240ade0de
@ -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'
|
||||
},
|
||||
]
|
||||
|
@ -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'],
|
||||
'<i>"' + doc.comment + '"</i>', '#6B24B3')
|
||||
home.make_feed('Comment', 'ToDo Item', '', webnotes.session['user'],
|
||||
'<i>"' + 'Setup Complete. Please check your To Do List' + '"</i>', '#6B24B3')
|
||||
|
||||
d = Document('ToDo Item')
|
||||
d.description = 'Create your first <a href="#!List/Customer">Customer</a>'
|
||||
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 <a href="#!List/Item">Item</a>'
|
||||
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 <a href="#!List/Supplier">Supplier</a>'
|
||||
d.description = 'Create your first Supplier'
|
||||
d.priority = 'High'
|
||||
d.date = nowdate()
|
||||
d.reference_type = 'Supplier'
|
||||
d.save(1)
|
||||
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
<li>Select the saved CSV file, identify the date format if any</li>
|
||||
<li>Click on "Import"</li>
|
||||
</ol>
|
||||
<br />
|
||||
<h4>Over-writing Guide</h4>
|
||||
<ol>
|
||||
<li>To over-write data, click on "Do you want to over-write records?" and then download template</li>
|
||||
@ -48,6 +49,30 @@
|
||||
<li>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</li>
|
||||
<li>Over-write checkbox will be checked while importing</li>
|
||||
</ol>
|
||||
<br />
|
||||
<h4>Do you have Non-English data?</h4>
|
||||
You may need to save the file with UTF-8 encoding for data to be imported correctly.
|
||||
<br /><br />
|
||||
Microsoft Excel Users:<br />
|
||||
There is no obvious way of saving a CSV file with UTF-8 encoding.<br />
|
||||
You will need to follow these steps:
|
||||
<ol>
|
||||
<li>In Excel, save the file in CSV (Comma Delimited) format</li>
|
||||
<li>Open this saved file in Notepad</li>
|
||||
<li>Click on File -> Save As</li>
|
||||
<li>File Name: <your filename>.csv<br />
|
||||
Save as type: Text Documents (*.txt)<br />
|
||||
Encoding: UTF-8
|
||||
</li>
|
||||
<li>Click on Save</li>
|
||||
</ol>
|
||||
<br />
|
||||
OpenOffice or LibreOffice Users:<br />
|
||||
<ol>
|
||||
<li>While saving as CSV, check "Edit Filter Settings".</li>
|
||||
<li>You will be prompted for Encoding.</li>
|
||||
<li>Make sure it is "UTF-8" and click on OK.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</td>
|
||||
<td style="border: 1px solid #AAA; padding: 4px;">
|
||||
|
@ -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];
|
||||
}
|
||||
|
@ -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'
|
||||
},
|
||||
|
@ -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('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
|
||||
%(reference_name)s</a>', todo);
|
||||
} else if(todo.reference_type) {
|
||||
todo.link = repl('<a href="#!List/%(reference_type)s">\
|
||||
%(reference_type)s</a>', todo);
|
||||
} else {
|
||||
todo.link = '';
|
||||
}
|
||||
$('#todo-list').append(repl('<div class="todoitem">\
|
||||
<span class="description">\
|
||||
<span class="label %(labelclass)s">%(priority)s</span>\
|
||||
<span class="help" style="margin-right: 7px">%(userdate)s</span>\
|
||||
%(description)s</span>\
|
||||
<span class="ref_link">→\
|
||||
<a href="#!Form/%(reference_type)s/%(reference_name)s">\
|
||||
[%(reference_name)s]</a></span>\
|
||||
%(link)s</span>\
|
||||
<a href="#" class="close">×</a>\
|
||||
</div>', 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')
|
||||
|
@ -1 +1 @@
|
||||
768
|
||||
769
|
Loading…
x
Reference in New Issue
Block a user