diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js index 139a42a200..56fbe6dab3 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js @@ -53,24 +53,19 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) { // Hide Fields // ------------ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) { - par_flds = ['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt']; + par_flds = ['project_name', 'due_date', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt']; - ch_flds = {'entries': ['sales_order', 'delivery_note']} + item_flds_normal = ['sales_order', 'delivery_note'] + item_flds_pos = ['warehouse', 'serial_no', 'batch_no', 'actual_qty', 'delivered_qty'] if(cint(doc.is_pos) == 1) { - hide_field(par_flds); - for(t in ch_flds) { - for(f in ch_flds[t]) { - cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], false); - } - } + hide_field(par_flds); + for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], false); + for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], (doc.update_stock==1?true:false)); } else { unhide_field(par_flds); - for (t in ch_flds) { - for (f in ch_flds[t]) { - cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], true); - } - } + for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], true); + for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], false); } // India related fields @@ -84,9 +79,14 @@ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) { // Refresh // ------- cur_frm.cscript.refresh = function(doc, dt, dn) { - cur_frm.cscript.is_opening(doc, dt, dn); - cur_frm.cscript.hide_fields(doc, cdt, cdn); + cur_frm.cscript.hide_fields(doc, dt, dn); + + var callback = function() { + cur_frm.cscript.dynamic_label(doc, dt, dn); + } + cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback); + // Show / Hide button cur_frm.clear_custom_buttons(); @@ -109,7 +109,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { //fetch retail transaction related fields //-------------------------------------------- cur_frm.cscript.is_pos = function(doc,dt,dn,callback){ - cur_frm.cscript.hide_fields(doc, cdt, cdn); + cur_frm.cscript.hide_fields(doc, dt, dn); if(doc.is_pos == 1){ if (!doc.company) { msgprint("Please select company to proceed"); @@ -127,6 +127,11 @@ cur_frm.cscript.is_pos = function(doc,dt,dn,callback){ } +cur_frm.cscript.update_stock = function(doc, dt, dn) { + cur_frm.cscript.hide_fields(doc, dt, dn); +} + + cur_frm.cscript.warehouse = function(doc, cdt , cdn) { var d = locals[cdt][cdn]; if (!d.item_code) {alert("please enter item code first"); return}; diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py index 6b9b740df4..e21c9ba8c8 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py @@ -74,9 +74,9 @@ class DocType(TransactionBase): for d in getlist(self.doclist,'entries'): # overwrite if mentioned in item item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(d.item_code), as_dict=1) - d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or '' - d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or '' - d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or '' + d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or d.income_account + d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or d.cost_center + d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or d.warehouse @@ -151,31 +151,36 @@ class DocType(TransactionBase): # Item Details # ------------- - def get_item_details(self, item_code=None): - if item_code: - ret = get_obj('Sales Common').get_item_details(item_code, self) - return self.get_pos_details(item_code, ret) + def get_item_details(self, args=None): + args = eval(args) + if args['item_code']: + ret = get_obj('Sales Common').get_item_details(args, self) + return self.get_pos_details(args, ret) else: obj = get_obj('Sales Common') for doc in self.doclist: if doc.fields.get('item_code'): ret = obj.get_item_details(doc.item_code, self) - ret = self.get_pos_details(item_code, ret) + ret = self.get_pos_details(doc.item_code, ret) for r in ret: if not doc.fields.get(r): - doc.fields[r] = ret[r] + doc.fields[r] = ret[r] - def get_pos_details(self, item_code, ret): - if item_code and cint(self.doc.is_pos) == 1: + def get_pos_details(self, args, ret): + if args['item_code'] and cint(self.doc.is_pos) == 1: dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where user = '%s' and company = '%s'" % (session['user'], self.doc.company), as_dict=1) if not dtl: dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % (self.doc.company), as_dict=1) - if dtl and not ret['income_account'] and dtl[0]['income_account']: ret['income_account'] = dtl and dtl[0]['income_account'] - if dtl and not ret['cost_center'] and dtl[0]['cost_center']: ret['cost_center'] = dtl and dtl[0]['cost_center'] - if dtl and not ret['warehouse'] and dtl[0]['warehouse']: ret['warehouse'] = dtl and dtl[0]['warehouse'] + + item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(args['item_code']), as_dict=1) + + ret['income_account'] = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or args['income_account'] + ret['cost_center'] = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or args['cost_center'] + ret['warehouse'] = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or args['warehouse'] + if ret['warehouse']: - actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item_code, ret['warehouse'])) + actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], ret['warehouse'])) ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0 return ret @@ -185,6 +190,14 @@ class DocType(TransactionBase): get_obj('Sales Common').get_adj_percent(self) + def get_comp_base_currency(self): + return get_obj('Sales Common').get_comp_base_currency(self.doc.company) + + def get_price_list_currency(self): + return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company) + + + # Get tax rate if account type is tax # ------------------------------------ def get_rate(self,arg): diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt index 66e5a6cb0f..24514bc981 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:18', 'docstatus': 0, - 'modified': '2012-02-15 14:24:14', + 'modified': '2012-02-24 14:32:22', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -21,7 +21,7 @@ # These values are common for all DocType { - '_last_update': u'1329295537', + '_last_update': u'1330074081', 'change_log': u'1. Change in pull_details method dt.-26-06-2009', 'colour': u'White:FFF', 'default_print_format': u'Standard', @@ -34,7 +34,7 @@ 'server_code_error': u' ', 'show_in_menu': 0, 'subject': u'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding', - 'version': 394 + 'version': 408 }, # These values are common for all DocFormat @@ -276,54 +276,6 @@ 'print_hide': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'customer_name', - 'fieldtype': u'Data', - 'label': u'Name', - 'oldfieldname': u'customer_name', - 'oldfieldtype': u'Data', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'address_display', - 'fieldtype': u'Small Text', - 'label': u'Address', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_display', - 'fieldtype': u'Small Text', - 'label': u'Contact', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_mobile', - 'fieldtype': u'Text', - 'label': u'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_email', - 'fieldtype': u'Text', - 'label': u'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - # DocField { 'colour': u'White:FFF', @@ -333,42 +285,6 @@ 'permlevel': 0 }, - # DocField - { - 'colour': u'White:FFF', - 'default': u'Today', - 'description': u"This is the date on which this voucher is made in the system. Today's date comes by default.", - 'doctype': u'DocField', - 'fieldname': u'voucher_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Voucher Date', - 'no_copy': 1, - 'oldfieldname': u'voucher_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'Today', - 'description': u'Enter the date by which payments from customer is expected against this invoice.', - 'doctype': u'DocField', - 'fieldname': u'due_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Due Date', - 'no_copy': 1, - 'oldfieldname': u'due_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'reqd': 1, - 'search_index': 0 - }, - # DocField { 'colour': u'White:FFF', @@ -401,6 +317,24 @@ 'print_hide': 1 }, + # DocField + { + 'colour': u'White:FFF', + 'default': u'Today', + 'description': u'Enter the date by which payments from customer is expected against this invoice.', + 'doctype': u'DocField', + 'fieldname': u'due_date', + 'fieldtype': u'Date', + 'in_filter': 1, + 'label': u'Due Date', + 'no_copy': 1, + 'oldfieldname': u'due_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'reqd': 1, + 'search_index': 0 + }, + # DocField { 'description': u'The date at which current entry is corrected in the system.', @@ -441,33 +375,6 @@ 'permlevel': 0 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'territory', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Territory', - 'options': u'Territory', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'customer_group', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer Group', - 'options': u'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 0 - }, - # DocField { 'colour': u'White:FFF', @@ -509,7 +416,7 @@ # DocField { 'colour': u'White:FFF', - 'description': u'Rate at which Price list currency is converted to your currency', + 'description': u"Rate at which Price list currency is converted to customer's base currency", 'doctype': u'DocField', 'fieldname': u'plc_conversion_rate', 'fieldtype': u'Currency', @@ -543,7 +450,9 @@ # DocField { + 'colour': u'White:FFF', 'default': u'1.00', + 'description': u"Rate at which Customer Currency is converted to customer's base currency", 'doctype': u'DocField', 'fieldname': u'conversion_rate', 'fieldtype': u'Currency', @@ -600,6 +509,7 @@ { 'doctype': u'DocField', 'fieldtype': u'Section Break', + 'options': u'Simple', 'permlevel': 0 }, @@ -825,290 +735,6 @@ 'print_hide': 1 }, - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldtype': u'Section Break', - 'label': u'Terms', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tc_name', - 'fieldtype': u'Link', - 'label': u'Select Terms', - 'oldfieldname': u'tc_name', - 'oldfieldtype': u'Link', - 'options': u'Term', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldtype': u'Button', - 'label': u'Get Terms', - 'oldfieldtype': u'Button', - 'options': u'get_tc_details', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Server' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldtype': u'HTML', - 'label': u'Terms HTML', - 'oldfieldtype': u'HTML', - 'options': u'You can add Terms and Notes that will be printed in the Transaction', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'terms', - 'fieldtype': u'Text Editor', - 'label': u'Term Details', - 'oldfieldname': u'terms', - 'oldfieldtype': u'Text Editor', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'No', - 'doctype': u'DocField', - 'fieldname': u'is_opening', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Is Opening', - 'oldfieldname': u'is_opening', - 'oldfieldtype': u'Select', - 'options': u'No\nYes', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'aging_date', - 'fieldtype': u'Date', - 'label': u'Aging Date', - 'oldfieldname': u'aging_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'letter_head', - 'fieldtype': u'Select', - 'label': u'Letter Head', - 'oldfieldname': u'letter_head', - 'oldfieldtype': u'Select', - 'options': u'link:Letter Head', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'source', - 'fieldtype': u'Select', - 'label': u'Source', - 'oldfieldname': u'source', - 'oldfieldtype': u'Select', - 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u"eval:doc.source == 'Campaign'", - 'doctype': u'DocField', - 'fieldname': u'campaign', - 'fieldtype': u'Link', - 'label': u'Campaign', - 'oldfieldname': u'campaign', - 'oldfieldtype': u'Link', - 'options': u'Campaign', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'select_print_heading', - 'fieldtype': u'Link', - 'label': u'Select Print Heading', - 'no_copy': 1, - 'oldfieldname': u'select_print_heading', - 'oldfieldtype': u'Link', - 'options': u'Print Heading', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Track this Sales Invoice against any Project', - 'doctype': u'DocField', - 'fieldname': u'project_name', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Project Name', - 'oldfieldname': u'project_name', - 'oldfieldtype': u'Link', - 'options': u'Project', - 'permlevel': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'c_form_applicable', - 'fieldtype': u'Select', - 'label': u'C-Form Applicable', - 'no_copy': 1, - 'options': u'No\nYes', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'c_form_no', - 'fieldtype': u'Link', - 'label': u'C-Form No', - 'no_copy': 1, - 'options': u'C-Form', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Company', - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Fiscal Year', - 'no_copy': 0, - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'label': u'Cancel Reason', - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'remarks', - 'fieldtype': u'Small Text', - 'label': u'Remarks', - 'no_copy': 1, - 'oldfieldname': u'remarks', - 'oldfieldtype': u'Text', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0 - }, - # DocField { 'colour': u'White:FFF', @@ -1238,7 +864,6 @@ # DocField { 'colour': u'White:FFF', - 'description': u'In Words (Export) will be visible once you save the Sales Invoice.', 'doctype': u'DocField', 'fieldname': u'in_words_export', 'fieldtype': u'Data', @@ -1278,6 +903,309 @@ 'colour': u'White:FFF', 'doctype': u'DocField', 'fieldtype': u'Section Break', + 'label': u'Terms', + 'oldfieldtype': u'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'tc_name', + 'fieldtype': u'Link', + 'label': u'Select Terms', + 'oldfieldname': u'tc_name', + 'oldfieldtype': u'Link', + 'options': u'Term', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Get Terms', + 'oldfieldtype': u'Button', + 'options': u'get_tc_details', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': u'Server' + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Terms HTML', + 'oldfieldtype': u'HTML', + 'options': u'You can add Terms and Notes that will be printed in the Transaction', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'terms', + 'fieldtype': u'Text Editor', + 'label': u'Term Details', + 'oldfieldname': u'terms', + 'oldfieldtype': u'Text Editor', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'More Info', + 'oldfieldtype': u'Section Break', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'50%' + }, + + # DocField + { + 'colour': u'White:FFF', + 'default': u'No', + 'doctype': u'DocField', + 'fieldname': u'is_opening', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Is Opening', + 'oldfieldname': u'is_opening', + 'oldfieldtype': u'Select', + 'options': u'No\nYes', + 'permlevel': 0, + 'print_hide': 1, + 'search_index': 0, + 'trigger': u'Client' + }, + + # DocField + { + 'colour': u'White:FFF', + 'default': u'Today', + 'description': u"This is the date on which this voucher is made in the system. Today's date comes by default.", + 'doctype': u'DocField', + 'fieldname': u'voucher_date', + 'fieldtype': u'Date', + 'in_filter': 1, + 'label': u'Voucher Date', + 'no_copy': 1, + 'oldfieldname': u'voucher_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'reqd': 1, + 'search_index': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'aging_date', + 'fieldtype': u'Date', + 'label': u'Aging Date', + 'oldfieldname': u'aging_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'allow_on_submit': 1, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'letter_head', + 'fieldtype': u'Select', + 'label': u'Letter Head', + 'oldfieldname': u'letter_head', + 'oldfieldtype': u'Select', + 'options': u'link:Letter Head', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'c_form_applicable', + 'fieldtype': u'Select', + 'label': u'C-Form Applicable', + 'no_copy': 1, + 'options': u'No\nYes', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'c_form_no', + 'fieldtype': u'Link', + 'label': u'C-Form No', + 'no_copy': 1, + 'options': u'C-Form', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u"eval:doc.source == 'Campaign'", + 'doctype': u'DocField', + 'fieldname': u'campaign', + 'fieldtype': u'Link', + 'label': u'Campaign', + 'oldfieldname': u'campaign', + 'oldfieldtype': u'Link', + 'options': u'Campaign', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Track this Sales Invoice against any Project', + 'doctype': u'DocField', + 'fieldname': u'project_name', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Project Name', + 'oldfieldname': u'project_name', + 'oldfieldtype': u'Link', + 'options': u'Project', + 'permlevel': 0, + 'search_index': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0 + }, + + # DocField + { + 'allow_on_submit': 1, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'select_print_heading', + 'fieldtype': u'Link', + 'label': u'Select Print Heading', + 'no_copy': 1, + 'oldfieldname': u'select_print_heading', + 'oldfieldtype': u'Link', + 'options': u'Print Heading', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'source', + 'fieldtype': u'Select', + 'label': u'Source', + 'oldfieldname': u'source', + 'oldfieldtype': u'Select', + 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'company', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Company', + 'oldfieldname': u'company', + 'oldfieldtype': u'Link', + 'options': u'Company', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'fiscal_year', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Fiscal Year', + 'no_copy': 0, + 'oldfieldname': u'fiscal_year', + 'oldfieldtype': u'Select', + 'options': u'link:Fiscal Year', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', + 'label': u'Cancel Reason', + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'remarks', + 'fieldtype': u'Small Text', + 'label': u'Remarks', + 'no_copy': 1, + 'oldfieldname': u'remarks', + 'oldfieldtype': u'Text', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.is_pos', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', 'label': u'Advances', 'oldfieldtype': u'Section Break', 'permlevel': 0, @@ -1308,6 +1236,107 @@ 'print_hide': 1 }, + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.customer', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Customer Details', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'customer_name', + 'fieldtype': u'Data', + 'label': u'Name', + 'oldfieldname': u'customer_name', + 'oldfieldtype': u'Data', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'address_display', + 'fieldtype': u'Small Text', + 'label': u'Address', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'customer_group', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Customer Group', + 'options': u'Customer Group', + 'permlevel': 0, + 'print_hide': 1, + 'search_index': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_display', + 'fieldtype': u'Small Text', + 'label': u'Contact', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_mobile', + 'fieldtype': u'Text', + 'label': u'Mobile No', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_email', + 'fieldtype': u'Text', + 'label': u'Contact Email', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'territory', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Territory', + 'options': u'Territory', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 0 + }, + # DocField { 'doctype': u'DocField', @@ -1326,7 +1355,7 @@ 'oldfieldtype': u'Column Break', 'permlevel': 0, 'print_hide': 1, - 'width': u'45%' + 'width': u'50%' }, # DocField @@ -1344,6 +1373,17 @@ 'trigger': u'Client' }, + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'50%' + }, + # DocField { 'doctype': u'DocField', @@ -1373,13 +1413,10 @@ # DocField { - 'colour': u'White:FFF', 'doctype': u'DocField', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'55%' + 'fieldtype': u'Section Break', + 'options': u'Simple', + 'permlevel': 0 }, # DocField @@ -1395,33 +1432,6 @@ 'print_hide': 1 }, - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldtype': u'Button', - 'label': u'Repair Outstanding Amt', - 'oldfieldtype': u'Button', - 'options': u'repair_rv_outstanding', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'against_income_account', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Against Income Account', - 'no_copy': 1, - 'oldfieldname': u'against_income_account', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1 - }, - # DocField { 'depends_on': u'eval:doc.docstatus==1', @@ -1530,5 +1540,32 @@ 'no_copy': 1, 'permlevel': 1, 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'against_income_account', + 'fieldtype': u'Small Text', + 'hidden': 1, + 'label': u'Against Income Account', + 'no_copy': 1, + 'oldfieldname': u'against_income_account', + 'oldfieldtype': u'Small Text', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'allow_on_submit': 1, + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Repair Outstanding Amt', + 'oldfieldtype': u'Button', + 'options': u'repair_rv_outstanding', + 'permlevel': 0, + 'print_hide': 1 } ] \ No newline at end of file diff --git a/erpnext/accounts/doctype/rv_detail/rv_detail.txt b/erpnext/accounts/doctype/rv_detail/rv_detail.txt index 94a45837c1..a4bf82428c 100644 --- a/erpnext/accounts/doctype/rv_detail/rv_detail.txt +++ b/erpnext/accounts/doctype/rv_detail/rv_detail.txt @@ -5,209 +5,199 @@ { 'creation': '2010-08-08 17:09:20', 'docstatus': 0, - 'modified': '2011-06-20 13:02:03', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 16:14:38', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocType { - 'autoname': 'INVD.######', - 'colour': 'White:FFF', + 'autoname': u'INVD.######', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, - 'module': 'Accounts', + 'module': u'Accounts', 'name': '__common__', - 'section_style': 'Tray', - 'server_code_error': ' ', + 'section_style': u'Tray', + 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 22 + 'version': 25 }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'RV Detail', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'RV Detail', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # DocType, RV Detail { 'doctype': 'DocType', - 'name': 'RV Detail' + 'name': u'RV Detail' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_code', - 'fieldtype': 'Link', - 'idx': 1, + 'doctype': u'DocField', + 'fieldname': u'item_code', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Item', - 'oldfieldname': 'item_code', - 'oldfieldtype': 'Link', - 'options': 'Item', + 'label': u'Item', + 'oldfieldname': u'item_code', + 'oldfieldtype': u'Link', + 'options': u'Item', 'permlevel': 0, - 'print_hide': 1, + 'print_hide': 0, 'reqd': 0, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_name', - 'fieldtype': 'Data', - 'idx': 2, + 'doctype': u'DocField', + 'fieldname': u'item_name', + 'fieldtype': u'Data', 'in_filter': 0, - 'label': 'Item Name', - 'oldfieldname': 'item_name', - 'oldfieldtype': 'Data', + 'label': u'Item Name', + 'oldfieldname': u'item_name', + 'oldfieldtype': u'Data', 'permlevel': 0, + 'print_hide': 1, 'reqd': 1, 'search_index': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'description', - 'fieldtype': 'Text', - 'idx': 3, - 'label': 'Description', - 'oldfieldname': 'description', - 'oldfieldtype': 'Text', + 'doctype': u'DocField', + 'fieldname': u'description', + 'fieldtype': u'Text', + 'label': u'Description', + 'oldfieldname': u'description', + 'oldfieldtype': u'Text', 'permlevel': 0, 'reqd': 1, - 'width': '300px' + 'width': u'200px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'stock_uom', - 'fieldtype': 'Data', - 'idx': 4, - 'label': 'UOM', + 'doctype': u'DocField', + 'fieldname': u'stock_uom', + 'fieldtype': u'Data', + 'label': u'UOM', 'permlevel': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'qty', - 'fieldtype': 'Currency', - 'idx': 5, - 'label': 'Qty', - 'oldfieldname': 'qty', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'qty', + 'fieldtype': u'Currency', + 'label': u'Qty', + 'oldfieldname': u'qty', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'ref_rate', - 'fieldtype': 'Currency', - 'idx': 6, - 'label': 'Ref Rate', - 'oldfieldname': 'ref_rate', - 'oldfieldtype': 'Currency', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate', + 'oldfieldname': u'ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'adj_rate', - 'fieldtype': 'Float', - 'idx': 7, - 'label': 'Discount (%)', - 'oldfieldname': 'adj_rate', - 'oldfieldtype': 'Float', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'adj_rate', + 'fieldtype': u'Float', + 'label': u'Discount (%)', + 'oldfieldname': u'adj_rate', + 'oldfieldtype': u'Float', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'export_rate', - 'fieldtype': 'Currency', - 'idx': 8, - 'label': 'Basic Rate', - 'oldfieldname': 'export_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'export_rate', + 'fieldtype': u'Currency', + 'label': u'Basic Rate', + 'oldfieldname': u'export_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'export_amount', - 'fieldtype': 'Currency', - 'idx': 9, - 'label': 'Amount', - 'oldfieldname': 'export_amount', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'export_amount', + 'fieldtype': u'Currency', + 'label': u'Amount', + 'oldfieldname': u'export_amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'base_ref_rate', - 'fieldtype': 'Currency', - 'idx': 10, - 'label': 'Ref Rate*', - 'oldfieldname': 'base_ref_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'base_ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate*', + 'oldfieldname': u'base_ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'basic_rate', - 'fieldtype': 'Currency', - 'idx': 11, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'basic_rate', + 'fieldtype': u'Currency', 'in_filter': 0, - 'label': 'Basic Rate*', - 'oldfieldname': 'basic_rate', - 'oldfieldtype': 'Currency', + 'label': u'Basic Rate*', + 'oldfieldname': u'basic_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, 'search_index': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'amount', - 'fieldtype': 'Currency', - 'idx': 12, - 'label': 'Amount*', - 'oldfieldname': 'amount', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'amount', + 'fieldtype': u'Currency', + 'label': u'Amount*', + 'oldfieldname': u'amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'reqd': 1 @@ -215,167 +205,158 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'warehouse', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'warehouse', + 'fieldtype': u'Link', 'hidden': 0, - 'idx': 13, - 'label': 'Warehouse', - 'oldfieldname': 'warehouse', - 'oldfieldtype': 'Link', - 'options': 'Warehouse', + 'label': u'Warehouse', + 'oldfieldname': u'warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'income_account', - 'fieldtype': 'Link', - 'idx': 14, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'income_account', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Income Account', - 'oldfieldname': 'income_account', - 'oldfieldtype': 'Link', - 'options': 'Account', + 'label': u'Income Account', + 'oldfieldname': u'income_account', + 'oldfieldtype': u'Link', + 'options': u'Account', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'search_index': 1, - 'trigger': 'Client', - 'width': '120px' + 'trigger': u'Client', + 'width': u'120px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'cost_center', - 'fieldtype': 'Link', - 'idx': 15, + 'colour': u'White:FFF', + 'default': u'Purchase - TC', + 'doctype': u'DocField', + 'fieldname': u'cost_center', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Cost Center', - 'oldfieldname': 'cost_center', - 'oldfieldtype': 'Link', - 'options': 'Cost Center', + 'label': u'Cost Center', + 'oldfieldname': u'cost_center', + 'oldfieldtype': u'Link', + 'options': u'Cost Center', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'search_index': 1, - 'trigger': 'Client', - 'width': '120px' + 'trigger': u'Client', + 'width': u'120px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'serial_no', - 'fieldtype': 'Small Text', - 'idx': 16, - 'label': 'Serial No', - 'oldfieldname': 'serial_no', - 'oldfieldtype': 'Small Text', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'batch_no', - 'fieldtype': 'Link', - 'idx': 17, - 'label': 'Batch No', - 'options': 'Batch', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'item_group', - 'fieldtype': 'Link', - 'idx': 18, + 'doctype': u'DocField', + 'fieldname': u'serial_no', + 'fieldtype': u'Small Text', 'in_filter': 1, - 'label': 'Item Group', - 'oldfieldname': 'item_group', - 'oldfieldtype': 'Link', - 'options': 'Item Group', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'brand', - 'fieldtype': 'Data', - 'idx': 19, - 'in_filter': 1, - 'label': 'Brand Name', - 'oldfieldname': 'brand', - 'oldfieldtype': 'Data', + 'label': u'Serial No', + 'oldfieldname': u'serial_no', + 'oldfieldtype': u'Small Text', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'actual_qty', - 'fieldtype': 'Currency', - 'idx': 20, - 'label': 'Available Qty at Warehouse', - 'oldfieldname': 'actual_qty', - 'oldfieldtype': 'Currency', - 'permlevel': 1, + 'doctype': u'DocField', + 'fieldname': u'batch_no', + 'fieldtype': u'Link', + 'label': u'Batch No', + 'options': u'Batch', + 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'delivered_qty', - 'fieldtype': 'Currency', - 'idx': 21, - 'label': 'Delivered Qty', - 'oldfieldname': 'delivered_qty', - 'oldfieldtype': 'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'sales_order', - 'fieldtype': 'Link', - 'idx': 22, + 'doctype': u'DocField', + 'fieldname': u'item_group', + 'fieldtype': u'Link', + 'hidden': 1, 'in_filter': 1, - 'label': 'Sales Order', - 'oldfieldname': 'sales_order', - 'oldfieldtype': 'Link', - 'options': 'Sales Order', + 'label': u'Item Group', + 'oldfieldname': u'item_group', + 'oldfieldtype': u'Link', + 'options': u'Item Group', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'brand', + 'fieldtype': u'Data', + 'hidden': 1, + 'in_filter': 1, + 'label': u'Brand Name', + 'oldfieldname': u'brand', + 'oldfieldtype': u'Data', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'actual_qty', + 'fieldtype': u'Currency', + 'label': u'Available Qty at Warehouse', + 'oldfieldname': u'actual_qty', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'delivered_qty', + 'fieldtype': u'Currency', + 'label': u'Delivered Qty', + 'oldfieldname': u'delivered_qty', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'sales_order', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Sales Order', + 'oldfieldname': u'sales_order', + 'oldfieldtype': u'Link', + 'options': u'Sales Order', 'permlevel': 1, 'print_hide': 1, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'so_detail', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'so_detail', + 'fieldtype': u'Data', 'hidden': 1, - 'idx': 23, 'in_filter': 1, - 'label': 'SO Detail ', - 'oldfieldname': 'so_detail', - 'oldfieldtype': 'Data', + 'label': u'SO Detail ', + 'oldfieldname': u'so_detail', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, 'search_index': 1 @@ -383,32 +364,30 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'delivery_note', - 'fieldtype': 'Link', - 'idx': 24, + 'doctype': u'DocField', + 'fieldname': u'delivery_note', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Delivery Note', - 'oldfieldname': 'delivery_note', - 'oldfieldtype': 'Link', - 'options': 'Delivery Note', + 'label': u'Delivery Note', + 'oldfieldname': u'delivery_note', + 'oldfieldtype': u'Link', + 'options': u'Delivery Note', 'permlevel': 1, 'print_hide': 1, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'dn_detail', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'dn_detail', + 'fieldtype': u'Data', 'hidden': 1, - 'idx': 25, 'in_filter': 1, - 'label': 'DN Detail', - 'oldfieldname': 'dn_detail', - 'oldfieldtype': 'Data', + 'label': u'DN Detail', + 'oldfieldname': u'dn_detail', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, 'search_index': 1 @@ -416,29 +395,27 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_tax_rate', - 'fieldtype': 'Small Text', + 'doctype': u'DocField', + 'fieldname': u'item_tax_rate', + 'fieldtype': u'Small Text', 'hidden': 1, - 'idx': 26, - 'label': 'Item Tax Rate', - 'oldfieldname': 'item_tax_rate', - 'oldfieldtype': 'Small Text', + 'label': u'Item Tax Rate', + 'oldfieldname': u'item_tax_rate', + 'oldfieldtype': u'Small Text', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'clear_pending', - 'fieldtype': 'Check', + 'doctype': u'DocField', + 'fieldname': u'clear_pending', + 'fieldtype': u'Check', 'hidden': 1, - 'idx': 27, - 'label': 'Clear Pending', + 'label': u'Clear Pending', 'no_copy': 1, - 'oldfieldname': 'clear_pending', - 'oldfieldtype': 'Check', + 'oldfieldname': u'clear_pending', + 'oldfieldtype': u'Check', 'permlevel': 1, 'print_hide': 1 }, @@ -446,12 +423,10 @@ # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'page_break', - 'fieldtype': 'Check', - 'idx': 28, - 'label': 'Page Break', + 'doctype': u'DocField', + 'fieldname': u'page_break', + 'fieldtype': u'Check', + 'label': u'Page Break', 'no_copy': 1, 'permlevel': 0, 'print_hide': 1, diff --git a/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt b/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt index 784c3b7591..4a4c68ac43 100644 --- a/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt +++ b/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt @@ -5,166 +5,169 @@ { 'creation': '2010-08-08 17:09:20', 'docstatus': 0, - 'modified': '2011-12-28 17:33:30', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-23 15:49:43', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocType { - 'autoname': 'INVTD.######', - 'colour': 'White:FFF', - 'default_print_format': 'Standard', + 'autoname': u'INVTD.######', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_heading': 1, 'istable': 1, - 'module': 'Accounts', + 'module': u'Accounts', 'name': '__common__', - 'section_style': 'Tray', - 'server_code_error': ' ', + 'section_style': u'Tray', + 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 18 + 'version': 20 }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'RV Tax Detail', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'RV Tax Detail', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # DocType, RV Tax Detail { 'doctype': 'DocType', - 'name': 'RV Tax Detail' + 'name': u'RV Tax Detail' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'charge_type', - 'fieldtype': 'Select', - 'label': 'Type', - 'oldfieldname': 'charge_type', - 'oldfieldtype': 'Select', - 'options': '\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total', + 'doctype': u'DocField', + 'fieldname': u'charge_type', + 'fieldtype': u'Select', + 'label': u'Type', + 'oldfieldname': u'charge_type', + 'oldfieldtype': u'Select', + 'options': u'\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total', 'permlevel': 0, 'reqd': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'account_head', - 'fieldtype': 'Link', - 'label': 'Account Head', - 'oldfieldname': 'account_head', - 'oldfieldtype': 'Link', - 'options': 'Account', + 'doctype': u'DocField', + 'fieldname': u'account_head', + 'fieldtype': u'Link', + 'label': u'Account Head', + 'oldfieldname': u'account_head', + 'oldfieldtype': u'Link', + 'options': u'Account', 'permlevel': 0, 'reqd': 1, - 'trigger': 'Client' + 'search_index': 1, + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'cost_center_other_charges', - 'fieldtype': 'Link', - 'label': 'Cost Center', - 'oldfieldname': 'cost_center_other_charges', - 'oldfieldtype': 'Link', - 'options': 'Cost Center', + 'doctype': u'DocField', + 'fieldname': u'cost_center_other_charges', + 'fieldtype': u'Link', + 'label': u'Cost Center', + 'oldfieldname': u'cost_center_other_charges', + 'oldfieldtype': u'Link', + 'options': u'Cost Center', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'description', - 'fieldtype': 'Small Text', - 'label': 'Description', - 'oldfieldname': 'description', - 'oldfieldtype': 'Small Text', + 'doctype': u'DocField', + 'fieldname': u'description', + 'fieldtype': u'Small Text', + 'label': u'Description', + 'oldfieldname': u'description', + 'oldfieldtype': u'Small Text', 'permlevel': 0, 'reqd': 1, - 'width': '300px' + 'width': u'300px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'rate', - 'fieldtype': 'Currency', - 'label': 'Rate', - 'oldfieldname': 'rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'rate', + 'fieldtype': u'Currency', + 'label': u'Rate', + 'oldfieldname': u'rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'tax_amount', - 'fieldtype': 'Currency', - 'label': 'Amount*', - 'oldfieldname': 'tax_amount', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'tax_amount', + 'fieldtype': u'Currency', + 'label': u'Amount*', + 'oldfieldname': u'tax_amount', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'total', - 'fieldtype': 'Currency', - 'label': 'Total*', - 'oldfieldname': 'total', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'total', + 'fieldtype': u'Currency', + 'label': u'Total*', + 'oldfieldname': u'total', + 'oldfieldtype': u'Currency', 'permlevel': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'row_id', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'row_id', + 'fieldtype': u'Data', 'hidden': 0, - 'label': 'Enter Row', - 'oldfieldname': 'row_id', - 'oldfieldtype': 'Data', + 'label': u'Enter Row', + 'oldfieldname': u'row_id', + 'oldfieldtype': u'Data', 'permlevel': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_wise_tax_detail', - 'fieldtype': 'Small Text', - 'label': 'Item Wise Tax Detail ', - 'oldfieldname': 'item_wise_tax_detail', - 'oldfieldtype': 'Small Text', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'item_wise_tax_detail', + 'fieldtype': u'Small Text', + 'hidden': 1, + 'label': u'Item Wise Tax Detail ', + 'oldfieldname': u'item_wise_tax_detail', + 'oldfieldtype': u'Small Text', 'permlevel': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'parenttype', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'parenttype', + 'fieldtype': u'Data', 'hidden': 1, 'in_filter': 1, - 'label': 'Parenttype', - 'oldfieldname': 'parenttype', - 'oldfieldtype': 'Data', + 'label': u'Parenttype', + 'oldfieldname': u'parenttype', + 'oldfieldtype': u'Data', 'permlevel': 0, 'print_hide': 1, 'search_index': 1 @@ -172,16 +175,16 @@ # DocField { - 'colour': 'White:FFF', - 'description': 'Cheating Field\nPlease do not delete ', - 'doctype': 'DocField', - 'fieldname': 'total_tax_amount', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'description': u'Cheating Field\nPlease do not delete ', + 'doctype': u'DocField', + 'fieldname': u'total_tax_amount', + 'fieldtype': u'Currency', 'hidden': 1, - 'label': 'Total Tax Amount', + 'label': u'Total Tax Amount', 'no_copy': 1, - 'oldfieldname': 'total_tax_amount', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'total_tax_amount', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -189,15 +192,15 @@ # DocField { - 'description': 'Cheating Field\nPlease do not delete ', - 'doctype': 'DocField', - 'fieldname': 'total_amount', - 'fieldtype': 'Currency', + 'description': u'Cheating Field\nPlease do not delete ', + 'doctype': u'DocField', + 'fieldname': u'total_amount', + 'fieldtype': u'Currency', 'hidden': 1, - 'label': 'Total Amount', + 'label': u'Total Amount', 'no_copy': 1, - 'oldfieldname': 'total_amount', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'total_amount', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -206,11 +209,11 @@ # DocField { 'allow_on_submit': 0, - 'description': 'If checked, the tax amount will be considered as already included in the Print Rate / Print Amount', - 'doctype': 'DocField', - 'fieldname': 'included_in_print_rate', - 'fieldtype': 'Check', - 'label': 'Included in Print Rate', + 'description': u'If checked, the tax amount will be considered as already included in the Print Rate / Print Amount', + 'doctype': u'DocField', + 'fieldname': u'included_in_print_rate', + 'fieldtype': u'Check', + 'label': u'Included in Print Rate', 'no_column': 0, 'no_copy': 1, 'permlevel': 0, diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index e39b5f06c1..9710447273 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -31,7 +31,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']); } } - } cur_frm.cscript.onload_post_render = function(doc, dt, dn) { @@ -68,6 +67,12 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons(); + var callback = function() { + cur_frm.cscript.dynamic_label(doc, cdt, cdn); + } + cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback); + + if(doc.docstatus == 1 && doc.status!='Order Lost') { cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']); cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']); diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 795ef7991e..b903cc6dfe 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -60,9 +60,10 @@ class DocType(TransactionBase): # Get Item Details # ----------------- - def get_item_details(self, item_code=None): - if item_code: - return get_obj('Sales Common').get_item_details(item_code, self) + def get_item_details(self, args=None): + args = eval(args) + if args['item_code']: + return get_obj('Sales Common').get_item_details(args, self) else: obj = get_obj('Sales Common') for doc in self.doclist: @@ -77,6 +78,13 @@ class DocType(TransactionBase): # -------------------------------------------------------------- def get_adj_percent(self, arg=''): get_obj('Sales Common').get_adj_percent(self) + + + def get_comp_base_currency(self): + return get_obj('Sales Common').get_comp_base_currency(self.doc.company) + + def get_price_list_currency(self): + return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company) # OTHER CHARGES TRIGGER FUNCTIONS @@ -204,7 +212,6 @@ class DocType(TransactionBase): def on_update(self): # Add to calendar - #if self.doc.contact_date and self.doc.last_contact_date != self.doc.contact_date: if self.doc.contact_date and self.doc.contact_date_ref != self.doc.contact_date: if self.doc.contact_by: self.add_calendar_event() diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt index d1054bfcc2..dc5dabaa3b 100644 --- a/erpnext/selling/doctype/quotation/quotation.txt +++ b/erpnext/selling/doctype/quotation/quotation.txt @@ -5,87 +5,68 @@ { 'creation': '2010-08-08 17:09:17', 'docstatus': 0, - 'modified': '2012-01-09 16:52:51', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 13:19:09', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'Quotation', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'Quotation', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # These values are common for all DocType { - '_last_update': '1325570646', + '_last_update': u'1330069591', 'allow_attach': 1, 'allow_email': 0, 'allow_trash': 1, - 'colour': 'White:FFF', - 'default_print_format': 'Standard', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', - 'document_type': 'Transaction', + 'document_type': u'Transaction', 'hide_toolbar': 0, 'is_transaction_doc': 1, 'max_attachments': 1, - 'module': 'Selling', + 'module': u'Selling', 'name': '__common__', 'read_only_onload': 1, - 'search_fields': 'status,transaction_date,customer,lead,order_type', - 'section_style': 'Tabbed', - 'server_code_error': ' ', + 'search_fields': u'status,transaction_date,customer,lead,order_type', + 'section_style': u'Tabbed', + 'server_code_error': u' ', 'show_in_menu': 0, - 'subject': 'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s', - 'tag_fields': 'status', - 'version': 599 + 'subject': u'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s', + 'tag_fields': u'status', + 'version': 616 }, # These values are common for all DocFormat { - 'doctype': 'DocFormat', + 'doctype': u'DocFormat', 'name': '__common__', - 'parent': 'Quotation', - 'parentfield': 'formats', - 'parenttype': 'DocType' + 'parent': u'Quotation', + 'parentfield': u'formats', + 'parenttype': u'DocType' }, # These values are common for all DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'name': '__common__', - 'parent': 'Quotation', - 'parentfield': 'permissions', - 'parenttype': 'DocType' + 'parent': u'Quotation', + 'parentfield': u'permissions', + 'parenttype': u'DocType', + 'read': 1 }, # DocType, Quotation { 'doctype': 'DocType', - 'name': 'Quotation' - }, - - # DocPerm - { - 'doctype': 'DocPerm', - 'permlevel': 0, - 'role': 'user print' - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': 'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': 'Sales Manager', - 'submit': 0, - 'write': 0 + 'name': u'Quotation' }, # DocPerm @@ -93,10 +74,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'read': 1, - 'role': 'Sales Manager', + 'role': u'Sales Manager', 'submit': 1, 'write': 1 }, @@ -106,34 +86,19 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'read': 1, - 'role': 'Sales User', + 'role': u'Sales User', 'submit': 1, 'write': 1 }, # DocPerm { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': 'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': 'Sales User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'doctype': 'DocPerm', - 'match': 'customer_name', + 'doctype': u'DocPerm', + 'match': u'customer_name', 'permlevel': 0, - 'read': 1, - 'role': 'Customer' + 'role': u'Customer' }, # DocPerm @@ -141,92 +106,81 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'read': 1, - 'role': 'Maintenance Manager', + 'role': u'Maintenance Manager', 'submit': 1, 'write': 1 }, - # DocPerm - { - 'doctype': 'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': 'Maintenance Manager' - }, - # DocPerm { 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'read': 1, - 'role': 'Maintenance User', + 'role': u'Maintenance User', 'submit': 1, 'write': 1 }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'read': 1, - 'role': 'Maintenance User' + 'role': u'All' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Quotation Classic' + 'doctype': u'DocFormat', + 'format': u'Quotation Classic' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Quotation Modern' + 'doctype': u'DocFormat', + 'format': u'Quotation Modern' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Quotation Spartan' + 'doctype': u'DocFormat', + 'format': u'Quotation Spartan' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Basic Info', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Basic Info', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'description': 'To manage multiple series please go to Setup > Manage Series', - 'doctype': 'DocField', - 'fieldname': 'naming_series', - 'fieldtype': 'Select', - 'label': 'Series', + 'colour': u'White:FFF', + 'description': u'To manage multiple series please go to Setup > Manage Series', + 'doctype': u'DocField', + 'fieldname': u'naming_series', + 'fieldtype': u'Select', + 'label': u'Series', 'no_copy': 1, - 'oldfieldname': 'naming_series', - 'oldfieldtype': 'Select', - 'options': 'QTN', + 'oldfieldname': u'naming_series', + 'oldfieldtype': u'Select', + 'options': u'QTN', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -234,200 +188,141 @@ # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'quotation_to', - 'fieldtype': 'Select', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'quotation_to', + 'fieldtype': u'Select', 'in_filter': 1, - 'label': 'Quotation To', - 'oldfieldname': 'quotation_to', - 'oldfieldtype': 'Select', - 'options': '\nLead\nCustomer', + 'label': u'Quotation To', + 'oldfieldname': u'quotation_to', + 'oldfieldtype': u'Select', + 'options': u'\nLead\nCustomer', 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, 'reqd': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'customer', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'customer', + 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 1, - 'label': 'Customer', - 'oldfieldname': 'customer', - 'oldfieldtype': 'Link', - 'options': 'Customer', + 'label': u'Customer', + 'oldfieldname': u'customer', + 'oldfieldtype': u'Link', + 'options': u'Customer', 'permlevel': 0, 'print_hide': 1, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'customer_address', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'customer_address', + 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 1, - 'label': 'Customer Address', - 'options': 'Address', + 'label': u'Customer Address', + 'options': u'Address', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'contact_person', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'contact_person', + 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 1, - 'label': 'Contact Person', - 'oldfieldname': 'contact_person', - 'oldfieldtype': 'Link', - 'options': 'Contact', + 'label': u'Contact Person', + 'oldfieldname': u'contact_person', + 'oldfieldtype': u'Link', + 'options': u'Contact', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer_name', - 'fieldtype': 'Data', - 'label': 'Name', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'lead', + 'fieldtype': u'Link', + 'hidden': 0, + 'in_filter': 1, + 'label': u'Lead', + 'oldfieldname': u'lead', + 'oldfieldtype': u'Link', + 'options': u'Lead', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.lead', + 'doctype': u'DocField', + 'fieldname': u'lead_name', + 'fieldtype': u'Text', + 'label': u'Name', 'permlevel': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'lead', - 'fieldtype': 'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': 'Lead', - 'oldfieldname': 'lead', - 'oldfieldtype': 'Link', - 'options': 'Lead', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, - 'print_hide': 1, - 'trigger': 'Client' + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'lead_name', - 'fieldtype': 'Text', - 'label': 'Name', - 'permlevel': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'address_display', - 'fieldtype': 'Small Text', - 'hidden': 0, - 'in_filter': 0, - 'label': 'Address', - 'oldfieldname': 'customer_address', - 'oldfieldtype': 'Small Text', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'contact_display', - 'fieldtype': 'Small Text', - 'in_filter': 0, - 'label': 'Contact', - 'permlevel': 1, - 'print_hide': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'contact_mobile', - 'fieldtype': 'Text', - 'hidden': 0, - 'label': 'Mobile No', - 'permlevel': 1, - 'print_hide': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'contact_email', - 'fieldtype': 'Text', - 'label': 'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', - 'permlevel': 0, - 'width': '50%' - }, - - # DocField - { - 'default': 'Today', - 'description': 'The date at which current entry is made in system.', - 'doctype': 'DocField', - 'fieldname': 'transaction_date', - 'fieldtype': 'Date', + 'default': u'Today', + 'description': u'The date at which current entry is made in system.', + 'doctype': u'DocField', + 'fieldname': u'transaction_date', + 'fieldtype': u'Date', 'in_filter': 1, - 'label': 'Quotation Date', + 'label': u'Quotation Date', 'no_copy': 1, - 'oldfieldname': 'transaction_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'transaction_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'reqd': 1, 'search_index': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'order_type', - 'fieldtype': 'Select', + 'colour': u'White:FFF', + 'default': u'Sales', + 'doctype': u'DocField', + 'fieldname': u'order_type', + 'fieldtype': u'Select', 'in_filter': 1, - 'label': 'Order Type', - 'oldfieldname': 'order_type', - 'oldfieldtype': 'Select', - 'options': '\nSales\nMaintenance', + 'label': u'Order Type', + 'oldfieldname': u'order_type', + 'oldfieldtype': u'Select', + 'options': u'\nSales\nMaintenance', 'permlevel': 0, 'print_hide': 0, 'reqd': 1, @@ -437,17 +332,17 @@ # DocField { 'allow_on_submit': 0, - 'colour': 'White:FFF', - 'default': 'Draft', - 'doctype': 'DocField', - 'fieldname': 'status', - 'fieldtype': 'Select', + 'colour': u'White:FFF', + 'default': u'Draft', + 'doctype': u'DocField', + 'fieldname': u'status', + 'fieldtype': u'Select', 'in_filter': 1, - 'label': 'Status', + 'label': u'Status', 'no_copy': 1, - 'oldfieldname': 'status', - 'oldfieldtype': 'Select', - 'options': '\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled', + 'oldfieldname': u'status', + 'oldfieldtype': u'Select', + 'options': u'\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled', 'permlevel': 1, 'print_hide': 1, 'reqd': 1, @@ -456,47 +351,152 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'amended_from', - 'fieldtype': 'Data', - 'label': 'Amended From', + 'doctype': u'DocField', + 'fieldname': u'amended_from', + 'fieldtype': u'Data', + 'label': u'Amended From', 'no_copy': 1, - 'oldfieldname': 'amended_from', - 'oldfieldtype': 'Data', + 'oldfieldname': u'amended_from', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'description': 'The date at which current entry is corrected in the system.', - 'doctype': 'DocField', - 'fieldname': 'amendment_date', - 'fieldtype': 'Date', - 'label': 'Amendment Date', + 'description': u'The date at which current entry is corrected in the system.', + 'doctype': u'DocField', + 'fieldname': u'amendment_date', + 'fieldtype': u'Date', + 'label': u'Amendment Date', 'no_copy': 1, - 'oldfieldname': 'amendment_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'amendment_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'description': "To create Quotation against Enquiry, Select Enquiry No. and click on 'Pull Enquiry Details' ", - 'doctype': 'DocField', - 'fieldname': 'enq_no', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Items', + 'oldfieldtype': u'Section Break', + 'permlevel': 0, + 'print_hide': 0, + 'search_index': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', + 'doctype': u'DocField', + 'fieldname': u'price_list_name', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Price List', + 'oldfieldname': u'price_list_name', + 'oldfieldtype': u'Select', + 'options': u'link:Price List', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 0, + 'trigger': u'Client', + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Select the currency in which price list is maintained', + 'doctype': u'DocField', + 'fieldname': u'price_list_currency', + 'fieldtype': u'Select', + 'label': u'Price List Currency', + 'options': u'link:Currency', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u"Rate at which Price list currency is converted to company's base currency", + 'doctype': u'DocField', + 'fieldname': u'plc_conversion_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Currency Conversion Rate', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u"Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.", + 'doctype': u'DocField', + 'fieldname': u'currency', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Currency', + 'oldfieldname': u'currency', + 'oldfieldtype': u'Select', + 'options': u'link:Currency', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 0, + 'trigger': u'Client', + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'default': u'1.00', + 'description': u"Rate at which customer's currency is converted to company's base currency", + 'doctype': u'DocField', + 'fieldname': u'conversion_rate', + 'fieldtype': u'Currency', + 'label': u'Conversion Rate', + 'oldfieldname': u'conversion_rate', + 'oldfieldtype': u'Currency', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'trigger': u'Client', + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u"To create Quotation against Enquiry, Select Enquiry No. and click on 'Pull Enquiry Details' ", + 'doctype': u'DocField', + 'fieldname': u'enq_no', + 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 1, - 'label': 'Enquiry No', + 'label': u'Enquiry No', 'no_copy': 0, - 'oldfieldname': 'enq_no', - 'oldfieldtype': 'Link', - 'options': 'Enquiry', + 'oldfieldname': u'enq_no', + 'oldfieldtype': u'Link', + 'options': u'Enquiry', 'permlevel': 0, 'print_hide': 0, 'report_hide': 0, @@ -505,474 +505,307 @@ # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', 'hidden': 0, - 'label': 'Pull Enquiry Detail', + 'label': u'Pull Enquiry Detail', 'no_copy': 0, - 'oldfieldtype': 'Button', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 0, 'report_hide': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Will be fetched from Customer', - 'doctype': 'DocField', - 'fieldname': 'territory', - 'fieldtype': 'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': 'Territory', - 'options': 'Territory', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': 'Client' - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'customer_group', - 'fieldtype': 'Link', - 'in_filter': 1, - 'label': 'Customer Group', - 'oldfieldname': 'customer_group', - 'oldfieldtype': 'Link', - 'options': 'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 0, - 'trigger': 'Client' - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Items', - 'oldfieldtype': 'Section Break', - 'permlevel': 0, - 'print_hide': 0, - 'search_index': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', - 'doctype': 'DocField', - 'fieldname': 'price_list_name', - 'fieldtype': 'Select', - 'in_filter': 1, - 'label': 'Price List', - 'oldfieldname': 'price_list_name', - 'oldfieldtype': 'Select', - 'options': 'link:Price List', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': 'Client', - 'width': '100px' - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Select the currency in which price list is maintained', - 'doctype': 'DocField', - 'fieldname': 'price_list_currency', - 'fieldtype': 'Select', - 'label': 'Price List Currency', - 'options': 'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Rate at which Price list currency is converted to your currency', - 'doctype': 'DocField', - 'fieldname': 'plc_conversion_rate', - 'fieldtype': 'Currency', - 'label': 'Price List Currency Conversion Rate', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'permlevel': 0, - 'width': '50%' - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.", - 'doctype': 'DocField', - 'fieldname': 'currency', - 'fieldtype': 'Select', - 'in_filter': 1, - 'label': 'Currency', - 'oldfieldname': 'currency', - 'oldfieldtype': 'Select', - 'options': 'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': 'Client', - 'width': '100px' - }, - - # DocField - { - 'colour': 'White:FFF', - 'default': '1.00', - 'description': "Rate at which customer's currency is converted to your currency", - 'doctype': 'DocField', - 'fieldname': 'conversion_rate', - 'fieldtype': 'Currency', - 'label': 'Currency Conversion Rate', - 'oldfieldname': 'conversion_rate', - 'oldfieldtype': 'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'trigger': 'Client', - 'width': '100px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Clear Table', - 'oldfieldtype': 'Button', - 'options': 'clear_quotation_details', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'options': 'Simple', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'options': u'Simple', 'permlevel': 0 }, # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'description': 'Field Descriptions for Quotation Details\n\nRef Rate: Rate in your selected Price List. Price Lists help you track discounts.\n\nPage Break: If you want to break the page on this item in the Print Format', - 'doctype': 'DocField', - 'fieldname': 'quotation_details', - 'fieldtype': 'Table', - 'label': 'Quotation Details', - 'oldfieldname': 'quotation_details', - 'oldfieldtype': 'Table', - 'options': 'Quotation Detail', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'quotation_details', + 'fieldtype': u'Table', + 'label': u'Quotation Details', + 'oldfieldname': u'quotation_details', + 'oldfieldtype': u'Table', + 'options': u'Quotation Detail', 'permlevel': 0, - 'width': '40px' + 'width': u'40px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'net_total', - 'fieldtype': 'Currency', - 'label': 'Net Total*', - 'no_copy': 0, - 'oldfieldname': 'net_total', - 'oldfieldtype': 'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': '100px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Re-Calculate Values', - 'oldfieldtype': 'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': 'Client' - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Note HTML', - 'oldfieldtype': 'HTML', - 'options': '
Note : * In Base Currency\n
', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Clear Table', + 'oldfieldtype': u'Button', + 'options': u'clear_quotation_details', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Taxes', - 'oldfieldtype': 'Section Break', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Re-Calculate Values', + 'oldfieldtype': u'Button', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': u'Client' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'net_total', + 'fieldtype': u'Currency', + 'label': u'Net Total*', + 'no_copy': 0, + 'oldfieldname': u'net_total', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Note HTML', + 'oldfieldtype': u'HTML', + 'options': u'
Note : * In Base Currency\n
', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Taxes', + 'oldfieldtype': u'Section Break', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'charge', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'charge', + 'fieldtype': u'Link', 'hidden': 0, - 'label': 'Select Charges Master', - 'oldfieldname': 'charge', - 'oldfieldtype': 'Link', - 'options': 'Other Charges', + 'label': u'Select Charges Master', + 'oldfieldname': u'charge', + 'oldfieldtype': u'Link', + 'options': u'Other Charges', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', 'hidden': 0, - 'label': 'Get Charges', - 'oldfieldtype': 'Button', + 'label': u'Get Charges', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'other_charges', - 'fieldtype': 'Table', - 'label': 'Other Charges', - 'oldfieldname': 'other_charges', - 'oldfieldtype': 'Table', - 'options': 'RV Tax Detail', + 'doctype': u'DocField', + 'fieldname': u'other_charges', + 'fieldtype': u'Table', + 'label': u'Other Charges', + 'oldfieldname': u'other_charges', + 'oldfieldtype': u'Table', + 'options': u'RV Tax Detail', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Calculate Charges', - 'oldfieldtype': 'Button', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Calculate Charges', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'other_charges_total', - 'fieldtype': 'Currency', - 'label': 'Charges Total*', - 'oldfieldname': 'other_charges_total', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'other_charges_total', + 'fieldtype': u'Currency', + 'label': u'Charges Total*', + 'oldfieldname': u'other_charges_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'grand_total', - 'fieldtype': 'Currency', - 'label': 'Grand Total*', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Other Charges Calculation', + 'oldfieldtype': u'HTML', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Totals', + 'oldfieldtype': u'Section Break', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'grand_total', + 'fieldtype': u'Currency', + 'label': u'Grand Total*', 'no_copy': 0, - 'oldfieldname': 'grand_total', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'grand_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'reqd': 0, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Other Charges Calculation', - 'oldfieldtype': 'HTML', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'OT Notes', - 'oldfieldtype': 'HTML', - 'options': '
Note : * In Base Currency\n
', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Totals', - 'oldfieldtype': 'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'rounded_total', - 'fieldtype': 'Currency', - 'label': 'Rounded Total', + 'doctype': u'DocField', + 'fieldname': u'rounded_total', + 'fieldtype': u'Currency', + 'label': u'Rounded Total', 'no_copy': 0, - 'oldfieldname': 'rounded_total', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'rounded_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'trigger': 'Client', - 'width': '200px' + 'trigger': u'Client', + 'width': u'200px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'In Words will be visible once you save the Quotation.', - 'doctype': 'DocField', - 'fieldname': 'in_words', - 'fieldtype': 'Data', - 'label': 'In Words', + 'colour': u'White:FFF', + 'description': u'In Words will be visible once you save the Quotation.', + 'doctype': u'DocField', + 'fieldname': u'in_words', + 'fieldtype': u'Data', + 'label': u'In Words', 'no_copy': 0, - 'oldfieldname': 'in_words', - 'oldfieldtype': 'Data', + 'oldfieldname': u'in_words', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, 'print_hide': 1, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'grand_total_export', - 'fieldtype': 'Currency', - 'label': 'Grand Total (Export)', + 'doctype': u'DocField', + 'fieldname': u'grand_total_export', + 'fieldtype': u'Currency', + 'label': u'Grand Total', 'no_copy': 0, - 'oldfieldname': 'grand_total_export', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'grand_total_export', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'rounded_total_export', - 'fieldtype': 'Currency', - 'label': 'Rounded Total (Export)', + 'doctype': u'DocField', + 'fieldname': u'rounded_total_export', + 'fieldtype': u'Currency', + 'label': u'Rounded Total', 'no_copy': 0, - 'oldfieldname': 'rounded_total_export', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'rounded_total_export', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'In Words (Export) will be visible once you save the Quotation.', - 'doctype': 'DocField', - 'fieldname': 'in_words_export', - 'fieldtype': 'Data', - 'label': 'In Words (Export)', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'in_words_export', + 'fieldtype': u'Data', + 'label': u'In Words', 'no_copy': 0, - 'oldfieldname': 'in_words_export', - 'oldfieldtype': 'Data', + 'oldfieldname': u'in_words_export', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a master Term Sheet and use the Template', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Terms', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'description': u'Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a master Term Sheet and use the Template', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Terms', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'letter_head', - 'fieldtype': 'Select', - 'label': 'Letter Head', - 'oldfieldname': 'letter_head', - 'oldfieldtype': 'Select', - 'options': 'link:Letter Head', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'tc_name', - 'fieldtype': 'Link', - 'label': 'Select Terms', - 'oldfieldname': 'tc_name', - 'oldfieldtype': 'Link', - 'options': 'Term', + 'doctype': u'DocField', + 'fieldname': u'tc_name', + 'fieldtype': u'Link', + 'label': u'Select Terms', + 'oldfieldname': u'tc_name', + 'oldfieldtype': u'Link', + 'options': u'Term', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -980,79 +813,93 @@ # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Get Terms', - 'oldfieldtype': 'Button', - 'options': 'get_tc_details', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Get Terms', + 'oldfieldtype': u'Button', + 'options': u'get_tc_details', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Terms HTML', - 'oldfieldtype': 'HTML', - 'options': 'You can add Terms and Notes that will be printed in the Transaction', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Terms HTML', + 'oldfieldtype': u'HTML', + 'options': u'You can add Terms and Notes that will be printed in the Transaction', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'terms', - 'fieldtype': 'Text Editor', - 'label': 'Term Details', - 'oldfieldname': 'terms', - 'oldfieldtype': 'Text Editor', + 'doctype': u'DocField', + 'fieldname': u'terms', + 'fieldtype': u'Text Editor', + 'label': u'Term Details', + 'oldfieldname': u'terms', + 'oldfieldtype': u'Text Editor', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'description': 'Filling in additional information about the Quotation will help you analyze your data better.', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'More Info', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'description': u'Filling in additional information about the Quotation will help you analyze your data better.', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'More Info', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'description': 'Select the relevant company name if you have multiple companies.', - 'doctype': 'DocField', - 'fieldname': 'company', - 'fieldtype': 'Link', + 'allow_on_submit': 1, + 'doctype': u'DocField', + 'fieldname': u'letter_head', + 'fieldtype': u'Select', + 'label': u'Letter Head', + 'oldfieldname': u'letter_head', + 'oldfieldtype': u'Select', + 'options': u'link:Letter Head', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Select the relevant company name if you have multiple companies.', + 'doctype': u'DocField', + 'fieldname': u'company', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Company', - 'oldfieldname': 'company', - 'oldfieldtype': 'Link', - 'options': 'Company', + 'label': u'Company', + 'oldfieldname': u'company', + 'oldfieldtype': u'Link', + 'options': u'Company', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, 'search_index': 0, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'fiscal_year', - 'fieldtype': 'Select', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'fiscal_year', + 'fieldtype': u'Select', 'in_filter': 1, - 'label': 'Fiscal Year', - 'oldfieldname': 'fiscal_year', - 'oldfieldtype': 'Select', - 'options': 'link:Fiscal Year', + 'label': u'Fiscal Year', + 'oldfieldname': u'fiscal_year', + 'oldfieldtype': u'Select', + 'options': u'link:Fiscal Year', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, @@ -1061,15 +908,15 @@ # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'enq_det', - 'fieldtype': 'Text', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'enq_det', + 'fieldtype': u'Text', 'hidden': 1, - 'label': 'Enquiry Detail', + 'label': u'Enquiry Detail', 'no_copy': 0, - 'oldfieldname': 'enq_det', - 'oldfieldtype': 'Text', + 'oldfieldname': u'enq_det', + 'oldfieldtype': u'Text', 'permlevel': 1, 'print_hide': 1, 'report_hide': 0 @@ -1077,16 +924,16 @@ # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'source', - 'fieldtype': 'Select', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'source', + 'fieldtype': u'Select', 'hidden': 0, - 'label': 'Source', + 'label': u'Source', 'no_copy': 0, - 'oldfieldname': 'source', - 'oldfieldtype': 'Select', - 'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + 'oldfieldname': u'source', + 'oldfieldtype': u'Select', + 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 'permlevel': 0, 'print_hide': 1, 'report_hide': 0 @@ -1094,32 +941,71 @@ # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'campaign', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'campaign', + 'fieldtype': u'Link', 'hidden': 0, - 'label': 'Campaign', + 'label': u'Campaign', 'no_copy': 0, - 'oldfieldname': 'campaign', - 'oldfieldtype': 'Link', - 'options': 'Campaign', + 'oldfieldname': u'campaign', + 'oldfieldtype': u'Link', + 'options': u'Campaign', 'permlevel': 0, 'print_hide': 1, 'report_hide': 0 }, + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', + 'label': u'Cancel Reason', + 'no_copy': 1, + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'order_lost_reason', + 'fieldtype': u'Small Text', + 'label': u'Order Lost Reason', + 'no_copy': 1, + 'oldfieldname': u'order_lost_reason', + 'oldfieldtype': u'Small Text', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'50%' + }, + # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'select_print_heading', - 'fieldtype': 'Link', - 'label': 'Select Print Heading', + 'doctype': u'DocField', + 'fieldname': u'select_print_heading', + 'fieldtype': u'Link', + 'label': u'Select Print Heading', 'no_copy': 1, - 'oldfieldname': 'select_print_heading', - 'oldfieldtype': 'Link', - 'options': 'Print Heading', + 'oldfieldname': u'select_print_heading', + 'oldfieldtype': u'Link', + 'options': u'Print Heading', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -1127,105 +1013,189 @@ # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'cancel_reason', - 'fieldtype': 'Data', - 'label': 'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': 'cancel_reason', - 'oldfieldtype': 'Data', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0 + 'description': u'Your sales person who will contact the customer/lead in future', + 'doctype': u'DocField', + 'fieldname': u'contact_by', + 'fieldtype': u'Link', + 'label': u'Next Contact By', + 'oldfieldname': u'contact_by', + 'oldfieldtype': u'Link', + 'options': u'Profile', + 'permlevel': 0, + 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'order_lost_reason', - 'fieldtype': 'Small Text', - 'label': 'Order Lost Reason', + 'description': u'Your sales person will get a reminder on this date to contact the customer/lead', + 'doctype': u'DocField', + 'fieldname': u'contact_date', + 'fieldtype': u'Date', + 'label': u'Next Contact Date', + 'oldfieldname': u'contact_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Date on which the lead/customer was last contacted', + 'doctype': u'DocField', + 'fieldname': u'last_contact_date', + 'fieldtype': u'Date', + 'label': u'Last Contact Date', 'no_copy': 1, - 'oldfieldname': 'order_lost_reason', - 'oldfieldtype': 'Small Text', + 'oldfieldname': u'last_contact_date', + 'oldfieldtype': u'Date', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldname': u'to_discuss', + 'fieldtype': u'Small Text', + 'label': u'To Discuss', + 'oldfieldname': u'to_discuss', + 'oldfieldtype': u'Small Text', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.customer || doc.lead', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Lead/Customer Details', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'customer_name', + 'fieldtype': u'Data', + 'label': u'Name', + 'permlevel': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'address_display', + 'fieldtype': u'Small Text', + 'hidden': 0, + 'in_filter': 0, + 'label': u'Address', + 'oldfieldname': u'customer_address', + 'oldfieldtype': u'Small Text', + 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Will be fetched from Customer', + 'doctype': u'DocField', + 'fieldname': u'territory', + 'fieldtype': u'Link', + 'hidden': 0, + 'in_filter': 1, + 'label': u'Territory', + 'options': u'Territory', 'permlevel': 0, 'print_hide': 1, - 'width': '50%' + 'reqd': 1, + 'search_index': 0, + 'trigger': u'Client' }, # DocField { - 'description': 'Your sales person who will contact the customer/lead in future', - 'doctype': 'DocField', - 'fieldname': 'contact_by', - 'fieldtype': 'Link', - 'label': 'Next Contact By', - 'oldfieldname': 'contact_by', - 'oldfieldtype': 'Link', - 'options': 'Profile', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'print_hide': 1 + 'width': u'50%' }, # DocField { - 'description': 'Your sales person will get a reminder on this date to contact the customer/lead', - 'doctype': 'DocField', - 'fieldname': 'contact_date', - 'fieldtype': 'Date', - 'label': 'Next Contact Date', - 'oldfieldname': 'contact_date', - 'oldfieldtype': 'Date', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'customer_group', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Customer Group', + 'oldfieldname': u'customer_group', + 'oldfieldtype': u'Link', + 'options': u'Customer Group', 'permlevel': 0, - 'print_hide': 1 + 'print_hide': 1, + 'reqd': 0, + 'search_index': 0, + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Date on which the lead/customer was last contacted', - 'doctype': 'DocField', - 'fieldname': 'last_contact_date', - 'fieldtype': 'Date', - 'label': 'Last Contact Date', - 'no_copy': 1, - 'oldfieldname': 'last_contact_date', - 'oldfieldtype': 'Date', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'contact_display', + 'fieldtype': u'Small Text', + 'in_filter': 0, + 'label': u'Contact', + 'permlevel': 1, + 'print_hide': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'contact_mobile', + 'fieldtype': u'Text', + 'hidden': 0, + 'label': u'Mobile No', + 'permlevel': 1, + 'print_hide': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'contact_email', + 'fieldtype': u'Text', + 'label': u'Contact Email', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'to_discuss', - 'fieldtype': 'Small Text', - 'label': 'To Discuss', - 'oldfieldname': 'to_discuss', - 'oldfieldtype': 'Small Text', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Keep a track on communications regarding this Quotation. This will help you remember earlier communications in case the Customer comes back again', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Communication History', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'description': u'Keep a track on communications regarding this Quotation. This will help you remember earlier communications in case the Customer comes back again', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Communication History', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 1 }, @@ -1233,27 +1203,27 @@ # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'follow_up', - 'fieldtype': 'Table', - 'label': 'Follow up', - 'oldfieldname': 'follow_up', - 'oldfieldtype': 'Table', - 'options': 'Follow up', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'follow_up', + 'fieldtype': u'Table', + 'label': u'Follow up', + 'oldfieldname': u'follow_up', + 'oldfieldtype': u'Table', + 'options': u'Follow up', 'permlevel': 0, 'print_hide': 1, - 'width': '40px' + 'width': u'40px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'file_list', - 'fieldtype': 'Small Text', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'file_list', + 'fieldtype': u'Small Text', 'hidden': 1, - 'label': 'File List', + 'label': u'File List', 'no_copy': 1, 'permlevel': 0, 'print_hide': 1 diff --git a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt index 23c86fab4f..8c78f48e43 100644 --- a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt +++ b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt @@ -5,343 +5,330 @@ { 'creation': '2010-08-08 17:09:18', 'docstatus': 0, - 'modified': '2011-02-23 11:28:36', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 13:21:21', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocType { - 'autoname': 'QUOD/.#####', - 'colour': 'White:FFF', + 'autoname': u'QUOD/.#####', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_transaction_doc': 0, 'istable': 1, - 'module': 'Selling', + 'module': u'Selling', 'name': '__common__', - 'section_style': 'Tray', - 'server_code_error': ' ', + 'section_style': u'Tray', + 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 26 + 'version': 30 }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'Quotation Detail', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'Quotation Detail', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # DocType, Quotation Detail { 'doctype': 'DocType', - 'name': 'Quotation Detail' + 'name': u'Quotation Detail' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_code', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'item_code', + 'fieldtype': u'Link', 'hidden': 0, - 'idx': 1, 'in_filter': 1, - 'label': 'Item Code', - 'oldfieldname': 'item_code', - 'oldfieldtype': 'Link', - 'options': 'Item', + 'label': u'Item Code', + 'oldfieldname': u'item_code', + 'oldfieldtype': u'Link', + 'options': u'Item', 'permlevel': 0, 'print_hide': 0, 'reqd': 1, 'search_index': 1, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_name', - 'fieldtype': 'Data', - 'idx': 2, + 'doctype': u'DocField', + 'fieldname': u'item_name', + 'fieldtype': u'Data', 'in_filter': 1, - 'label': 'Item Name', - 'oldfieldname': 'item_name', - 'oldfieldtype': 'Data', + 'label': u'Item Name', + 'oldfieldname': u'item_name', + 'oldfieldtype': u'Data', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'search_index': 0, - 'width': '150px' + 'search_index': 1, + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'description', - 'fieldtype': 'Small Text', - 'idx': 3, - 'label': 'Description', - 'oldfieldname': 'description', - 'oldfieldtype': 'Small Text', + 'doctype': u'DocField', + 'fieldname': u'description', + 'fieldtype': u'Small Text', + 'label': u'Description', + 'oldfieldname': u'description', + 'oldfieldtype': u'Small Text', 'permlevel': 0, 'print_hide': 0, 'reqd': 1, - 'width': '300px' + 'width': u'300px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'qty', - 'fieldtype': 'Currency', - 'idx': 4, + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate', + 'oldfieldname': u'ref_rate', + 'oldfieldtype': u'Currency', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 0, + 'trigger': u'Client', + 'width': u'100px' + }, + + # DocField + { + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'adj_rate', + 'fieldtype': u'Float', + 'label': u'Discount (%)', + 'oldfieldname': u'adj_rate', + 'oldfieldtype': u'Float', + 'permlevel': 0, + 'print_hide': 0, + 'trigger': u'Client', + 'width': u'100px' + }, + + # DocField + { + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'export_rate', + 'fieldtype': u'Currency', 'in_filter': 0, - 'label': 'Quantity', - 'oldfieldname': 'qty', - 'oldfieldtype': 'Currency', + 'label': u'Rate', + 'oldfieldname': u'export_rate', + 'oldfieldtype': u'Currency', + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0, + 'search_index': 0, + 'trigger': u'Client', + 'width': u'100px' + }, + + # DocField + { + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'qty', + 'fieldtype': u'Currency', + 'in_filter': 0, + 'label': u'Quantity', + 'oldfieldname': u'qty', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 0, 'reqd': 1, 'search_index': 0, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'stock_uom', - 'fieldtype': 'Data', - 'idx': 5, - 'label': 'UOM', - 'oldfieldname': 'stock_uom', - 'oldfieldtype': 'Data', - 'permlevel': 1, - 'reqd': 0, - 'width': '100px' - }, - - # DocField - { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'ref_rate', - 'fieldtype': 'Currency', - 'idx': 6, - 'label': 'Ref Rate', - 'oldfieldname': 'ref_rate', - 'oldfieldtype': 'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'trigger': 'Client', - 'width': '100px' - }, - - # DocField - { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'adj_rate', - 'fieldtype': 'Float', - 'idx': 7, - 'label': 'Discount (%)', - 'oldfieldname': 'adj_rate', - 'oldfieldtype': 'Float', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': 'Client', - 'width': '100px' - }, - - # DocField - { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'export_rate', - 'fieldtype': 'Currency', - 'idx': 8, + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'export_amount', + 'fieldtype': u'Currency', 'in_filter': 0, - 'label': 'Rate', - 'oldfieldname': 'export_rate', - 'oldfieldtype': 'Currency', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': 'Client', - 'width': '100px' - }, - - # DocField - { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'export_amount', - 'fieldtype': 'Currency', - 'idx': 9, - 'in_filter': 0, - 'label': 'Amount', - 'oldfieldname': 'export_amount', - 'oldfieldtype': 'Currency', + 'label': u'Amount', + 'oldfieldname': u'export_amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, 'search_index': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'base_ref_rate', - 'fieldtype': 'Currency', - 'idx': 10, - 'label': 'Ref Rate*', - 'oldfieldname': 'base_ref_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'base_ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate*', + 'oldfieldname': u'base_ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'basic_rate', - 'fieldtype': 'Currency', - 'idx': 11, + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'basic_rate', + 'fieldtype': u'Currency', 'in_filter': 0, - 'label': 'Basic Rate*', - 'oldfieldname': 'basic_rate', - 'oldfieldtype': 'Currency', + 'label': u'Basic Rate*', + 'oldfieldname': u'basic_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, 'search_index': 0, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'amount', - 'fieldtype': 'Currency', - 'idx': 12, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'stock_uom', + 'fieldtype': u'Data', + 'label': u'UOM', + 'oldfieldname': u'stock_uom', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 0, + 'reqd': 0, + 'width': u'100px' + }, + + # DocField + { + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'amount', + 'fieldtype': u'Currency', 'in_filter': 0, - 'label': 'Amount*', - 'oldfieldname': 'amount', - 'oldfieldtype': 'Currency', + 'label': u'Amount*', + 'oldfieldname': u'amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'reqd': 0, 'search_index': 0, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_group', - 'fieldtype': 'Link', - 'idx': 13, + 'doctype': u'DocField', + 'fieldname': u'item_group', + 'fieldtype': u'Link', + 'hidden': 1, 'in_filter': 1, - 'label': 'Item Group', - 'oldfieldname': 'item_group', - 'oldfieldtype': 'Link', - 'options': 'Item Group', + 'label': u'Item Group', + 'oldfieldname': u'item_group', + 'oldfieldtype': u'Link', + 'options': u'Item Group', 'permlevel': 1, 'print_hide': 1, - 'search_index': 0 + 'search_index': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'brand', - 'fieldtype': 'Link', - 'idx': 14, + 'doctype': u'DocField', + 'fieldname': u'brand', + 'fieldtype': u'Link', + 'hidden': 1, 'in_filter': 1, - 'label': 'Brand', - 'oldfieldname': 'brand', - 'oldfieldtype': 'Link', - 'options': 'Brand', + 'label': u'Brand', + 'oldfieldname': u'brand', + 'oldfieldtype': u'Link', + 'options': u'Brand', 'permlevel': 1, 'print_hide': 1, - 'search_index': 0, - 'width': '150px' + 'search_index': 1, + 'width': u'150px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'item_tax_rate', + 'fieldtype': u'Small Text', + 'hidden': 1, + 'label': u'Item Tax Rate', + 'oldfieldname': u'item_tax_rate', + 'oldfieldtype': u'Small Text', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'prevdoc_docname', + 'fieldtype': u'Data', + 'label': u'Against Docname', + 'no_copy': 1, + 'oldfieldname': u'prevdoc_docname', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 0, + 'width': u'150px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'prevdoc_doctype', + 'fieldtype': u'Data', + 'hidden': 1, + 'label': u'Against Doctype', + 'no_copy': 1, + 'oldfieldname': u'prevdoc_doctype', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 0, + 'width': u'150px' }, # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'page_break', - 'fieldtype': 'Check', + 'doctype': u'DocField', + 'fieldname': u'page_break', + 'fieldtype': u'Check', 'hidden': 0, - 'idx': 15, - 'label': 'Page Break', + 'label': u'Page Break', 'no_copy': 1, - 'oldfieldname': 'page_break', - 'oldfieldtype': 'Check', + 'oldfieldname': u'page_break', + 'oldfieldtype': u'Check', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'item_tax_rate', - 'fieldtype': 'Small Text', - 'hidden': 1, - 'idx': 16, - 'label': 'Item Tax Rate', - 'oldfieldname': 'item_tax_rate', - 'oldfieldtype': 'Small Text', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'prevdoc_docname', - 'fieldtype': 'Data', - 'idx': 17, - 'label': 'Against Docname', - 'no_copy': 1, - 'oldfieldname': 'prevdoc_docname', - 'oldfieldtype': 'Data', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'width': '150px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'prevdoc_doctype', - 'fieldtype': 'Data', - 'hidden': 1, - 'idx': 18, - 'label': 'Against Doctype', - 'no_copy': 1, - 'oldfieldname': 'prevdoc_doctype', - 'oldfieldtype': 'Data', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'width': '150px' } ] \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index cdcec5b958..7747738935 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -45,7 +45,7 @@ cur_frm.cscript.update_item_details = function(doc, dt, dn, callback) { doc = locals[doc.doctype][doc.name]; if(!cur_frm.doc.__islocal) return; var children = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname); - if(children) { + if(children.length) { $c_obj(make_doclist(doc.doctype, doc.name), 'get_item_details', '', function(r, rt) { if(!r.exc) { @@ -58,13 +58,6 @@ cur_frm.cscript.update_item_details = function(doc, dt, dn, callback) { } -// ----------------- -// Shipping Address -// ----------------- - -cur_frm.add_fetch('company', 'default_currency', 'currency'); -cur_frm.add_fetch('company', 'default_currency', 'price_list_currency'); - // ============== Customer and its primary contact Details ============================ @@ -83,6 +76,88 @@ cur_frm.cscript.customer = function(doc, cdt, cdn) { } } + +var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) { + //parent flds + par_cols_base = {'net_total': 'Net Total', 'other_charges_total': 'Other Charges Total', + 'grand_total': 'Grand Total', 'rounded_total': 'Rounded Total', 'in_words': 'In Words'} + par_cols_export = {'grand_total_export': 'Grand Total', 'rounded_total_export': 'Rounded Total', 'in_words_export': 'In Words'}; + + for (d in par_cols_base) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_base[d]+' (' + base_curr + ')'; + for (d in par_cols_export) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_export[d]+' (' + doc.currency + ')'; + cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')'; + cur_frm.fields_dict['plc_conversion_rate'].label_area.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')'; + + if (doc.doctype == 'Receivable Voucher') { + cur_frm.fields_dict['total_advance'].label_area.innerHTML = 'Total Advance (' + base_curr + ')'; + cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')'; + } +} + + +var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) { + // item table flds + item_cols_base = {'basic_rate': 'Basic Rate', 'base_ref_rate': 'Price List Rate', 'amount': 'Amount'}; + item_cols_export = {'export_rate': 'Basic Rate', 'ref_rate': 'Price List Rate', 'export_amount': 'Amount'}; + + for (d in item_cols_base) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_base[d]+' ('+base_curr+')'); + for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')'); + + var hide = (doc.currency == sys_defaults['currency']) ? false : true; + for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide); + + //tax table flds + tax_cols = {'tax_amount': 'Amount', 'total': 'Total'}; + for (d in tax_cols) $('[data-grid-fieldname="RV Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')'); +} + +// Change label dynamically based on currency +//------------------------------------------------------------------ + +cur_frm.cscript.dynamic_label = function(doc, cdt, cdn) { + var callback = function(r, rt) { + if (r.message) base_curr = r.message; + else base_curr = sys_defaults['currency']; + + set_dynamic_label_par(doc, cdt, cdn, base_curr); + set_dynamic_label_child(doc, cdt, cdn, base_curr); + } + + if (doc.company == sys_defaults['company']) callback('', ''); + else $c_obj(make_doclist(doc.doctype, doc.name), 'get_comp_base_currency', '', callback); +} + + +// hide / unhide price list currency based on availability of price list in customer's currency +//--------------------------------------------------------------------------------------------------- + +cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) { + if (doc.price_list_name && doc.currency) { + var callback = function(r, rt) { + pl_currency = r.message[0]?r.message[0]:[]; + if (pl_currency.length==1) { + if (pl_currency[0] == doc.currency) set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate}); + else if (pl_currency[0] = r.message[1]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1}) + hide_field(['price_list_currency', 'plc_conversion_rate']); + } else unhide_field(['price_list_currency', 'plc_conversion_rate']); + + if (r.message[1] == doc.currency) { + set_multiple(cdt, cdn, {conversion_rate:1}); + hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']); + } else unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']); + + if (r.message[1] == doc.price_list_currency) { + set_multiple(cdt, cdn, {plc_conversion_rate:1}); + hide_field('plc_conversion_rate'); + } else unhide_field('plc_conversion_rate'); + + callback1() + } + $c_obj(make_doclist(doc.doctype, doc.name), 'get_price_list_currency', '', callback); + } +} + + //====================opens territory tree page ================== cur_frm.cscript.TerritoryHelp = function(doc,dt,dn){ var call_back = function(){ @@ -107,29 +182,42 @@ cur_frm.cscript.CGHelp = function(doc,dt,dn){ // ===================================================================================================== // ********************* CURRENCY ****************************** -cur_frm.cscript.currency = function(doc, cdt, cdn) { - cur_frm.cscript.price_list_name(doc, cdt, cdn); +cur_frm.cscript.currency = function(doc, cdt, cdn) { + cur_frm.cscript.price_list_name(doc, cdt, cdn); } cur_frm.cscript.price_list_currency = cur_frm.cscript.currency; cur_frm.cscript.conversion_rate = cur_frm.cscript.currency; cur_frm.cscript.plc_conversion_rate = cur_frm.cscript.currency; +cur_frm.cscript.company = function(doc, dt, dn) { + var callback = function(r, rt) { + var doc = locals[dt][dn]; + set_multiple(doc.doctype, doc.name, {currency:r.message,price_list_currency:r.message}); + cur_frm.cscript.currency(doc, cdt, cdn); + } + $c_obj(make_doclist(doc.doctype, doc.name), 'get_comp_base_currency', '', callback); +} + // ******************** PRICE LIST ****************************** cur_frm.cscript.price_list_name = function(doc, cdt, cdn) { - var fname = cur_frm.cscript.fname; - var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname); - if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate && cl.length) { - $c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '', - function(r, rt) { - refresh_field(fname); - var doc = locals[cdt][cdn]; - cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE - } - ); + var callback = function() { + var fname = cur_frm.cscript.fname; + var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname); + if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate) { + $c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '', + function(r, rt) { + refresh_field(fname); + var doc = locals[cdt][cdn]; + cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE + cur_frm.cscript.dynamic_label(doc, cdt, cdn); + } + ); + } } + cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback); } @@ -155,7 +243,8 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) { var callback = function(r, rt){ cur_frm.cscript.recalc(doc, 1); } - get_server_fields('get_item_details',d.item_code, fname,doc,cdt,cdn,1,callback); + var args = {'item_code':d.item_code, 'income_account':d.income_account, 'cost_center': d.cost_center, 'warehouse': d.warehouse}; + get_server_fields('get_item_details',JSON.stringify(args), fname,doc,cdt,cdn,1,callback); } } if(cur_frm.cscript.custom_item_code){ diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py index 2ae1ab37f1..62d8861fa7 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.py +++ b/erpnext/selling/doctype/sales_common/sales_common.py @@ -108,13 +108,13 @@ class DocType(TransactionBase): # Get Item Details # =============================================================== - def get_item_details(self, item_code, obj): + def get_item_details(self, args, obj): import json if not obj.doc.price_list_name: msgprint("Please Select Price List before selecting Items") raise Exception - item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (item_code), as_dict=1) - tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item_code) + item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (args['item_code']), as_dict=1) + tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , args['item_code']) t = {} for x in tax: t[x[0]] = flt(x[1]) ret = { @@ -124,9 +124,9 @@ class DocType(TransactionBase): 'brand' : item and item[0]['brand'] or '', 'stock_uom' : item and item[0]['stock_uom'] or '', 'reserved_warehouse' : item and item[0]['default_warehouse'] or '', - 'warehouse' : item and item[0]['default_warehouse'] or '', - 'income_account' : item and item[0]['default_income_account'] or '', - 'cost_center' : item and item[0]['default_sales_cost_center'] or '', + 'warehouse' : item and item[0]['default_warehouse'] or args.get('warehouse'), + 'income_account' : item and item[0]['default_income_account'] or args.get('income_account'), + 'cost_center' : item and item[0]['default_sales_cost_center'] or args.get('cost_center'), 'qty' : 1.00, # this is done coz if item once fetched is fetched again thn its qty shld be reset to 1 'adj_rate' : 0, 'amount' : 0, @@ -135,7 +135,7 @@ class DocType(TransactionBase): 'batch_no' : '' } if(obj.doc.price_list_name and item): #this is done to fetch the changed BASIC RATE and REF RATE based on PRICE LIST - base_ref_rate = self.get_ref_rate(item_code, obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate) + base_ref_rate = self.get_ref_rate(args['item_code'], obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate) ret['ref_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate) ret['export_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate) ret['base_ref_rate'] = flt(base_ref_rate) @@ -158,8 +158,22 @@ class DocType(TransactionBase): d.basic_rate = flt(base_ref_rate) d.base_ref_rate = flt(base_ref_rate) d.export_rate = flt(base_ref_rate)/flt(obj.doc.conversion_rate) + d.amount = flt(d.qty)*flt(base_ref_rate) + d.export_amount = flt(d.qty)*flt(base_ref_rate)/flt(obj.doc.conversion_rate) + def get_comp_base_currency(self, comp): + """ get default currency of company""" + return webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", comp)[0][0] + + def get_price_list_currency(self, price_list, comp): + """ Get all currency in which price list is maintained""" + plc = webnotes.conn.sql("select distinct ref_currency from `tabRef Rate Detail` where price_list_name = %s", price_list) + plc = [d[0] for d in plc] + base_currency = self.get_comp_base_currency(comp) + return plc, base_currency + + # Load Default Taxes # ==================== def load_default_taxes(self, obj): diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index f5f8b58b15..b559755b32 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -22,21 +22,26 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { if(doc.__islocal){ hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']); } - } cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) { if(doc.__islocal) { // defined in sales_common.js - cur_frm.cscript.update_item_details(doc, cdt, cdn, callback); + cur_frm.cscript.update_item_details(doc, cdt, cdn); } } + // Refresh //================== cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons(); - + var callback = function() { + cur_frm.cscript.dynamic_label(doc, cdt, cdn); + } + cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback); + + if(doc.docstatus==1) { if(doc.status != 'Stopped') { cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); @@ -82,7 +87,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) { } if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback); - if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']); + if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']); } cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { @@ -135,13 +140,6 @@ cur_frm.cscript.new_contact = function(){ // DOCTYPE TRIGGERS // ================================================================================================ -/* -// ***************** get shipping address based on customer selected ***************** -cur_frm.fields_dict['ship_det_no'].get_query = function(doc, cdt, cdn) { - return 'SELECT `tabShipping Address`.`name`, `tabShipping Address`.`ship_to`, `tabShipping Address`.`shipping_address` FROM `tabShipping Address` WHERE `tabShipping Address`.customer = "'+ doc.customer+'" AND `tabShipping Address`.`docstatus` != 2 AND `tabShipping Address`.`name` LIKE "%s" ORDER BY `tabShipping Address`.name ASC LIMIT 50'; -} -*/ - // ***************** Get project name ***************** cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 7bd5cba0c6..7de32dde6e 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -85,9 +85,10 @@ class DocType(TransactionBase): # ================================================================================ # Get Item Details # ---------------- - def get_item_details(self, item_code=None): - if item_code: - return get_obj('Sales Common').get_item_details(item_code, self) + def get_item_details(self, args=None): + args = eval(args) + if args['item_code']: + return get_obj('Sales Common').get_item_details(args, self) else: obj = get_obj('Sales Common') for doc in self.doclist: @@ -103,6 +104,15 @@ class DocType(TransactionBase): def get_adj_percent(self, arg=''): get_obj('Sales Common').get_adj_percent(self) + def get_comp_base_currency(self): + return get_obj('Sales Common').get_comp_base_currency(self.doc.company) + + def get_price_list_currency(self): + return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company) + + + + # Get projected qty of item based on warehouse selected # ----------------------------------------------------- def get_available_qty(self,args): diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt index 0ff3ee049f..cd6b7bdeb3 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.txt +++ b/erpnext/selling/doctype/sales_order/sales_order.txt @@ -5,72 +5,72 @@ { 'creation': '2010-08-08 17:09:21', 'docstatus': 0, - 'modified': '2012-01-09 16:52:34', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 16:51:54', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'Sales Order', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'Sales Order', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # These values are common for all DocType { - '_last_update': '1325570646', + '_last_update': u'1330082356', 'allow_attach': 0, - 'colour': 'White:FFF', - 'default_print_format': 'Standard', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', - 'document_type': 'Transaction', + 'document_type': u'Transaction', 'is_transaction_doc': 1, 'issingle': 0, - 'module': 'Selling', + 'module': u'Selling', 'name': '__common__', 'read_only_onload': 1, - 'search_fields': 'status,transaction_date,customer,customer_name, territory,order_type,company', - 'section_style': 'Tabbed', - 'server_code_error': ' ', + 'search_fields': u'status,transaction_date,customer,customer_name, territory,order_type,company', + 'section_style': u'Tabbed', + 'server_code_error': u' ', 'show_in_menu': 0, - 'subject': 'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed', - 'tag_fields': 'delivery_status,billing_status', - 'version': 610 + 'subject': u'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed', + 'tag_fields': u'delivery_status,billing_status', + 'version': 628 }, # These values are common for all DocFormat { - 'doctype': 'DocFormat', + 'doctype': u'DocFormat', 'name': '__common__', - 'parent': 'Sales Order', - 'parentfield': 'formats', - 'parenttype': 'DocType' + 'parent': u'Sales Order', + 'parentfield': u'formats', + 'parenttype': u'DocType' }, # These values are common for all DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'name': '__common__', - 'parent': 'Sales Order', - 'parentfield': 'permissions', - 'parenttype': 'DocType', + 'parent': u'Sales Order', + 'parentfield': u'permissions', + 'parenttype': u'DocType', 'read': 1 }, # DocType, Sales Order { 'doctype': 'DocType', - 'name': 'Sales Order' + 'name': u'Sales Order' }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Production Manager' + 'role': u'Production Manager' }, # DocPerm @@ -78,9 +78,9 @@ 'amend': 0, 'cancel': 0, 'create': 0, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'role': 'Sales Manager', + 'role': u'Sales Manager', 'submit': 0, 'write': 0 }, @@ -90,9 +90,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Sales Manager', + 'role': u'Sales Manager', 'submit': 1, 'write': 1 }, @@ -102,9 +102,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Sales User', + 'role': u'Sales User', 'submit': 1, 'write': 1 }, @@ -114,26 +114,26 @@ 'amend': 0, 'cancel': 0, 'create': 0, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'role': 'Sales User', + 'role': u'Sales User', 'submit': 0, 'write': 0 }, # DocPerm { - 'doctype': 'DocPerm', - 'match': 'customer_name', + 'doctype': u'DocPerm', + 'match': u'customer_name', 'permlevel': 0, - 'role': 'Customer' + 'role': u'Customer' }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 2, - 'role': 'Accounts User', + 'role': u'Accounts User', 'write': 1 }, @@ -142,18 +142,18 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Maintenance Manager', + 'role': u'Maintenance Manager', 'submit': 1, 'write': 1 }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'role': 'Maintenance Manager' + 'role': u'Maintenance Manager' }, # DocPerm @@ -161,72 +161,72 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Maintenance User', + 'role': u'Maintenance User', 'submit': 1, 'write': 1 }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'role': 'Maintenance User' + 'role': u'Maintenance User' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Sales Order Classic' + 'doctype': u'DocFormat', + 'format': u'Sales Order Classic' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Sales Order Modern' + 'doctype': u'DocFormat', + 'format': u'Sales Order Modern' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Sales Order Spartan' + 'doctype': u'DocFormat', + 'format': u'Sales Order Spartan' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Basic Info', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Basic Info', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'in_filter': 0, - 'oldfieldtype': 'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, 'search_index': 0, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'description': 'To manage multiple series please go to Setup > Manage Series', - 'doctype': 'DocField', - 'fieldname': 'naming_series', - 'fieldtype': 'Select', - 'label': 'Series', + 'colour': u'White:FFF', + 'description': u'To manage multiple series please go to Setup > Manage Series', + 'doctype': u'DocField', + 'fieldname': u'naming_series', + 'fieldtype': u'Select', + 'label': u'Series', 'no_copy': 1, - 'oldfieldname': 'naming_series', - 'oldfieldtype': 'Select', - 'options': 'PI/2011/\nSO\nSO/10-11/\nSO1112', + 'oldfieldname': u'naming_series', + 'oldfieldtype': u'Select', + 'options': u'PI/2011/\nSO\nSO/10-11/\nSO1112', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -234,379 +234,250 @@ # DocField { - 'colour': 'White:FFF', - 'description': 'Select Customer', - 'doctype': 'DocField', - 'fieldname': 'customer', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'description': u'Select Customer', + 'doctype': u'DocField', + 'fieldname': u'customer', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Customer', - 'oldfieldname': 'customer', - 'oldfieldtype': 'Link', - 'options': 'Customer', + 'label': u'Customer', + 'oldfieldname': u'customer', + 'oldfieldtype': u'Link', + 'options': u'Customer', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer_address', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'customer_address', + 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 1, - 'label': 'Customer Address', - 'options': 'Address', + 'label': u'Customer Address', + 'options': u'Address', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'contact_person', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'contact_person', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Contact Person', - 'options': 'Contact', + 'label': u'Contact Person', + 'options': u'Contact', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer_name', - 'fieldtype': 'Data', - 'label': 'Name', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'address_display', - 'fieldtype': 'Small Text', - 'label': 'Address', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'contact_display', - 'fieldtype': 'Small Text', - 'label': 'Contact', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'contact_mobile', - 'fieldtype': 'Text', - 'label': 'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'contact_email', - 'fieldtype': 'Text', - 'label': 'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'territory', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'description': u'Track this Sales Order against any Project', + 'doctype': u'DocField', + 'fieldname': u'project_name', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Territory', - 'options': 'Territory', + 'label': u'Project Name', + 'oldfieldname': u'project_name', + 'oldfieldtype': u'Link', + 'options': u'Project', 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 + 'search_index': 1, + 'trigger': u'Client' }, # DocField { - 'description': 'Category of customer as entered in Customer master', - 'doctype': 'DocField', - 'fieldname': 'customer_group', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'default': u'Today', + 'description': u'The date at which current entry is made in system.', + 'doctype': u'DocField', + 'fieldname': u'transaction_date', + 'fieldtype': u'Date', 'in_filter': 1, - 'label': 'Customer Group', - 'options': 'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Purchase Order sent by customer', - 'doctype': 'DocField', - 'fieldname': 'po_no', - 'fieldtype': 'Data', - 'hidden': 0, - 'label': 'P.O. No', - 'oldfieldname': 'po_no', - 'oldfieldtype': 'Data', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 0, - 'width': '100px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'po_date', - 'fieldtype': 'Date', - 'hidden': 0, - 'label': 'P.O. Date', - 'oldfieldname': 'po_date', - 'oldfieldtype': 'Date', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 0, - 'width': '100px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', - 'permlevel': 0, - 'width': '50%' - }, - - # DocField - { - 'default': 'Today', - 'description': 'The date at which current entry is made in system.', - 'doctype': 'DocField', - 'fieldname': 'transaction_date', - 'fieldtype': 'Date', - 'in_filter': 1, - 'label': 'Sales Order Date', + 'label': u'Sales Order Date', 'no_copy': 1, - 'oldfieldname': 'transaction_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'transaction_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 0, 'reqd': 1, 'search_index': 1, - 'width': '160px' + 'width': u'160px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'order_type', - 'fieldtype': 'Select', - 'label': 'Order Type', - 'oldfieldname': 'order_type', - 'oldfieldtype': 'Select', - 'options': '\nSales\nMaintenance', + 'colour': u'White:FFF', + 'default': u'Sales', + 'doctype': u'DocField', + 'fieldname': u'order_type', + 'fieldtype': u'Select', + 'label': u'Order Type', + 'oldfieldname': u'order_type', + 'oldfieldtype': u'Select', + 'options': u'\nSales\nMaintenance', 'permlevel': 0, 'reqd': 1 }, # DocField { - 'default': 'Draft', - 'doctype': 'DocField', - 'fieldname': 'status', - 'fieldtype': 'Select', + 'default': u'Draft', + 'doctype': u'DocField', + 'fieldname': u'status', + 'fieldtype': u'Select', 'in_filter': 1, - 'label': 'Status', + 'label': u'Status', 'no_copy': 1, - 'oldfieldname': 'status', - 'oldfieldtype': 'Select', - 'options': '\nDraft\nSubmitted\nStopped\nCancelled', + 'oldfieldname': u'status', + 'oldfieldtype': u'Select', + 'options': u'\nDraft\nSubmitted\nStopped\nCancelled', 'permlevel': 1, 'print_hide': 1, 'reqd': 1, 'search_index': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'delivery_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'depends_on': u"eval:doc.order_type == 'Sales'", + 'doctype': u'DocField', + 'fieldname': u'delivery_date', + 'fieldtype': u'Date', 'hidden': 0, 'in_filter': 1, - 'label': 'Expected Delivery Date', - 'oldfieldname': 'delivery_date', - 'oldfieldtype': 'Date', + 'label': u'Expected Delivery Date', + 'oldfieldname': u'delivery_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, 'search_index': 1, - 'width': '160px' + 'width': u'160px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Track this Sales Order against any Project', - 'doctype': 'DocField', - 'fieldname': 'project_name', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials delivered against this Sales Order', + 'doctype': u'DocField', + 'fieldname': u'per_delivered', + 'fieldtype': u'Currency', 'in_filter': 1, - 'label': 'Project Name', - 'oldfieldname': 'project_name', - 'oldfieldtype': 'Link', - 'options': 'Project', - 'permlevel': 0, - 'search_index': 1, - 'trigger': 'Client' - }, - - # DocField - { - 'colour': 'White:FFF', - 'depends_on': 'eval:!doc.__islocal', - 'description': '% of materials delivered against this Sales Order', - 'doctype': 'DocField', - 'fieldname': 'per_delivered', - 'fieldtype': 'Currency', - 'in_filter': 1, - 'label': '% Delivered', + 'label': u'% Delivered', 'no_copy': 1, - 'oldfieldname': 'per_delivered', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'per_delivered', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'depends_on': 'eval:!doc.__islocal', - 'description': '% of materials billed against this Sales Order', - 'doctype': 'DocField', - 'fieldname': 'per_billed', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials billed against this Sales Order', + 'doctype': u'DocField', + 'fieldname': u'per_billed', + 'fieldtype': u'Currency', 'in_filter': 1, - 'label': '% Amount Billed', + 'label': u'% Amount Billed', 'no_copy': 1, - 'oldfieldname': 'per_billed', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'per_billed', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'amended_from', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'amended_from', + 'fieldtype': u'Data', 'hidden': 1, - 'label': 'Amended From', + 'label': u'Amended From', 'no_copy': 1, - 'oldfieldname': 'amended_from', - 'oldfieldtype': 'Data', + 'oldfieldname': u'amended_from', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'The date at which current entry is corrected in the system.', - 'doctype': 'DocField', - 'fieldname': 'amendment_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'description': u'The date at which current entry is corrected in the system.', + 'doctype': u'DocField', + 'fieldname': u'amendment_date', + 'fieldtype': u'Date', 'hidden': 1, - 'label': 'Amendment Date', + 'label': u'Amendment Date', 'no_copy': 1, - 'oldfieldname': 'amendment_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'amendment_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'shipping_address_name', - 'fieldtype': 'Data', - 'hidden': 1, - 'in_filter': 1, - 'label': 'Shipping Address Name', - 'options': 'Address', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'shipping_address', - 'fieldtype': 'Small Text', - 'in_filter': 0, - 'label': 'Shipping Address', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Items', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Items', + 'oldfieldtype': u'Section Break', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'description': 'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', - 'doctype': 'DocField', - 'fieldname': 'price_list_name', - 'fieldtype': 'Select', - 'label': 'Price List', - 'oldfieldname': 'price_list_name', - 'oldfieldtype': 'Select', - 'options': 'link:Price List', + 'colour': u'White:FFF', + 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', + 'doctype': u'DocField', + 'fieldname': u'price_list_name', + 'fieldtype': u'Select', + 'label': u'Price List', + 'oldfieldname': u'price_list_name', + 'oldfieldtype': u'Select', + 'options': u'link:Price List', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'description': 'Select the currency in which price list is maintained', - 'doctype': 'DocField', - 'fieldname': 'price_list_currency', - 'fieldtype': 'Select', - 'label': 'Price List Currency', - 'options': 'link:Currency', + 'description': u'Select the currency in which price list is maintained', + 'doctype': u'DocField', + 'fieldname': u'price_list_currency', + 'fieldtype': u'Select', + 'label': u'Price List Currency', + 'options': u'link:Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -614,12 +485,12 @@ # DocField { - 'colour': 'White:FFF', - 'description': 'Rate at which Price list currency is converted to your currency', - 'doctype': 'DocField', - 'fieldname': 'plc_conversion_rate', - 'fieldtype': 'Currency', - 'label': 'Price List Currency Conversion Rate', + 'colour': u'White:FFF', + 'description': u"Rate at which Price list currency is converted to company's base currency", + 'doctype': u'DocField', + 'fieldname': u'plc_conversion_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Currency Conversion Rate', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -627,383 +498,360 @@ # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'description': "Customer's currency", - 'doctype': 'DocField', - 'fieldname': 'currency', - 'fieldtype': 'Select', - 'label': "Customer's Currency", - 'oldfieldname': 'currency', - 'oldfieldtype': 'Select', - 'options': 'link:Currency', + 'colour': u'White:FFF', + 'description': u"Customer's currency", + 'doctype': u'DocField', + 'fieldname': u'currency', + 'fieldtype': u'Select', + 'label': u'Currency', + 'oldfieldname': u'currency', + 'oldfieldtype': u'Select', + 'options': u'link:Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'default': '1.00', - 'description': "Rate at which customer's currency is converted to your currency", - 'doctype': 'DocField', - 'fieldname': 'conversion_rate', - 'fieldtype': 'Currency', - 'label': 'Conversion Rate', - 'oldfieldname': 'conversion_rate', - 'oldfieldtype': 'Currency', + 'colour': u'White:FFF', + 'default': u'1.00', + 'description': u"Rate at which customer's currency is converted to company's base currency", + 'doctype': u'DocField', + 'fieldname': u'conversion_rate', + 'fieldtype': u'Currency', + 'label': u'Conversion Rate', + 'oldfieldname': u'conversion_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Quotation no against which this Sales Order is made ', - 'doctype': 'DocField', - 'fieldname': 'quotation_no', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'description': u'Quotation no against which this Sales Order is made ', + 'doctype': u'DocField', + 'fieldname': u'quotation_no', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Quotation No', + 'label': u'Quotation No', 'no_copy': 0, - 'oldfieldname': 'quotation_no', - 'oldfieldtype': 'Link', - 'options': 'Quotation', + 'oldfieldname': u'quotation_no', + 'oldfieldtype': u'Link', + 'options': u'Quotation', 'permlevel': 0, 'print_hide': 1, 'search_index': 1, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'quotation_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.quotation_no', + 'doctype': u'DocField', + 'fieldname': u'quotation_date', + 'fieldtype': u'Date', 'hidden': 1, - 'label': 'Quotation Date', + 'label': u'Quotation Date', 'no_copy': 0, - 'oldfieldname': 'quotation_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'quotation_date', + 'oldfieldtype': u'Date', 'permlevel': 1, 'print_hide': 1, 'reqd': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Pull Quotation Details', - 'oldfieldtype': 'Button', - 'options': 'pull_quotation_details', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Pull Quotation Details', + 'oldfieldtype': u'Button', + 'options': u'pull_quotation_details', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', 'permlevel': 0 }, # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'sales_order_details', - 'fieldtype': 'Table', - 'label': 'Sales Order Details', - 'oldfieldname': 'sales_order_details', - 'oldfieldtype': 'Table', - 'options': 'Sales Order Detail', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'sales_order_details', + 'fieldtype': u'Table', + 'label': u'Sales Order Details', + 'oldfieldname': u'sales_order_details', + 'oldfieldtype': u'Table', + 'options': u'Sales Order Detail', 'permlevel': 0, 'print_hide': 0, - 'width': '40px' + 'width': u'40px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Clear Table', - 'oldfieldtype': 'Button', - 'options': 'clear_sales_order_details', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Clear Table', + 'oldfieldtype': u'Button', + 'options': u'clear_sales_order_details', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Re-Calculate Values', - 'oldfieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Re-Calculate Values', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 1, 'search_index': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'net_total', - 'fieldtype': 'Currency', - 'label': 'Net Total*', - 'oldfieldname': 'net_total', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'net_total', + 'fieldtype': u'Currency', + 'label': u'Net Total*', + 'oldfieldname': u'net_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Note1', - 'oldfieldtype': 'HTML', - 'options': 'NOTE : * In Base Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Taxes', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Taxes', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'charge', - 'fieldtype': 'Link', - 'label': 'Select Charges Master', - 'oldfieldname': 'charge', - 'oldfieldtype': 'Link', - 'options': 'Other Charges', + 'doctype': u'DocField', + 'fieldname': u'charge', + 'fieldtype': u'Link', + 'label': u'Select Charges Master', + 'oldfieldname': u'charge', + 'oldfieldtype': u'Link', + 'options': u'Other Charges', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Get Charges', - 'oldfieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Get Charges', + 'oldfieldtype': u'Button', 'permlevel': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'other_charges', - 'fieldtype': 'Table', - 'label': 'Other Charges', - 'oldfieldname': 'other_charges', - 'oldfieldtype': 'Table', - 'options': 'RV Tax Detail', + 'doctype': u'DocField', + 'fieldname': u'other_charges', + 'fieldtype': u'Table', + 'label': u'Other Charges', + 'oldfieldname': u'other_charges', + 'oldfieldtype': u'Table', + 'options': u'RV Tax Detail', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Calculate Charges', - 'oldfieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Calculate Charges', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'other_charges_total', - 'fieldtype': 'Currency', - 'label': 'Charges Total*', - 'oldfieldname': 'other_charges_total', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'other_charges_total', + 'fieldtype': u'Currency', + 'label': u'Charges Total*', + 'oldfieldname': u'other_charges_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'grand_total', - 'fieldtype': 'Currency', - 'label': 'Grand Total*', - 'oldfieldname': 'grand_total', - 'oldfieldtype': 'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0, - 'width': '150px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'OT Notes', - 'oldfieldtype': 'HTML', - 'options': 'NOTE : * In Base Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Other Charges Calculation', - 'oldfieldtype': 'HTML', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Other Charges Calculation', + 'oldfieldtype': u'HTML', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Totals', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Totals', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'rounded_total', - 'fieldtype': 'Currency', - 'label': 'Rounded Total', - 'oldfieldname': 'rounded_total', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'grand_total', + 'fieldtype': u'Currency', + 'label': u'Grand Total*', + 'oldfieldname': u'grand_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'reqd': 0, + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'In Words will be visible once you save the Sales Order.', - 'doctype': 'DocField', - 'fieldname': 'in_words', - 'fieldtype': 'Data', - 'label': 'In Words', - 'oldfieldname': 'in_words', - 'oldfieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'rounded_total', + 'fieldtype': u'Currency', + 'label': u'Rounded Total', + 'oldfieldname': u'rounded_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '200px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'colour': u'White:FFF', + 'description': u'In Words will be visible once you save the Sales Order.', + 'doctype': u'DocField', + 'fieldname': u'in_words', + 'fieldtype': u'Data', + 'label': u'In Words', + 'oldfieldname': u'in_words', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'width': u'200px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, 'print_hide': 1, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'grand_total_export', - 'fieldtype': 'Currency', - 'label': 'Grand Total (Export)', - 'oldfieldname': 'grand_total_export', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'grand_total_export', + 'fieldtype': u'Currency', + 'label': u'Grand Total (Export)', + 'oldfieldname': u'grand_total_export', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'rounded_total_export', - 'fieldtype': 'Currency', - 'label': 'Rounded Total (Export)', - 'oldfieldname': 'rounded_total_export', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'rounded_total_export', + 'fieldtype': u'Currency', + 'label': u'Rounded Total (Export)', + 'oldfieldname': u'rounded_total_export', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'In Words (Export) will be visible once you save the Sales Order.', - 'doctype': 'DocField', - 'fieldname': 'in_words_export', - 'fieldtype': 'Data', - 'label': 'In Words (Export)', - 'oldfieldname': 'in_words_export', - 'oldfieldtype': 'Data', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'in_words_export', + 'fieldtype': u'Data', + 'label': u'In Words (Export)', + 'oldfieldname': u'in_words_export', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Terms', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Terms', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'tc_name', - 'fieldtype': 'Link', - 'label': 'Select Terms', - 'oldfieldname': 'tc_name', - 'oldfieldtype': 'Link', - 'options': 'Term', + 'doctype': u'DocField', + 'fieldname': u'tc_name', + 'fieldtype': u'Link', + 'label': u'Select Terms', + 'oldfieldname': u'tc_name', + 'oldfieldtype': u'Link', + 'options': u'Term', 'permlevel': 0, 'print_hide': 1, 'search_index': 0 @@ -1011,123 +859,86 @@ # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Get Terms', - 'oldfieldtype': 'Button', - 'options': 'get_tc_details', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Get Terms', + 'oldfieldtype': u'Button', + 'options': u'get_tc_details', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Terms HTML', - 'oldfieldtype': 'HTML', - 'options': 'You can add Terms and Notes that will be printed in the Transaction', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Terms HTML', + 'oldfieldtype': u'HTML', + 'options': u'You can add Terms and Notes that will be printed in the Transaction', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'terms', - 'fieldtype': 'Text Editor', - 'label': 'Term Details', - 'oldfieldname': 'terms', - 'oldfieldtype': 'Text Editor', + 'doctype': u'DocField', + 'fieldname': u'terms', + 'fieldtype': u'Text Editor', + 'label': u'Term Details', + 'oldfieldname': u'terms', + 'oldfieldtype': u'Text Editor', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'colour': 'White:FFF', - 'description': 'Filling in additional information about the Sales Order will help you analyze your data better.', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'More Info', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'description': u'Filling in additional information about the Sales Order will help you analyze your data better.', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'More Info', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, 'print_hide': 1, - 'width': '50%' + 'width': u'50%' }, # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'letter_head', - 'fieldtype': 'Select', - 'label': 'Letter Head', - 'oldfieldname': 'letter_head', - 'oldfieldtype': 'Select', - 'options': 'link:Letter Head', + 'doctype': u'DocField', + 'fieldname': u'letter_head', + 'fieldtype': u'Select', + 'label': u'Letter Head', + 'oldfieldname': u'letter_head', + 'oldfieldtype': u'Select', + 'options': u'link:Letter Head', 'permlevel': 0, 'print_hide': 1 }, - # DocField - { - 'colour': 'White:FFF', - 'description': 'Select the relevant company name if you have multiple companies.', - 'doctype': 'DocField', - 'fieldname': 'company', - 'fieldtype': 'Link', - 'in_filter': 1, - 'label': 'Company', - 'oldfieldname': 'company', - 'oldfieldtype': 'Link', - 'options': 'Company', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': 'Client', - 'width': '150px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'fiscal_year', - 'fieldtype': 'Select', - 'in_filter': 1, - 'label': 'Fiscal Year', - 'oldfieldname': 'fiscal_year', - 'oldfieldtype': 'Select', - 'options': 'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': '150px' - }, - # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'select_print_heading', - 'fieldtype': 'Link', - 'label': 'Select Print Heading', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'select_print_heading', + 'fieldtype': u'Link', + 'label': u'Select Print Heading', 'no_copy': 1, - 'oldfieldname': 'select_print_heading', - 'oldfieldtype': 'Link', - 'options': 'Print Heading', + 'oldfieldname': u'select_print_heading', + 'oldfieldtype': u'Link', + 'options': u'Print Heading', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -1135,192 +946,400 @@ # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'colour': u'White:FFF', + 'depends_on': u"eval:doc.source == 'Campaign'", + 'doctype': u'DocField', + 'fieldname': u'campaign', + 'fieldtype': u'Link', + 'label': u'Campaign', + 'oldfieldname': u'campaign', + 'oldfieldtype': u'Link', + 'options': u'Campaign', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Purchase Order sent by customer', + 'doctype': u'DocField', + 'fieldname': u'po_no', + 'fieldtype': u'Data', + 'hidden': 0, + 'label': u'P.O. No', + 'oldfieldname': u'po_no', + 'oldfieldtype': u'Data', + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0, + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.po_no', + 'doctype': u'DocField', + 'fieldname': u'po_date', + 'fieldtype': u'Date', + 'hidden': 0, + 'label': u'P.O. Date', + 'oldfieldname': u'po_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 0, + 'width': u'100px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, 'print_hide': 1, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'source', - 'fieldtype': 'Select', - 'label': 'Source', - 'oldfieldname': 'source', - 'oldfieldtype': 'Select', - 'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'source', + 'fieldtype': u'Select', + 'label': u'Source', + 'oldfieldname': u'source', + 'oldfieldtype': u'Select', + 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'depends_on': "eval:doc.source == 'Campaign'", - 'doctype': 'DocField', - 'fieldname': 'campaign', - 'fieldtype': 'Link', - 'label': 'Campaign', - 'oldfieldname': 'campaign', - 'oldfieldtype': 'Link', - 'options': 'Campaign', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'note', - 'fieldtype': 'Text', - 'label': 'Note', - 'oldfieldname': 'note', - 'oldfieldtype': 'Text', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'depends_on': 'eval:!doc.__islocal', - 'doctype': 'DocField', - 'fieldname': 'cancel_reason', - 'fieldtype': 'Data', - 'label': 'Cancel Reason', - 'no_column': 0, - 'no_copy': 1, - 'oldfieldname': 'cancel_reason', - 'oldfieldtype': 'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'delivery_status', - 'fieldtype': 'Select', - 'hidden': 1, - 'label': 'Delivery Status', - 'no_column': 0, - 'no_copy': 1, - 'options': 'Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'billing_status', - 'fieldtype': 'Select', - 'hidden': 1, - 'label': 'Billing Status', - 'no_column': 0, - 'no_copy': 1, - 'options': 'Billed\nNot Billed\nPartly Billed\nClosed', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Display all the individual items delivered with the main items', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'hidden': 0, - 'label': 'Packing List', - 'oldfieldtype': 'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'packing_details', - 'fieldtype': 'Table', - 'label': 'Packing Details', - 'oldfieldname': 'packing_details', - 'oldfieldtype': 'Table', - 'options': 'Delivery Note Packing Detail', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Sales Team', - 'oldfieldtype': 'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Name as entered in Sales Partner master', - 'doctype': 'DocField', - 'fieldname': 'sales_partner', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'description': u'Select the relevant company name if you have multiple companies.', + 'doctype': u'DocField', + 'fieldname': u'company', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Sales Partner', - 'oldfieldname': 'sales_partner', - 'oldfieldtype': 'Link', - 'options': 'Sales Partner', + 'label': u'Company', + 'oldfieldname': u'company', + 'oldfieldtype': u'Link', + 'options': u'Company', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1, + 'trigger': u'Client', + 'width': u'150px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'fiscal_year', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Fiscal Year', + 'oldfieldname': u'fiscal_year', + 'oldfieldtype': u'Select', + 'options': u'link:Fiscal Year', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1, + 'width': u'150px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'delivery_status', + 'fieldtype': u'Select', + 'hidden': 1, + 'label': u'Delivery Status', + 'no_column': 0, + 'no_copy': 1, + 'options': u'Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'billing_status', + 'fieldtype': u'Select', + 'hidden': 1, + 'label': u'Billing Status', + 'no_column': 0, + 'no_copy': 1, + 'options': u'Billed\nNot Billed\nPartly Billed\nClosed', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', + 'label': u'Cancel Reason', + 'no_column': 0, + 'no_copy': 1, + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.customer', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Customer Details', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'customer_name', + 'fieldtype': u'Data', + 'label': u'Name', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'address_display', + 'fieldtype': u'Small Text', + 'label': u'Address', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'territory', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Territory', + 'options': u'Territory', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Category of customer as entered in Customer master', + 'doctype': u'DocField', + 'fieldname': u'customer_group', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Customer Group', + 'options': u'Customer Group', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_display', + 'fieldtype': u'Small Text', + 'label': u'Contact', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_mobile', + 'fieldtype': u'Text', + 'label': u'Mobile No', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_email', + 'fieldtype': u'Text', + 'label': u'Contact Email', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'shipping_address', + 'fieldtype': u'Small Text', + 'in_filter': 0, + 'label': u'Shipping Address', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'shipping_address_name', + 'fieldtype': u'Data', + 'hidden': 1, + 'in_filter': 1, + 'label': u'Shipping Address Name', + 'options': u'Address', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Display all the individual items delivered with the main items', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'hidden': 0, + 'label': u'Packing List', + 'oldfieldtype': u'Section Break', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'packing_details', + 'fieldtype': u'Table', + 'label': u'Packing Details', + 'oldfieldname': u'packing_details', + 'oldfieldtype': u'Table', + 'options': u'Delivery Note Packing Detail', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Sales Team', + 'oldfieldtype': u'Section Break', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Name as entered in Sales Partner master', + 'doctype': u'DocField', + 'fieldname': u'sales_partner', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Sales Partner', + 'oldfieldname': u'sales_partner', + 'oldfieldtype': u'Link', + 'options': u'Sales Partner', 'permlevel': 0, 'print_hide': 1, 'search_index': 1, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'commission_rate', - 'fieldtype': 'Currency', - 'label': 'Commission Rate', - 'oldfieldname': 'commission_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'commission_rate', + 'fieldtype': u'Currency', + 'label': u'Commission Rate', + 'oldfieldname': u'commission_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'total_commission', - 'fieldtype': 'Currency', - 'label': 'Total Commission', - 'oldfieldname': 'total_commission', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'total_commission', + 'fieldtype': u'Currency', + 'label': u'Total Commission', + 'oldfieldname': u'total_commission', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'sales_team', - 'fieldtype': 'Table', - 'label': 'Sales Team1', - 'oldfieldname': 'sales_team', - 'oldfieldtype': 'Table', - 'options': 'Sales Team', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'options': u'Simple', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'sales_team', + 'fieldtype': u'Table', + 'label': u'Sales Team1', + 'oldfieldname': u'sales_team', + 'oldfieldtype': u'Table', + 'options': u'Sales Team', 'permlevel': 0, 'print_hide': 1 }, @@ -1328,11 +1347,11 @@ # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Repair Sales Order', - 'oldfieldtype': 'Button', - 'options': 'repair_sales_order', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Repair Sales Order', + 'oldfieldtype': u'Button', + 'options': u'repair_sales_order', 'permlevel': 0, 'print_hide': 1 } diff --git a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt b/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt index 7e46d74af1..25521c4e53 100644 --- a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt +++ b/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt @@ -5,342 +5,295 @@ { 'creation': '2010-08-08 17:09:22', 'docstatus': 0, - 'modified': '2011-04-12 14:08:58', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 10:38:06', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocType { - 'autoname': 'SOD/.#####', - 'colour': 'White:FFF', + 'autoname': u'SOD/.#####', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, - 'module': 'Selling', + 'module': u'Selling', 'name': '__common__', - 'section_style': 'Tray', - 'server_code_error': ' ', + 'section_style': u'Tray', + 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 52 + 'version': 49 }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'Sales Order Detail', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'Sales Order Detail', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # DocType, Sales Order Detail { 'doctype': 'DocType', - 'name': 'Sales Order Detail' + 'name': u'Sales Order Detail' }, # DocField { - 'allow_on_submit': 0, - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'item_code', - 'fieldtype': 'Link', - 'idx': 1, + 'doctype': u'DocField', + 'fieldname': u'item_code', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Item Code', - 'oldfieldname': 'item_code', - 'oldfieldtype': 'Link', - 'options': 'Item', + 'label': u'Item Code', + 'oldfieldname': u'item_code', + 'oldfieldtype': u'Link', + 'options': u'Item', 'permlevel': 0, 'reqd': 1, 'search_index': 1, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_name', - 'fieldtype': 'Data', - 'idx': 2, - 'label': 'Item Name', - 'oldfieldname': 'item_name', - 'oldfieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'item_name', + 'fieldtype': u'Data', + 'label': u'Item Name', + 'oldfieldname': u'item_name', + 'oldfieldtype': u'Data', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'width': '150' + 'width': u'150' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'description', - 'fieldtype': 'Small Text', - 'idx': 3, + 'doctype': u'DocField', + 'fieldname': u'description', + 'fieldtype': u'Small Text', 'in_filter': 1, - 'label': 'Description', - 'oldfieldname': 'description', - 'oldfieldtype': 'Small Text', + 'label': u'Description', + 'oldfieldname': u'description', + 'oldfieldtype': u'Small Text', 'permlevel': 0, 'reqd': 1, 'search_index': 1, - 'width': '300px' + 'width': u'300px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'qty', - 'fieldtype': 'Currency', - 'idx': 4, - 'label': 'Quantity', - 'oldfieldname': 'qty', - 'oldfieldtype': 'Currency', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'qty', + 'fieldtype': u'Currency', + 'label': u'Quantity', + 'oldfieldname': u'qty', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'stock_uom', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'stock_uom', + 'fieldtype': u'Data', 'hidden': 0, - 'idx': 5, - 'label': 'UOM', - 'oldfieldname': 'stock_uom', - 'oldfieldtype': 'Data', + 'label': u'UOM', + 'oldfieldname': u'stock_uom', + 'oldfieldtype': u'Data', 'permlevel': 1, 'reqd': 0, - 'width': '70px' + 'width': u'70px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'ref_rate', - 'fieldtype': 'Currency', - 'idx': 6, - 'label': 'Ref Rate', - 'oldfieldname': 'ref_rate', - 'oldfieldtype': 'Currency', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate', + 'oldfieldname': u'ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client', - 'width': '70px' + 'trigger': u'Client', + 'width': u'70px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'adj_rate', - 'fieldtype': 'Float', - 'idx': 7, - 'label': 'Discount(%)', - 'oldfieldname': 'adj_rate', - 'oldfieldtype': 'Float', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'adj_rate', + 'fieldtype': u'Float', + 'label': u'Discount(%)', + 'oldfieldname': u'adj_rate', + 'oldfieldtype': u'Float', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client', - 'width': '70px' + 'trigger': u'Client', + 'width': u'70px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'export_rate', - 'fieldtype': 'Currency', - 'idx': 8, - 'label': 'Rate', - 'oldfieldname': 'export_rate', - 'oldfieldtype': 'Currency', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'export_rate', + 'fieldtype': u'Currency', + 'label': u'Rate', + 'oldfieldname': u'export_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 0, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'export_amount', - 'fieldtype': 'Currency', - 'idx': 9, - 'label': 'Amount', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'export_amount', + 'fieldtype': u'Currency', + 'label': u'Amount', 'no_copy': 0, - 'oldfieldname': 'export_amount', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'export_amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'reqd': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'base_ref_rate', - 'fieldtype': 'Currency', - 'idx': 10, - 'label': 'Ref Rate*', - 'oldfieldname': 'base_ref_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'base_ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate*', + 'oldfieldname': u'base_ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'basic_rate', - 'fieldtype': 'Currency', - 'idx': 11, - 'label': 'Basic Rate*', - 'oldfieldname': 'basic_rate', - 'oldfieldtype': 'Currency', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'basic_rate', + 'fieldtype': u'Currency', + 'label': u'Basic Rate*', + 'oldfieldname': u'basic_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'amount', - 'fieldtype': 'Currency', - 'idx': 12, - 'label': 'Amount*', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'amount', + 'fieldtype': u'Currency', + 'label': u'Amount*', 'no_copy': 0, - 'oldfieldname': 'amount', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'reqd': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'reserved_warehouse', - 'fieldtype': 'Link', - 'idx': 13, - 'label': 'Reserved Warehouse', + 'doctype': u'DocField', + 'fieldname': u'reserved_warehouse', + 'fieldtype': u'Link', + 'label': u'Reserved Warehouse', 'no_copy': 1, - 'oldfieldname': 'reserved_warehouse', - 'oldfieldtype': 'Link', - 'options': 'Warehouse', + 'oldfieldname': u'reserved_warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'projected_qty', - 'fieldtype': 'Currency', - 'idx': 14, - 'label': 'Projected Qty', + 'colour': u'White:FFF', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'projected_qty', + 'fieldtype': u'Currency', + 'hidden': 1, + 'label': u'Projected Qty', 'no_copy': 1, - 'oldfieldname': 'projected_qty', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'projected_qty', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '70px' + 'width': u'70px' }, # DocField { - 'colour': 'White:FFF', - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'actual_qty', - 'fieldtype': 'Currency', - 'idx': 15, - 'label': 'Actual Qty', + 'colour': u'White:FFF', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'actual_qty', + 'fieldtype': u'Currency', + 'label': u'Actual Qty', 'no_copy': 1, 'permlevel': 1, 'print_hide': 1, - 'width': '70px' + 'width': u'70px' }, # DocField { - 'colour': 'White:FFF', - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'indented_qty', - 'fieldtype': 'Currency', - 'idx': 16, - 'label': 'Indented Qty', - 'no_copy': 1, - 'permlevel': 1, - 'print_hide': 1, - 'width': '70px' - }, - - # DocField - { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'delivered_qty', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'delivered_qty', + 'fieldtype': u'Currency', 'hidden': 0, - 'idx': 17, 'in_filter': 0, - 'label': 'Delivered Qty', + 'label': u'Delivered Qty', 'no_copy': 1, - 'oldfieldname': 'delivered_qty', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'delivered_qty', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'search_index': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'billed_qty', - 'fieldtype': 'Currency', - 'idx': 18, - 'in_filter': 0, - 'label': 'Billed Qty', - 'no_copy': 1, - 'oldfieldname': 'billed_qty', - 'oldfieldtype': 'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'search_index': 0, - 'width': '100px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'billed_amt', - 'fieldtype': 'Currency', - 'idx': 19, - 'label': 'Billed Amt', + 'doctype': u'DocField', + 'fieldname': u'billed_amt', + 'fieldtype': u'Currency', + 'label': u'Billed Amt', 'no_copy': 1, 'permlevel': 1, 'print_hide': 1 @@ -348,83 +301,84 @@ # DocField { - 'description': 'For Production', - 'doctype': 'DocField', - 'fieldname': 'planned_qty', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'description': u'For Production', + 'doctype': u'DocField', + 'fieldname': u'planned_qty', + 'fieldtype': u'Currency', 'hidden': 1, - 'idx': 20, - 'label': 'Planned Quantity', + 'label': u'Planned Quantity', 'no_copy': 1, - 'oldfieldname': 'planned_qty', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'planned_qty', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'report_hide': 1, - 'width': '50px' + 'width': u'50px' }, # DocField { - 'description': 'For Production', - 'doctype': 'DocField', - 'fieldname': 'produced_qty', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'description': u'For Production', + 'doctype': u'DocField', + 'fieldname': u'produced_qty', + 'fieldtype': u'Currency', 'hidden': 1, - 'idx': 21, - 'label': 'Produced Quantity', - 'oldfieldname': 'produced_qty', - 'oldfieldtype': 'Currency', + 'label': u'Produced Quantity', + 'oldfieldname': u'produced_qty', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'report_hide': 1, - 'width': '50px' + 'width': u'50px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'brand', - 'fieldtype': 'Link', - 'idx': 22, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'brand', + 'fieldtype': u'Link', + 'hidden': 1, 'in_filter': 1, - 'label': 'Brand Name', - 'oldfieldname': 'brand', - 'oldfieldtype': 'Link', - 'options': 'Brand', + 'label': u'Brand Name', + 'oldfieldname': u'brand', + 'oldfieldtype': u'Link', + 'options': u'Brand', 'permlevel': 1, 'print_hide': 1, - 'search_index': 0 + 'search_index': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_group', - 'fieldtype': 'Link', - 'idx': 23, + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'item_group', + 'fieldtype': u'Link', + 'hidden': 1, 'in_filter': 1, - 'label': 'Item Group', - 'oldfieldname': 'item_group', - 'oldfieldtype': 'Link', - 'options': 'Item Group', + 'label': u'Item Group', + 'oldfieldname': u'item_group', + 'oldfieldtype': u'Link', + 'options': u'Item Group', 'permlevel': 1, 'print_hide': 1, - 'search_index': 0 + 'search_index': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'prevdoc_docname', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'prevdoc_docname', + 'fieldtype': u'Link', 'hidden': 0, - 'idx': 24, 'in_filter': 1, - 'label': 'Quotation No.', - 'oldfieldname': 'prevdoc_docname', - 'oldfieldtype': 'Link', - 'options': 'Quotation', + 'label': u'Quotation No.', + 'oldfieldname': u'prevdoc_docname', + 'oldfieldtype': u'Link', + 'options': u'Quotation', 'permlevel': 1, 'print_hide': 1, 'search_index': 1 @@ -433,13 +387,12 @@ # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'page_break', - 'fieldtype': 'Check', - 'idx': 25, - 'label': 'Page Break', - 'oldfieldname': 'page_break', - 'oldfieldtype': 'Check', + 'doctype': u'DocField', + 'fieldname': u'page_break', + 'fieldtype': u'Check', + 'label': u'Page Break', + 'oldfieldname': u'page_break', + 'oldfieldtype': u'Check', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -447,15 +400,15 @@ # DocField { - 'description': 'required for production. will be used later.', - 'doctype': 'DocField', - 'fieldname': 'delivery_date', - 'fieldtype': 'Date', - 'hidden': 0, - 'idx': 26, - 'label': 'Expected Delivery Date', - 'oldfieldname': 'delivery_date', - 'oldfieldtype': 'Date', + 'colour': u'White:FFF', + 'description': u'required for production. will be used later.', + 'doctype': u'DocField', + 'fieldname': u'delivery_date', + 'fieldtype': u'Date', + 'hidden': 1, + 'label': u'Expected Delivery Date', + 'oldfieldname': u'delivery_date', + 'oldfieldtype': u'Date', 'permlevel': 1, 'print_hide': 1, 'report_hide': 1 @@ -464,16 +417,16 @@ # DocField { 'allow_on_submit': 1, - 'description': 'required for production. will be used later.', - 'doctype': 'DocField', - 'fieldname': 'confirmation_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'description': u'required for production. will be used later.', + 'doctype': u'DocField', + 'fieldname': u'confirmation_date', + 'fieldtype': u'Date', 'hidden': 0, - 'idx': 27, 'in_filter': 1, - 'label': 'Confirmed Delivery Date', - 'oldfieldname': 'confirmation_date', - 'oldfieldtype': 'Date', + 'label': u'Confirmed Delivery Date', + 'oldfieldname': u'confirmation_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1, @@ -482,14 +435,14 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_tax_rate', - 'fieldtype': 'Small Text', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'item_tax_rate', + 'fieldtype': u'Small Text', 'hidden': 1, - 'idx': 28, - 'label': 'Item Tax Rate', - 'oldfieldname': 'item_tax_rate', - 'oldfieldtype': 'Small Text', + 'label': u'Item Tax Rate', + 'oldfieldname': u'item_tax_rate', + 'oldfieldtype': u'Small Text', 'permlevel': 1, 'print_hide': 1, 'report_hide': 1 @@ -497,16 +450,16 @@ # DocField { - 'description': 'The date at which current entry is made in system.', - 'doctype': 'DocField', - 'fieldname': 'transaction_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'description': u'The date at which current entry is made in system.', + 'doctype': u'DocField', + 'fieldname': u'transaction_date', + 'fieldtype': u'Date', 'hidden': 1, - 'idx': 29, 'in_filter': 0, - 'label': 'Sales Order Date', - 'oldfieldname': 'transaction_date', - 'oldfieldtype': 'Date', + 'label': u'Sales Order Date', + 'oldfieldname': u'transaction_date', + 'oldfieldtype': u'Date', 'permlevel': 1, 'print_hide': 1, 'report_hide': 1, diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js index d9f479504a..79cdc3eeb0 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note.js @@ -22,24 +22,23 @@ cur_frm.cscript.onload = function(doc, dt, dn) { if(doc.__islocal){ hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); - } - - + } } cur_frm.cscript.onload_post_render = function(doc, dt, dn) { // defined in sales_common.js - //cur_frm.cscript.update_item_details(doc, cdt, cdn); - - // load default charges - if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length) - cur_frm.cscript.load_taxes(doc, cdt, cdn); + if(doc.__islocal) cur_frm.cscript.update_item_details(doc, dt, dn); } // REFRESH // ================================================================================================ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons(); + var callback = function() { + cur_frm.cscript.dynamic_label(doc, cdt, cdn); + } + cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback); + if(doc.per_billed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']); @@ -144,61 +143,6 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { return repl('SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond}); } -/* -//---- get customer details ---------------------------- -cur_frm.cscript.project_name = function(doc,cdt,cdn){ - $c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){ - refresh_many(['customer','customer_name', 'customer_address', 'contact_person', 'territory', 'contact_no', 'email_id', 'customer_group']); - }); -} -*/ - - - -// UTILITY FUNCTIONS -// ================================================================================================ -/* -var cfn_set_fields = function(doc, cdt, cdn) { - var supplier_field_list = ['Supplier','supplier','supplier_address']; - var customer_field_list = ['Customer','customer','customer_name','customer_address','territory','customer_group','Business Associate','sales_partner','commission_rate','total_commission','sales_order_no','Get Items']; - if (doc.delivery_type == 'Rejected' && doc.purchase_receipt_no) { - unhide_field('purchase_receipt_no'); - unhide_field(supplier_field_list); - hide_field(customer_field_list); - get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 1; - } - else if (doc.delivery_type == 'Subcontract' && doc.purchase_order_no) { - unhide_field('purchase_order_no'); - unhide_field(supplier_field_list); - hide_field(cutomer_field_list); - get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 1; - } - else if (doc.delivery_type == 'Sample') unhide_field('to_warehouse'); - else get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 0; - - -} - -*/ - -// DOCTYPE TRIGGERS -// ================================================================================================ - -/* -// ***************** Get Contact Person based on customer selected ***************** -cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { - return 'SELECT `tabContact`.contact_name FROM `tabContact` WHERE ((`tabContact`.is_customer = 1 AND `tabContact`.customer = "'+ doc.customer+'") or (`tabContact`.is_sales_partner = 1 AND `tabContact`.sales_partner = "'+ doc.sales_partner+'")) AND `tabContact`.docstatus != 2 AND `tabContact`.contact_name LIKE "%s" ORDER BY `tabContact`.contact_name ASC LIMIT 50'; -} -*/ - -/* -// ***************** get shipping address based on customer selected ***************** -cur_frm.fields_dict['ship_det_no'].get_query = function(doc, cdt, cdn) { - return 'SELECT `tabShipping Address`.`name`, `tabShipping Address`.`ship_to`, `tabShipping Address`.`shipping_address` FROM `tabShipping Address` WHERE `tabShipping Address`.customer = "'+ doc.customer+'" AND `tabShipping Address`.`docstatus` != 2 AND `tabShipping Address`.`name` LIKE "%s" ORDER BY `tabShipping Address`.name ASC LIMIT 50'; -} -*/ - - // *************** Customized link query for SALES ORDER based on customer and currency***************************** cur_frm.fields_dict['sales_order_no'].get_query = function(doc) { @@ -232,13 +176,6 @@ cur_frm.cscript.serial_no = function(doc, cdt , cdn) { } } -/* -// this won't work in case of Sales Bom item where item.is_stock_item = 'No' -cur_frm.fields_dict['delivery_note_details'].grid.get_field('warehouse').get_query= function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - return "SELECT `tabBin`.`warehouse`, `tabBin`.`actual_qty` FROM `tabBin` WHERE `tabBin`.`item_code` = '"+ d.item_code +"' AND ifnull(`tabBin`.`actual_qty`,0) > 0 AND `tabBin`.`warehouse` like '%s' ORDER BY `tabBin`.`warehouse` DESC LIMIT 50"; -} -*/ cur_frm.cscript.warehouse = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 60aee13512..a5b907ea5d 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -100,9 +100,10 @@ class DocType(TransactionBase): # ================================================================================ # ***************** Get Item Details ****************************** - def get_item_details(self, item_code=None): - if item_code: - return get_obj('Sales Common').get_item_details(item_code, self) + def get_item_details(self, args=None): + args = eval(args) + if args['item_code']: + return get_obj('Sales Common').get_item_details(args, self) else: obj = get_obj('Sales Common') for doc in self.doclist: @@ -117,6 +118,14 @@ class DocType(TransactionBase): def get_adj_percent(self, arg=''): get_obj('Sales Common').get_adj_percent(self) + + def get_comp_base_currency(self): + return get_obj('Sales Common').get_comp_base_currency(self.doc.company) + + def get_price_list_currency(self): + return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company) + + # ********** Get Actual Qty of item in warehouse selected ************* def get_actual_qty(self,args): args = eval(args) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt index 00bf9a8d19..e9bc0e8cf8 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.txt +++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt @@ -5,64 +5,64 @@ { 'creation': '2011-04-18 15:58:20', 'docstatus': 0, - 'modified': '2012-01-30 16:52:12', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 13:27:18', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'Delivery Note', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'Delivery Note', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # These values are common for all DocType { - '_last_update': '1326273792', - 'colour': 'White:FFF', - 'default_print_format': 'Standard', + '_last_update': u'1330070148', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', - 'document_type': 'Transaction', + 'document_type': u'Transaction', 'in_create': 0, 'is_transaction_doc': 1, - 'module': 'Stock', + 'module': u'Stock', 'name': '__common__', 'read_only_onload': 1, - 'search_fields': 'status,transaction_date,customer,customer_name, territory,grand_total', - 'section_style': 'Tabbed', - 'server_code_error': ' ', + 'search_fields': u'status,transaction_date,customer,customer_name, territory,grand_total', + 'section_style': u'Tabbed', + 'server_code_error': u' ', 'show_in_menu': 0, - 'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed', - 'tag_fields': 'billing_status', - 'version': 464 + 'subject': u'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed', + 'tag_fields': u'billing_status', + 'version': 470 }, # These values are common for all DocFormat { - 'doctype': 'DocFormat', + 'doctype': u'DocFormat', 'name': '__common__', - 'parent': 'Delivery Note', - 'parentfield': 'formats', - 'parenttype': 'DocType' + 'parent': u'Delivery Note', + 'parentfield': u'formats', + 'parenttype': u'DocType' }, # These values are common for all DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'name': '__common__', - 'parent': 'Delivery Note', - 'parentfield': 'permissions', - 'parenttype': 'DocType', + 'parent': u'Delivery Note', + 'parentfield': u'permissions', + 'parenttype': u'DocType', 'read': 1 }, # DocType, Delivery Note { 'doctype': 'DocType', - 'name': 'Delivery Note' + 'name': u'Delivery Note' }, # DocPerm @@ -70,9 +70,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Material User', + 'role': u'Material User', 'submit': 1, 'write': 1 }, @@ -82,9 +82,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Sales User', + 'role': u'Sales User', 'submit': 1, 'write': 1 }, @@ -94,9 +94,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Material Master Manager', + 'role': u'Material Master Manager', 'submit': 1, 'write': 1 }, @@ -106,9 +106,9 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Material Manager', + 'role': u'Material Manager', 'submit': 1, 'write': 1 }, @@ -118,84 +118,78 @@ 'amend': 1, 'cancel': 1, 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Sales Manager', + 'role': u'Sales Manager', 'submit': 1, 'write': 1 }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'role': 'All', + 'role': u'All', 'write': 0 }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 2, - 'role': 'All' + 'role': u'All' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Delivery Note Packing List Wise' + 'doctype': u'DocFormat', + 'format': u'Delivery Note Classic' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Delivery Note Classic' + 'doctype': u'DocFormat', + 'format': u'Delivery Note Modern' }, # DocFormat { - 'doctype': 'DocFormat', - 'format': 'Delivery Note Modern' - }, - - # DocFormat - { - 'doctype': 'DocFormat', - 'format': 'Delivery Note Spartan' + 'doctype': u'DocFormat', + 'format': u'Delivery Note Spartan' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Basic Info', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Basic Info', + 'oldfieldtype': u'Section Break', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0, - 'trigger': 'Client', - 'width': '50%' + 'trigger': u'Client', + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'description': 'To manage multiple series please go to Setup > Manage Series', - 'doctype': 'DocField', - 'fieldname': 'naming_series', - 'fieldtype': 'Select', - 'label': 'Series', + 'colour': u'White:FFF', + 'description': u'To manage multiple series please go to Setup > Manage Series', + 'doctype': u'DocField', + 'fieldname': u'naming_series', + 'fieldtype': u'Select', + 'label': u'Series', 'no_copy': 1, - 'oldfieldname': 'naming_series', - 'oldfieldtype': 'Select', - 'options': 'DN', + 'oldfieldname': u'naming_series', + 'oldfieldtype': u'Select', + 'options': u'DN', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -203,151 +197,105 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'customer', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Customer', - 'oldfieldname': 'customer', - 'oldfieldtype': 'Link', - 'options': 'Customer', + 'label': u'Customer', + 'oldfieldname': u'customer', + 'oldfieldtype': u'Link', + 'options': u'Customer', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer_address', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'customer_address', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Shipping Address', - 'options': 'Address', + 'label': u'Shipping Address', + 'options': u'Address', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'contact_person', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'contact_person', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Contact Person', - 'options': 'Contact', + 'label': u'Contact Person', + 'options': u'Contact', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer_name', - 'fieldtype': 'Data', - 'label': 'Customer Name', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'address_display', - 'fieldtype': 'Small Text', - 'label': 'Shipping Address', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'contact_display', - 'fieldtype': 'Small Text', - 'label': 'Contact', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'contact_mobile', - 'fieldtype': 'Text', - 'label': 'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'contact_email', - 'fieldtype': 'Text', - 'label': 'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'default': 'Today', - 'description': 'The date at which current entry is made in system.', - 'doctype': 'DocField', - 'fieldname': 'transaction_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'default': u'Today', + 'description': u'The date at which current entry is made in system.', + 'doctype': u'DocField', + 'fieldname': u'transaction_date', + 'fieldtype': u'Date', 'in_filter': 1, - 'label': 'Voucher Date', + 'label': u'Voucher Date', 'no_copy': 1, - 'oldfieldname': 'transaction_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'transaction_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 0, 'reqd': 1, 'search_index': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'default': 'Draft', - 'doctype': 'DocField', - 'fieldname': 'status', - 'fieldtype': 'Select', + 'default': u'Draft', + 'doctype': u'DocField', + 'fieldname': u'status', + 'fieldtype': u'Select', 'in_filter': 1, - 'label': 'Status', + 'label': u'Status', 'no_copy': 1, - 'oldfieldname': 'status', - 'oldfieldtype': 'Select', - 'options': '\nDraft\nSubmitted\nCancelled', + 'oldfieldname': u'status', + 'oldfieldtype': u'Select', + 'options': u'\nDraft\nSubmitted\nCancelled', 'permlevel': 1, 'print_hide': 1, 'reqd': 1, 'search_index': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'depends_on': 'eval:!doc.__islocal', - 'description': '% of materials billed against this Delivery Note', - 'doctype': 'DocField', - 'fieldname': 'per_billed', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials billed against this Delivery Note', + 'doctype': u'DocField', + 'fieldname': u'per_billed', + 'fieldtype': u'Currency', 'in_filter': 1, - 'label': '% Amount Billed', + 'label': u'% Amount Billed', 'no_copy': 1, - 'oldfieldname': 'per_billed', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'per_billed', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'search_index': 1 @@ -355,17 +303,17 @@ # DocField { - 'colour': 'White:FFF', - 'depends_on': 'eval:!doc.__islocal', - 'description': '% of materials delivered against this Delivery Note', - 'doctype': 'DocField', - 'fieldname': 'per_installed', - 'fieldtype': 'Currency', + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'description': u'% of materials delivered against this Delivery Note', + 'doctype': u'DocField', + 'fieldname': u'per_installed', + 'fieldtype': u'Currency', 'in_filter': 1, - 'label': '% Installed', + 'label': u'% Installed', 'no_copy': 1, - 'oldfieldname': 'per_installed', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'per_installed', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'search_index': 1 @@ -373,217 +321,102 @@ # DocField { - 'doctype': 'DocField', - 'fieldname': 'po_no', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'po_no', + 'fieldtype': u'Data', 'hidden': 1, - 'label': 'P.O. No', + 'label': u'P.O. No', 'no_copy': 0, - 'oldfieldname': 'po_no', - 'oldfieldtype': 'Data', + 'oldfieldname': u'po_no', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'po_date', - 'fieldtype': 'Data', + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.po_no', + 'doctype': u'DocField', + 'fieldname': u'po_date', + 'fieldtype': u'Data', 'hidden': 1, - 'label': 'P.O. Date', + 'label': u'P.O. Date', 'no_copy': 0, - 'oldfieldname': 'po_date', - 'oldfieldtype': 'Data', + 'oldfieldname': u'po_date', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { 'allow_on_submit': 0, - 'doctype': 'DocField', - 'fieldname': 'amended_from', - 'fieldtype': 'Data', - 'label': 'Amended From', + 'doctype': u'DocField', + 'fieldname': u'amended_from', + 'fieldtype': u'Data', + 'label': u'Amended From', 'no_copy': 1, - 'oldfieldname': 'amended_from', - 'oldfieldtype': 'Data', + 'oldfieldname': u'amended_from', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'description': 'The date at which current entry is corrected in the system.', - 'doctype': 'DocField', - 'fieldname': 'amendment_date', - 'fieldtype': 'Date', - 'label': 'Amendment Date', + 'description': u'The date at which current entry is corrected in the system.', + 'doctype': u'DocField', + 'fieldname': u'amendment_date', + 'fieldtype': u'Date', + 'label': u'Amendment Date', 'no_copy': 1, - 'oldfieldname': 'amendment_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'amendment_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'territory', - 'fieldtype': 'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': 'Territory', - 'options': 'Territory', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Items', + 'oldfieldtype': u'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', + 'doctype': u'DocField', + 'fieldname': u'price_list_name', + 'fieldtype': u'Select', + 'label': u'Price List', + 'oldfieldname': u'price_list_name', + 'oldfieldtype': u'Select', + 'options': u'link:Price List', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'search_index': 1 + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer_group', - 'fieldtype': 'Link', - 'in_filter': 1, - 'label': 'Customer Group', - 'options': 'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Transporter Info', - 'permlevel': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'transporter_name', - 'fieldtype': 'Data', - 'label': 'Transporter Name', - 'no_copy': 0, - 'oldfieldname': 'transporter_name', - 'oldfieldtype': 'Data', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'trigger': 'Client', - 'width': '150px' - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Transporter lorry number', - 'doctype': 'DocField', - 'fieldname': 'lr_no', - 'fieldtype': 'Data', - 'label': 'LR No', - 'no_copy': 0, - 'oldfieldname': 'lr_no', - 'oldfieldtype': 'Data', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'width': '100px' - }, - - # DocField - { - 'colour': 'White:FFF', - 'default': 'Today', - 'description': 'Date on which lorry started from your warehouse', - 'doctype': 'DocField', - 'fieldname': 'lr_date', - 'fieldtype': 'Date', - 'label': 'LR Date', - 'no_copy': 0, - 'oldfieldname': 'lr_date', - 'oldfieldtype': 'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': '100px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'permlevel': 0, - 'width': '50%' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'challan_no', - 'fieldtype': 'Data', - 'label': 'Challan No', - 'oldfieldname': 'challan_no', - 'oldfieldtype': 'Data', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'challan_date', - 'fieldtype': 'Date', - 'label': 'Challan Date', - 'oldfieldname': 'challan_date', - 'oldfieldtype': 'Date', - 'permlevel': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Items', - 'oldfieldtype': 'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', - 'doctype': 'DocField', - 'fieldname': 'price_list_name', - 'fieldtype': 'Select', - 'label': 'Price List', - 'oldfieldname': 'price_list_name', - 'oldfieldtype': 'Select', - 'options': 'link:Price List', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'trigger': 'Client' - }, - - # DocField - { - 'colour': 'White:FFF', - 'description': 'Select the currency in which price list is maintained', - 'doctype': 'DocField', - 'fieldname': 'price_list_currency', - 'fieldtype': 'Select', - 'label': 'Price List Currency', - 'options': 'link:Currency', + 'colour': u'White:FFF', + 'description': u'Select the currency in which price list is maintained', + 'doctype': u'DocField', + 'fieldname': u'price_list_currency', + 'fieldtype': u'Select', + 'label': u'Price List Currency', + 'options': u'link:Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -591,12 +424,12 @@ # DocField { - 'colour': 'White:FFF', - 'description': 'Rate at which Price list currency is converted to your currency', - 'doctype': 'DocField', - 'fieldname': 'plc_conversion_rate', - 'fieldtype': 'Currency', - 'label': 'Price List Currency Conversion Rate', + 'colour': u'White:FFF', + 'description': u"Rate at which Price list currency is converted to company's base currency", + 'doctype': u'DocField', + 'fieldname': u'plc_conversion_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Currency Conversion Rate', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -604,23 +437,23 @@ # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'colour': 'White:FFF', - 'description': "Customer's Currency", - 'doctype': 'DocField', - 'fieldname': 'currency', - 'fieldtype': 'Select', - 'label': 'Currency', - 'oldfieldname': 'currency', - 'oldfieldtype': 'Select', - 'options': 'link:Currency', + 'colour': u'White:FFF', + 'description': u"Customer's Currency", + 'doctype': u'DocField', + 'fieldname': u'currency', + 'fieldtype': u'Select', + 'label': u'Currency', + 'oldfieldname': u'currency', + 'oldfieldtype': u'Select', + 'options': u'link:Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -628,16 +461,16 @@ # DocField { - 'colour': 'White:FFF', - 'default': '1.00', - 'description': "Rate at which customer's currency is converted to your currency", - 'doctype': 'DocField', - 'fieldname': 'conversion_rate', - 'fieldtype': 'Currency', - 'label': 'Conversion Rate', + 'colour': u'White:FFF', + 'default': u'1.00', + 'description': u"Rate at which customer's currency is converted to company's base currency", + 'doctype': u'DocField', + 'fieldname': u'conversion_rate', + 'fieldtype': u'Currency', + 'label': u'Conversion Rate', 'no_copy': 0, - 'oldfieldname': 'conversion_rate', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'conversion_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 1 @@ -645,487 +478,556 @@ # DocField { - 'colour': 'White:FFF', - 'description': 'You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.', - 'doctype': 'DocField', - 'fieldname': 'sales_order_no', - 'fieldtype': 'Link', - 'label': 'Sales Order No', + 'colour': u'White:FFF', + 'description': u'You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.', + 'doctype': u'DocField', + 'fieldname': u'sales_order_no', + 'fieldtype': u'Link', + 'label': u'Sales Order No', 'no_copy': 0, - 'oldfieldname': 'sales_order_no', - 'oldfieldtype': 'Link', - 'options': 'Sales Order', + 'oldfieldname': u'sales_order_no', + 'oldfieldtype': u'Link', + 'options': u'Sales Order', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', 'hidden': 0, - 'label': 'Get Items', - 'oldfieldtype': 'Button', - 'options': 'pull_sales_order_details', + 'label': u'Get Items', + 'oldfieldtype': u'Button', + 'options': u'pull_sales_order_details', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', 'permlevel': 0 }, # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'delivery_note_details', - 'fieldtype': 'Table', - 'label': 'Delivery Note Details', + 'doctype': u'DocField', + 'fieldname': u'delivery_note_details', + 'fieldtype': u'Table', + 'label': u'Delivery Note Details', 'no_copy': 0, - 'oldfieldname': 'delivery_note_details', - 'oldfieldtype': 'Table', - 'options': 'Delivery Note Detail', + 'oldfieldname': u'delivery_note_details', + 'oldfieldtype': u'Table', + 'options': u'Delivery Note Detail', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'net_total', - 'fieldtype': 'Currency', - 'label': 'Net Total*', + 'doctype': u'DocField', + 'fieldname': u'net_total', + 'fieldtype': u'Currency', + 'label': u'Net Total*', 'no_copy': 0, - 'oldfieldname': 'net_total', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'net_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Re-Calculate Values', - 'oldfieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Re-Calculate Values', + 'oldfieldtype': u'Button', 'permlevel': 0, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Note', - 'oldfieldtype': 'HTML', - 'options': 'NOTE :* In Base Currency', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Taxes', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Taxes', + 'oldfieldtype': u'Section Break', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'description': 'If you have created a standard template in Other Charges master, select one and click on the button below.', - 'doctype': 'DocField', - 'fieldname': 'charge', - 'fieldtype': 'Link', - 'label': 'Charge', - 'oldfieldname': 'charge', - 'oldfieldtype': 'Link', - 'options': 'Other Charges', + 'colour': u'White:FFF', + 'description': u'If you have created a standard template in Other Charges master, select one and click on the button below.', + 'doctype': u'DocField', + 'fieldname': u'charge', + 'fieldtype': u'Link', + 'label': u'Charge', + 'oldfieldname': u'charge', + 'oldfieldtype': u'Link', + 'options': u'Other Charges', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Get Charges', - 'oldfieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Get Charges', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'other_charges', - 'fieldtype': 'Table', - 'label': 'Other Charges', + 'doctype': u'DocField', + 'fieldname': u'other_charges', + 'fieldtype': u'Table', + 'label': u'Other Charges', 'no_copy': 0, - 'oldfieldname': 'other_charges', - 'oldfieldtype': 'Table', - 'options': 'RV Tax Detail', + 'oldfieldname': u'other_charges', + 'oldfieldtype': u'Table', + 'options': u'RV Tax Detail', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'other_charges_total', - 'fieldtype': 'Currency', - 'label': 'Charges Total', - 'oldfieldname': 'other_charges_total', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'other_charges_total', + 'fieldtype': u'Currency', + 'label': u'Charges Total', + 'oldfieldname': u'other_charges_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Calculate Charges', - 'oldfieldtype': 'Button', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Calculate Charges', + 'oldfieldtype': u'Button', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Other Charges Calculation', - 'oldfieldtype': 'HTML', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Other Charges Calculation', + 'oldfieldtype': u'HTML', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Totals', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Totals', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'grand_total', - 'fieldtype': 'Currency', - 'label': 'Grand Total', + 'doctype': u'DocField', + 'fieldname': u'grand_total', + 'fieldtype': u'Currency', + 'label': u'Grand Total', 'no_copy': 0, - 'oldfieldname': 'grand_total', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'grand_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'reqd': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'rounded_total', - 'fieldtype': 'Currency', - 'label': 'Rounded Total', + 'doctype': u'DocField', + 'fieldname': u'rounded_total', + 'fieldtype': u'Currency', + 'label': u'Rounded Total', 'no_copy': 0, - 'oldfieldname': 'rounded_total', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'rounded_total', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'In Words will be visible once you save the Delivery Note.', - 'doctype': 'DocField', - 'fieldname': 'in_words', - 'fieldtype': 'Data', - 'label': 'In Words', + 'colour': u'White:FFF', + 'description': u'In Words will be visible once you save the Delivery Note.', + 'doctype': u'DocField', + 'fieldname': u'in_words', + 'fieldtype': u'Data', + 'label': u'In Words', 'no_copy': 0, - 'oldfieldname': 'in_words', - 'oldfieldtype': 'Data', + 'oldfieldname': u'in_words', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '200px' + 'width': u'200px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'grand_total_export', - 'fieldtype': 'Currency', - 'label': 'Grand Total (Export)', + 'doctype': u'DocField', + 'fieldname': u'grand_total_export', + 'fieldtype': u'Currency', + 'label': u'Grand Total (Export)', 'no_copy': 0, - 'oldfieldname': 'grand_total_export', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'grand_total_export', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'rounded_total_export', - 'fieldtype': 'Currency', - 'label': 'Rounded Total (Export)', + 'doctype': u'DocField', + 'fieldname': u'rounded_total_export', + 'fieldtype': u'Currency', + 'label': u'Rounded Total (Export)', 'no_copy': 0, - 'oldfieldname': 'rounded_total_export', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'rounded_total_export', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'In Words (Export) will be visible once you save the Delivery Note.', - 'doctype': 'DocField', - 'fieldname': 'in_words_export', - 'fieldtype': 'Data', - 'label': 'In Words (Export)', + 'colour': u'White:FFF', + 'description': u'In Words (Export) will be visible once you save the Delivery Note.', + 'doctype': u'DocField', + 'fieldname': u'in_words_export', + 'fieldtype': u'Data', + 'label': u'In Words (Export)', 'no_copy': 0, - 'oldfieldname': 'in_words_export', - 'oldfieldtype': 'Data', + 'oldfieldname': u'in_words_export', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Terms', - 'oldfieldtype': 'Section Break', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Terms', + 'oldfieldtype': u'Section Break', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'tc_name', - 'fieldtype': 'Link', - 'label': 'Select Terms', - 'oldfieldname': 'tc_name', - 'oldfieldtype': 'Link', - 'options': 'Term', + 'doctype': u'DocField', + 'fieldname': u'tc_name', + 'fieldtype': u'Link', + 'label': u'Select Terms', + 'oldfieldname': u'tc_name', + 'oldfieldtype': u'Link', + 'options': u'Term', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Get Terms', - 'oldfieldtype': 'Button', - 'options': 'get_tc_details', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Get Terms', + 'oldfieldtype': u'Button', + 'options': u'get_tc_details', 'permlevel': 0, - 'trigger': 'Server' + 'trigger': u'Server' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'HTML', - 'label': 'Terms HTML', - 'oldfieldtype': 'HTML', - 'options': 'You can add Terms and Notes that will be printed in the Transaction', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'HTML', + 'label': u'Terms HTML', + 'oldfieldtype': u'HTML', + 'options': u'You can add Terms and Notes that will be printed in the Transaction', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'terms', - 'fieldtype': 'Text Editor', - 'label': 'Term Details', - 'oldfieldname': 'terms', - 'oldfieldtype': 'Text Editor', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'terms', + 'fieldtype': u'Text Editor', + 'label': u'Term Details', + 'oldfieldname': u'terms', + 'oldfieldtype': u'Text Editor', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'description': 'Filling in Additional Information about the Delivery Note will help you analyze your data better.', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'More Info', - 'oldfieldtype': 'Section Break', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Transporter Info', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'description': 'Select the relevant company name if you have multiple companies', - 'doctype': 'DocField', - 'fieldname': 'company', - 'fieldtype': 'Link', - 'in_filter': 1, - 'label': 'Company', - 'oldfieldname': 'company', - 'oldfieldtype': 'Link', - 'options': 'Company', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': '150px' + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'fiscal_year', - 'fieldtype': 'Select', - 'in_filter': 1, - 'label': 'Fiscal Year', - 'oldfieldname': 'fiscal_year', - 'oldfieldtype': 'Select', - 'options': 'link:Fiscal Year', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'transporter_name', + 'fieldtype': u'Data', + 'label': u'Transporter Name', + 'no_copy': 0, + 'oldfieldname': u'transporter_name', + 'oldfieldtype': u'Data', 'permlevel': 0, 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': '150px' + 'reqd': 0, + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'default': 'Today', - 'description': 'The date at which current entry will get or has actually executed.', - 'doctype': 'DocField', - 'fieldname': 'posting_date', - 'fieldtype': 'Date', + 'colour': u'White:FFF', + 'description': u'Transporter lorry number', + 'doctype': u'DocField', + 'fieldname': u'lr_no', + 'fieldtype': u'Data', + 'label': u'LR No', + 'no_copy': 0, + 'oldfieldname': u'lr_no', + 'oldfieldtype': u'Data', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 0, + 'width': u'100px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'default': u'Today', + 'description': u'Date on which lorry started from your warehouse', + 'doctype': u'DocField', + 'fieldname': u'lr_date', + 'fieldtype': u'Date', + 'label': u'LR Date', + 'no_copy': 0, + 'oldfieldname': u'lr_date', + 'oldfieldtype': u'Date', + 'permlevel': 0, + 'print_hide': 1, + 'width': u'100px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'challan_no', + 'fieldtype': u'Data', + 'label': u'Challan No', + 'oldfieldname': u'challan_no', + 'oldfieldtype': u'Data', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'challan_date', + 'fieldtype': u'Date', + 'label': u'Challan Date', + 'oldfieldname': u'challan_date', + 'oldfieldtype': u'Date', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Filling in Additional Information about the Delivery Note will help you analyze your data better.', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'More Info', + 'oldfieldtype': u'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Select the relevant company name if you have multiple companies', + 'doctype': u'DocField', + 'fieldname': u'company', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Posting Date', + 'label': u'Company', + 'oldfieldname': u'company', + 'oldfieldtype': u'Link', + 'options': u'Company', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1, + 'width': u'150px' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'fiscal_year', + 'fieldtype': u'Select', + 'in_filter': 1, + 'label': u'Fiscal Year', + 'oldfieldname': u'fiscal_year', + 'oldfieldtype': u'Select', + 'options': u'link:Fiscal Year', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1, + 'width': u'150px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'default': u'Today', + 'description': u'The date at which current entry will get or has actually executed.', + 'doctype': u'DocField', + 'fieldname': u'posting_date', + 'fieldtype': u'Date', + 'in_filter': 1, + 'label': u'Posting Date', 'no_copy': 1, - 'oldfieldname': 'posting_date', - 'oldfieldtype': 'Date', + 'oldfieldname': u'posting_date', + 'oldfieldtype': u'Date', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, 'search_index': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Time at which items were delivered from warehouse', - 'doctype': 'DocField', - 'fieldname': 'posting_time', - 'fieldtype': 'Time', + 'colour': u'White:FFF', + 'description': u'Time at which items were delivered from warehouse', + 'doctype': u'DocField', + 'fieldname': u'posting_time', + 'fieldtype': u'Time', 'in_filter': 0, - 'label': 'Posting Time', - 'oldfieldname': 'posting_time', - 'oldfieldtype': 'Time', + 'label': u'Posting Time', + 'oldfieldname': u'posting_time', + 'oldfieldtype': u'Time', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, 'search_index': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Track this Delivery Note against any Project', - 'doctype': 'DocField', - 'fieldname': 'project_name', - 'fieldtype': 'Link', + 'colour': u'White:FFF', + 'description': u'Track this Delivery Note against any Project', + 'doctype': u'DocField', + 'fieldname': u'project_name', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Project Name', - 'oldfieldname': 'project_name', - 'oldfieldtype': 'Link', - 'options': 'Project', + 'label': u'Project Name', + 'oldfieldname': u'project_name', + 'oldfieldtype': u'Link', + 'options': u'Project', 'permlevel': 0, 'search_index': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'colour': 'White:FFF', - 'description': 'Required only for sample item.', - 'doctype': 'DocField', - 'fieldname': 'to_warehouse', - 'fieldtype': 'Link', - 'hidden': 0, - 'label': 'To Warehouse', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'oldfieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'billing_status', + 'fieldtype': u'Select', + 'hidden': 1, + 'label': u'Billing Status', 'no_copy': 1, - 'oldfieldname': 'to_warehouse', - 'oldfieldtype': 'Link', - 'options': 'Warehouse', + 'options': u'\nNot Billed\nPartly Billed\nFully Billed', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'oldfieldtype': 'Column Break', - 'permlevel': 0, - 'width': '50%' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'billing_status', - 'fieldtype': 'Select', + 'doctype': u'DocField', + 'fieldname': u'installation_status', + 'fieldtype': u'Select', 'hidden': 1, - 'label': 'Billing Status', - 'no_copy': 1, - 'options': '\nNot Billed\nPartly Billed\nFully Billed', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'installation_status', - 'fieldtype': 'Select', - 'hidden': 1, - 'label': 'Installation Status', + 'label': u'Installation Status', 'permlevel': 0, 'print_hide': 1 }, @@ -1133,41 +1035,41 @@ # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'letter_head', - 'fieldtype': 'Select', - 'label': 'Letter Head', - 'oldfieldname': 'letter_head', - 'oldfieldtype': 'Link', - 'options': 'link:Letter Head', + 'doctype': u'DocField', + 'fieldname': u'letter_head', + 'fieldtype': u'Select', + 'label': u'Letter Head', + 'oldfieldname': u'letter_head', + 'oldfieldtype': u'Link', + 'options': u'link:Letter Head', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'source', - 'fieldtype': 'Select', - 'label': 'Source', - 'oldfieldname': 'source', - 'oldfieldtype': 'Select', - 'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + 'doctype': u'DocField', + 'fieldname': u'source', + 'fieldtype': u'Select', + 'label': u'Source', + 'oldfieldname': u'source', + 'oldfieldtype': u'Select', + 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'depends_on': "eval:doc.source == 'Campaign'", - 'doctype': 'DocField', - 'fieldname': 'campaign', - 'fieldtype': 'Link', - 'label': 'Campaign', - 'oldfieldname': 'campaign', - 'oldfieldtype': 'Link', - 'options': 'Campaign', + 'colour': u'White:FFF', + 'depends_on': u"eval:doc.source == 'Campaign'", + 'doctype': u'DocField', + 'fieldname': u'campaign', + 'fieldtype': u'Link', + 'label': u'Campaign', + 'oldfieldname': u'campaign', + 'oldfieldtype': u'Link', + 'options': u'Campaign', 'permlevel': 0, 'print_hide': 1 }, @@ -1175,262 +1077,316 @@ # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'select_print_heading', - 'fieldtype': 'Link', - 'label': 'Select Print Heading', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'select_print_heading', + 'fieldtype': u'Link', + 'label': u'Select Print Heading', 'no_copy': 1, - 'oldfieldname': 'select_print_heading', - 'oldfieldtype': 'Link', - 'options': 'Print Heading', + 'oldfieldname': u'select_print_heading', + 'oldfieldtype': u'Link', + 'options': u'Print Heading', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'print_without_amount', - 'fieldtype': 'Check', - 'label': 'Print Without Amount', - 'oldfieldname': 'print_without_amount', - 'oldfieldtype': 'Check', + 'doctype': u'DocField', + 'fieldname': u'print_without_amount', + 'fieldtype': u'Check', + 'label': u'Print Without Amount', + 'oldfieldname': u'print_without_amount', + 'oldfieldtype': u'Check', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'instructions', - 'fieldtype': 'Text', - 'label': 'Instructions', - 'oldfieldname': 'instructions', - 'oldfieldtype': 'Text', + 'colour': u'White:FFF', + 'description': u'Required only for sample item.', + 'doctype': u'DocField', + 'fieldname': u'to_warehouse', + 'fieldtype': u'Link', + 'hidden': 0, + 'label': u'To Warehouse', + 'no_copy': 1, + 'oldfieldname': u'to_warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'instructions', + 'fieldtype': u'Text', + 'label': u'Instructions', + 'oldfieldname': u'instructions', + 'oldfieldtype': u'Text', 'permlevel': 0 }, # DocField { - 'colour': 'White:FFF', - 'depends_on': 'eval:!doc.__islocal', - 'doctype': 'DocField', - 'fieldname': 'cancel_reason', - 'fieldtype': 'Data', + 'colour': u'White:FFF', + 'depends_on': u'eval:!doc.__islocal', + 'doctype': u'DocField', + 'fieldname': u'cancel_reason', + 'fieldtype': u'Data', 'hidden': 0, - 'label': 'Cancel Reason', + 'label': u'Cancel Reason', 'no_copy': 1, - 'oldfieldname': 'cancel_reason', - 'oldfieldtype': 'Data', + 'oldfieldname': u'cancel_reason', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'excise_page', - 'fieldtype': 'Data', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'excise_page', + 'fieldtype': u'Data', 'hidden': 1, - 'label': 'Excise Page Number', - 'oldfieldname': 'excise_page', - 'oldfieldtype': 'Data', + 'label': u'Excise Page Number', + 'oldfieldname': u'excise_page', + 'oldfieldtype': u'Data', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Sales Team', - 'oldfieldtype': 'Section Break', + 'colour': u'White:FFF', + 'depends_on': u'eval:doc.customer', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Customer Details', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'customer_name', + 'fieldtype': u'Data', + 'label': u'Customer Name', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'address_display', + 'fieldtype': u'Small Text', + 'label': u'Shipping Address', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'customer_group', + 'fieldtype': u'Link', + 'in_filter': 1, + 'label': u'Customer Group', + 'options': u'Customer Group', + 'permlevel': 0, + 'print_hide': 1, + 'search_index': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_display', + 'fieldtype': u'Small Text', + 'label': u'Contact', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_mobile', + 'fieldtype': u'Text', + 'label': u'Mobile No', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'contact_email', + 'fieldtype': u'Text', + 'label': u'Contact Email', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'territory', + 'fieldtype': u'Link', + 'hidden': 0, + 'in_filter': 1, + 'label': u'Territory', + 'options': u'Territory', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Packing List', + 'oldfieldtype': u'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'packing_details', + 'fieldtype': u'Table', + 'label': u'Packing Details', + 'oldfieldname': u'packing_details', + 'oldfieldtype': u'Table', + 'options': u'Delivery Note Packing Detail', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'label': u'Sales Team', + 'oldfieldtype': u'Section Break', 'permlevel': 0, 'print_hide': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', 'permlevel': 0, - 'width': '50%' + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'sales_partner', - 'fieldtype': 'Link', - 'label': 'Sales Partner', + 'doctype': u'DocField', + 'fieldname': u'sales_partner', + 'fieldtype': u'Link', + 'label': u'Sales Partner', 'no_copy': 0, - 'oldfieldname': 'sales_partner', - 'oldfieldtype': 'Link', - 'options': 'Sales Partner', + 'oldfieldname': u'sales_partner', + 'oldfieldtype': u'Link', + 'options': u'Sales Partner', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'commission_rate', - 'fieldtype': 'Currency', - 'label': 'Commission Rate (%)', + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'commission_rate', + 'fieldtype': u'Currency', + 'label': u'Commission Rate (%)', 'no_copy': 0, - 'oldfieldname': 'commission_rate', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'commission_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'total_commission', - 'fieldtype': 'Currency', - 'label': 'Total Commission', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'total_commission', + 'fieldtype': u'Currency', + 'label': u'Total Commission', 'no_copy': 0, - 'oldfieldname': 'total_commission', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'total_commission', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'permlevel': 0, - 'width': '50%' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'sales_team', - 'fieldtype': 'Table', - 'label': 'Sales Team1', - 'oldfieldname': 'sales_team', - 'oldfieldtype': 'Table', - 'options': 'Sales Team', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'hidden': 1, - 'label': 'Supplier Details', - 'oldfieldtype': 'Section Break', - 'options': 'Simple', + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'options': u'Simple', 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'supplier', - 'fieldtype': 'Link', - 'hidden': 1, - 'label': 'Supplier', - 'oldfieldname': 'supplier', - 'oldfieldtype': 'Link', - 'options': 'Supplier', + 'doctype': u'DocField', + 'fieldname': u'sales_team', + 'fieldtype': u'Table', + 'label': u'Sales Team1', + 'oldfieldname': u'sales_team', + 'oldfieldtype': u'Table', + 'options': u'Sales Team', 'permlevel': 0, 'print_hide': 1 }, - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'supplier_address', - 'fieldtype': 'Text', - 'hidden': 1, - 'label': 'Supplier Address', - 'oldfieldname': 'supplier_address', - 'oldfieldtype': 'Text', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': 'DocField', - 'fieldname': 'purchase_receipt_no', - 'fieldtype': 'Link', - 'hidden': 1, - 'label': 'Purchase Receipt No', - 'no_copy': 1, - 'oldfieldname': 'purchase_receipt_no', - 'oldfieldtype': 'Link', - 'options': 'Purchase Receipt', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'purchase_order_no', - 'fieldtype': 'Link', - 'hidden': 1, - 'label': 'Purchase Order', - 'no_copy': 1, - 'oldfieldname': 'purchase_order_no', - 'oldfieldtype': 'Link', - 'options': 'Purchase Order', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldtype': 'Section Break', - 'label': 'Packing List', - 'oldfieldtype': 'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'packing_details', - 'fieldtype': 'Table', - 'label': 'Packing Details', - 'oldfieldname': 'packing_details', - 'oldfieldtype': 'Table', - 'options': 'Delivery Note Packing Detail', - 'permlevel': 1, - 'print_hide': 1 - }, - # DocField { 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldtype': 'Button', - 'label': 'Repair Delivery Note', - 'oldfieldtype': 'Button', - 'options': 'repair_delivery_note', + 'doctype': u'DocField', + 'fieldtype': u'Button', + 'label': u'Repair Delivery Note', + 'oldfieldtype': u'Button', + 'options': u'repair_delivery_note', 'permlevel': 0, 'print_hide': 1 } diff --git a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt b/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt index a10d1d6aca..78fea52a48 100644 --- a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt +++ b/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt @@ -5,403 +5,419 @@ { 'creation': '2010-08-08 17:08:58', 'docstatus': 0, - 'modified': '2012-02-01 16:08:06', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-02-24 11:33:58', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocType { - '_last_update': '1311621379', - 'autoname': 'DND/.#######', - 'colour': 'White:FFF', - 'default_print_format': 'Standard', + '_last_update': u'1311621379', + 'autoname': u'DND/.#######', + 'colour': u'White:FFF', + 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, - 'module': 'Stock', + 'module': u'Stock', 'name': '__common__', - 'section_style': 'Tray', - 'server_code_error': ' ', + 'section_style': u'Tray', + 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 51 + 'version': 53 }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'Delivery Note Detail', - 'parentfield': 'fields', - 'parenttype': 'DocType' + 'parent': u'Delivery Note Detail', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # DocType, Delivery Note Detail { 'doctype': 'DocType', - 'name': 'Delivery Note Detail' + 'name': u'Delivery Note Detail' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_code', - 'fieldtype': 'Link', + 'doctype': u'DocField', + 'fieldname': u'item_code', + 'fieldtype': u'Link', 'in_filter': 1, - 'label': 'Item Code', - 'oldfieldname': 'item_code', - 'oldfieldtype': 'Link', - 'options': 'Item', + 'label': u'Item Code', + 'oldfieldname': u'item_code', + 'oldfieldtype': u'Link', + 'options': u'Item', 'permlevel': 0, 'reqd': 1, 'search_index': 1, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'item_name', - 'fieldtype': 'Data', - 'label': 'Item Name', - 'oldfieldname': 'item_name', - 'oldfieldtype': 'Data', + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'item_name', + 'fieldtype': u'Data', + 'label': u'Item Name', + 'oldfieldname': u'item_name', + 'oldfieldtype': u'Data', 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'description', - 'fieldtype': 'Small Text', - 'label': 'Description', - 'oldfieldname': 'description', - 'oldfieldtype': 'Small Text', + 'doctype': u'DocField', + 'fieldname': u'description', + 'fieldtype': u'Small Text', + 'label': u'Description', + 'oldfieldname': u'description', + 'oldfieldtype': u'Small Text', 'permlevel': 0, 'reqd': 1, - 'width': '300px' + 'width': u'300px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'qty', - 'fieldtype': 'Currency', - 'label': 'Quantity', - 'oldfieldname': 'qty', - 'oldfieldtype': 'Currency', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'qty', + 'fieldtype': u'Currency', + 'label': u'Quantity', + 'oldfieldname': u'qty', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'reqd': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'stock_uom', - 'fieldtype': 'Data', - 'label': 'UOM', - 'oldfieldname': 'stock_uom', - 'oldfieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'stock_uom', + 'fieldtype': u'Data', + 'label': u'UOM', + 'oldfieldname': u'stock_uom', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 0, 'reqd': 1, - 'width': '50px' + 'width': u'50px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'ref_rate', - 'fieldtype': 'Currency', - 'label': 'Ref Rate', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate', 'no_copy': 0, - 'oldfieldname': 'ref_rate', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'adj_rate', - 'fieldtype': 'Float', - 'label': 'Discount (%)', - 'oldfieldname': 'adj_rate', - 'oldfieldtype': 'Float', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'adj_rate', + 'fieldtype': u'Float', + 'label': u'Discount (%)', + 'oldfieldname': u'adj_rate', + 'oldfieldtype': u'Float', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'export_rate', - 'fieldtype': 'Currency', - 'label': 'Rate', - 'oldfieldname': 'export_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'export_rate', + 'fieldtype': u'Currency', + 'label': u'Rate', + 'oldfieldname': u'export_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 0, 'reqd': 0, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'export_amount', - 'fieldtype': 'Currency', - 'label': 'Amount', - 'oldfieldname': 'export_amount', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'export_amount', + 'fieldtype': u'Currency', + 'label': u'Amount', + 'oldfieldname': u'export_amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 0, 'reqd': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'base_ref_rate', - 'fieldtype': 'Currency', - 'label': 'Ref Rate*', - 'oldfieldname': 'base_ref_rate', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'base_ref_rate', + 'fieldtype': u'Currency', + 'label': u'Price List Rate*', + 'oldfieldname': u'base_ref_rate', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'default': '0.00', - 'doctype': 'DocField', - 'fieldname': 'basic_rate', - 'fieldtype': 'Currency', - 'label': 'Rate*', - 'oldfieldname': 'basic_rate', - 'oldfieldtype': 'Currency', + 'default': u'0.00', + 'doctype': u'DocField', + 'fieldname': u'basic_rate', + 'fieldtype': u'Currency', + 'label': u'Rate*', + 'oldfieldname': u'basic_rate', + 'oldfieldtype': u'Currency', 'permlevel': 0, 'print_hide': 1, 'reqd': 0, - 'trigger': 'Client', - 'width': '150px' + 'trigger': u'Client', + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'amount', - 'fieldtype': 'Currency', - 'label': 'Amount*', - 'oldfieldname': 'amount', - 'oldfieldtype': 'Currency', + 'doctype': u'DocField', + 'fieldname': u'amount', + 'fieldtype': u'Currency', + 'label': u'Amount*', + 'oldfieldname': u'amount', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, 'reqd': 0, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'warehouse', - 'fieldtype': 'Link', - 'label': 'Warehouse', - 'oldfieldname': 'warehouse', - 'oldfieldtype': 'Link', - 'options': 'Warehouse', + 'doctype': u'DocField', + 'fieldname': u'warehouse', + 'fieldtype': u'Link', + 'label': u'Warehouse', + 'oldfieldname': u'warehouse', + 'oldfieldtype': u'Link', + 'options': u'Warehouse', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client', - 'width': '100px' + 'trigger': u'Client', + 'width': u'100px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'serial_no', - 'fieldtype': 'Text', + 'doctype': u'DocField', + 'fieldname': u'serial_no', + 'fieldtype': u'Text', 'in_filter': 1, - 'label': 'Serial No', + 'label': u'Serial No', 'no_copy': 1, - 'oldfieldname': 'serial_no', - 'oldfieldtype': 'Text', + 'oldfieldname': u'serial_no', + 'oldfieldtype': u'Text', 'permlevel': 0, 'print_hide': 1, - 'trigger': 'Client' + 'trigger': u'Client' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'batch_no', - 'fieldtype': 'Link', - 'label': 'Batch No', - 'oldfieldname': 'batch_no', - 'oldfieldtype': 'Link', - 'options': 'Batch', + 'doctype': u'DocField', + 'fieldname': u'batch_no', + 'fieldtype': u'Link', + 'label': u'Batch No', + 'oldfieldname': u'batch_no', + 'oldfieldtype': u'Link', + 'options': u'Batch', 'permlevel': 0, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_group', - 'fieldtype': 'Link', - 'label': 'Item Group', - 'oldfieldname': 'item_group', - 'oldfieldtype': 'Link', - 'options': 'Item Group', + 'doctype': u'DocField', + 'fieldname': u'item_group', + 'fieldtype': u'Link', + 'hidden': 1, + 'label': u'Item Group', + 'oldfieldname': u'item_group', + 'oldfieldtype': u'Link', + 'options': u'Item Group', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'brand', - 'fieldtype': 'Link', - 'label': 'Brand Name', - 'oldfieldname': 'brand', - 'oldfieldtype': 'Link', - 'options': 'Brand', + 'doctype': u'DocField', + 'fieldname': u'brand', + 'fieldtype': u'Link', + 'hidden': 1, + 'label': u'Brand Name', + 'oldfieldname': u'brand', + 'oldfieldtype': u'Link', + 'options': u'Brand', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'installed_qty', - 'fieldtype': 'Currency', - 'label': 'Installed Qty', + 'doctype': u'DocField', + 'fieldname': u'actual_qty', + 'fieldtype': u'Currency', + 'label': u'Available Qty at Warehouse', 'no_copy': 1, - 'oldfieldname': 'installed_qty', - 'oldfieldtype': 'Currency', + 'oldfieldname': u'actual_qty', + 'oldfieldtype': u'Currency', 'permlevel': 1, 'print_hide': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'actual_qty', - 'fieldtype': 'Currency', - 'label': 'Available Qty at Warehouse', - 'no_copy': 1, - 'oldfieldname': 'actual_qty', - 'oldfieldtype': 'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': '150px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'billed_amt', - 'fieldtype': 'Currency', - 'label': 'Billed Amt', + 'doctype': u'DocField', + 'fieldname': u'billed_amt', + 'fieldtype': u'Currency', + 'label': u'Billed Amt', 'no_copy': 1, 'permlevel': 1, 'print_hide': 1, - 'width': '100px' + 'width': u'100px' }, # DocField { - 'colour': 'White:FFF', - 'doctype': 'DocField', - 'fieldname': 'prevdoc_docname', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'installed_qty', + 'fieldtype': u'Currency', + 'label': u'Installed Qty', + 'no_copy': 1, + 'oldfieldname': u'installed_qty', + 'oldfieldtype': u'Currency', + 'permlevel': 1, + 'print_hide': 1, + 'width': u'150px' + }, + + # DocField + { + 'allow_on_submit': 1, + 'colour': u'White:FFF', + 'default': u'0', + 'doctype': u'DocField', + 'fieldname': u'packed_qty', + 'fieldtype': u'Currency', + 'label': u'Packed Quantity', + 'no_copy': 1, + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'prevdoc_doctype', + 'fieldtype': u'Data', + 'hidden': 1, + 'in_filter': 1, + 'label': u'Document Type', + 'oldfieldname': u'prevdoc_doctype', + 'oldfieldtype': u'Data', + 'permlevel': 1, + 'print_hide': 1, + 'search_index': 1, + 'width': u'150px' + }, + + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'prevdoc_docname', + 'fieldtype': u'Data', 'hidden': 0, 'in_filter': 1, - 'label': 'Against Document No', + 'label': u'Against Document No', 'no_copy': 1, - 'oldfieldname': 'prevdoc_docname', - 'oldfieldtype': 'Data', + 'oldfieldname': u'prevdoc_docname', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, 'search_index': 1, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'prevdoc_doctype', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'prevdoc_date', + 'fieldtype': u'Date', 'hidden': 1, 'in_filter': 1, - 'label': 'Document Type', - 'oldfieldname': 'prevdoc_doctype', - 'oldfieldtype': 'Data', - 'permlevel': 1, - 'print_hide': 1, - 'search_index': 1, - 'width': '150px' - }, - - # DocField - { - 'doctype': 'DocField', - 'fieldname': 'prevdoc_date', - 'fieldtype': 'Date', - 'hidden': 1, - 'in_filter': 1, - 'label': 'Against Document Date', - 'oldfieldname': 'prevdoc_date', - 'oldfieldtype': 'Date', + 'label': u'Against Document Date', + 'oldfieldname': u'prevdoc_date', + 'oldfieldtype': u'Date', 'permlevel': 1, 'print_hide': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'prevdoc_detail_docname', - 'fieldtype': 'Data', + 'doctype': u'DocField', + 'fieldname': u'prevdoc_detail_docname', + 'fieldtype': u'Data', 'hidden': 1, 'in_filter': 1, - 'label': 'Against Document Detail No', - 'oldfieldname': 'prevdoc_detail_docname', - 'oldfieldtype': 'Data', + 'label': u'Against Document Detail No', + 'oldfieldname': u'prevdoc_detail_docname', + 'oldfieldtype': u'Data', 'permlevel': 1, 'print_hide': 1, 'search_index': 0, - 'width': '150px' + 'width': u'150px' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'item_tax_rate', - 'fieldtype': 'Small Text', + 'doctype': u'DocField', + 'fieldname': u'item_tax_rate', + 'fieldtype': u'Small Text', 'hidden': 1, - 'label': 'Item Tax Rate', - 'oldfieldname': 'item_tax_rate', - 'oldfieldtype': 'Small Text', + 'label': u'Item Tax Rate', + 'oldfieldname': u'item_tax_rate', + 'oldfieldtype': u'Small Text', 'permlevel': 1, 'print_hide': 1 }, @@ -409,26 +425,12 @@ # DocField { 'allow_on_submit': 1, - 'colour': 'White:FFF', - 'default': '0', - 'doctype': 'DocField', - 'fieldname': 'packed_qty', - 'fieldtype': 'Currency', - 'label': 'Packed Quantity', - 'no_copy': 1, - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': 'DocField', - 'fieldname': 'page_break', - 'fieldtype': 'Check', - 'label': 'Page Break', - 'oldfieldname': 'page_break', - 'oldfieldtype': 'Check', + 'doctype': u'DocField', + 'fieldname': u'page_break', + 'fieldtype': u'Check', + 'label': u'Page Break', + 'oldfieldname': u'page_break', + 'oldfieldtype': u'Check', 'permlevel': 0, 'print_hide': 1 }