mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 18:34:48 +00:00
Merge branch 'master' into sync
Conflicts: version.num
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:17',
|
'creation': '2010-08-08 17:09:17',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-05 10:54:12',
|
'modified': '2012-03-05 15:02:25',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 45
|
'version': 46
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -100,9 +100,9 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'purchase_ref_rate',
|
'fieldname': u'import_ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Ref Rate *',
|
'label': u'Ref Rate ',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
@@ -119,6 +119,43 @@
|
|||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'import_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Rate ',
|
||||||
|
'oldfieldname': u'import_rate',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 1,
|
||||||
|
'trigger': u'Client'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'import_amount',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Amount',
|
||||||
|
'oldfieldname': u'import_amount',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 1,
|
||||||
|
'reqd': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'purchase_ref_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Ref Rate *',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'trigger': u'Client'
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@@ -146,43 +183,6 @@
|
|||||||
'reqd': 1
|
'reqd': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_ref_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Ref Rate ',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'trigger': u'Client'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Rate ',
|
|
||||||
'oldfieldname': u'import_rate',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 0,
|
|
||||||
'reqd': 1,
|
|
||||||
'trigger': u'Client'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_amount',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Amount',
|
|
||||||
'oldfieldname': u'import_amount',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 1,
|
|
||||||
'reqd': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:18',
|
'creation': '2010-08-08 17:09:18',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-02 12:22:21',
|
'modified': '2012-03-06 11:05:53',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': u'1330593645',
|
'_last_update': u'1330671142',
|
||||||
'change_log': u'1. Change in pull_details method dt.-26-06-2009',
|
'change_log': u'1. Change in pull_details method dt.-26-06-2009',
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'default_print_format': u'Standard',
|
'default_print_format': u'Standard',
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'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',
|
'subject': u'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding',
|
||||||
'version': 415
|
'version': 416
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocFormat
|
# These values are common for all DocFormat
|
||||||
@@ -176,7 +176,6 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'default': u'INV',
|
|
||||||
'depends_on': u'eval:doc.retail_transaction!="Yes"',
|
'depends_on': u'eval:doc.retail_transaction!="Yes"',
|
||||||
'description': u'To manage multiple series please go to Setup > Manage Series',
|
'description': u'To manage multiple series please go to Setup > Manage Series',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:20',
|
'creation': '2010-08-08 17:09:20',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-05 10:50:03',
|
'modified': '2012-03-05 15:01:04',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 28
|
'version': 29
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -109,14 +109,17 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'base_ref_rate',
|
'fieldname': u'ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Price List Rate*',
|
'label': u'Price List Rate',
|
||||||
'oldfieldname': u'base_ref_rate',
|
'oldfieldname': u'ref_rate',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 1,
|
'permlevel': 0,
|
||||||
'print_hide': 1
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'trigger': u'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@@ -133,6 +136,43 @@
|
|||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'Client'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': 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
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
@@ -163,46 +203,6 @@
|
|||||||
'reqd': 1
|
'reqd': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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': u'Client'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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': u'Client'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:12',
|
'creation': '2010-08-08 17:09:12',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-05 10:50:51',
|
'modified': '2012-03-05 15:01:31',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 64
|
'version': 65
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -121,9 +121,9 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'purchase_ref_rate',
|
'fieldname': u'import_ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Ref Rate *',
|
'label': u'Ref Rate ',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
},
|
},
|
||||||
@@ -139,6 +139,41 @@
|
|||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'import_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'hidden': 0,
|
||||||
|
'label': u'Rate ',
|
||||||
|
'oldfieldname': u'import_rate',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'trigger': u'Client'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'import_amount',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Amount',
|
||||||
|
'oldfieldname': u'import_amount',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'purchase_ref_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Ref Rate *',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'default': u'0.00',
|
'default': u'0.00',
|
||||||
@@ -169,41 +204,6 @@
|
|||||||
'reqd': 1
|
'reqd': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_ref_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Ref Rate ',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'hidden': 0,
|
|
||||||
'label': u'Rate ',
|
|
||||||
'oldfieldname': u'import_rate',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 0,
|
|
||||||
'trigger': u'Client'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_amount',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Amount',
|
|
||||||
'oldfieldname': u'import_amount',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
|
|||||||
@@ -100,19 +100,19 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
|
|||||||
for (d in item_cols_import) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_import[d]+' ('+doc.currency+')');
|
for (d in item_cols_import) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_import[d]+' ('+doc.currency+')');
|
||||||
|
|
||||||
var hide = (doc.currency == sys_defaults['currency']) ? false : true;
|
var hide = (doc.currency == sys_defaults['currency']) ? false : true;
|
||||||
for (f in item_cols_import) {
|
for (f in item_cols_base) {
|
||||||
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
|
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
|
||||||
}
|
}
|
||||||
if (doc.doctype == 'Payable Voucher') {
|
if (doc.doctype == 'Payable Voucher') {
|
||||||
$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')');
|
$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')');
|
||||||
//cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide);
|
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide);
|
||||||
// advance table flds
|
// advance table flds
|
||||||
adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'}
|
adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'}
|
||||||
for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
|
for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')');
|
$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')');
|
||||||
//cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide);
|
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
//tax table flds
|
//tax table flds
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ feed_dict = {
|
|||||||
# Support
|
# Support
|
||||||
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
||||||
'Maintenance Visit':['To %(customer_name)s', '#4169E1'],
|
'Maintenance Visit':['To %(customer_name)s', '#4169E1'],
|
||||||
'Support Ticket': ['[%(status)s] %(subject)s', '#000080'],
|
'Support Ticket': ["[%(status)s] %(subject)s", '#000080'],
|
||||||
|
|
||||||
# Website
|
# Website
|
||||||
'Web Page': ['%(title)s', '#000080'],
|
'Web Page': ['%(title)s', '#000080'],
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ def add_user(args):
|
|||||||
# erpnext-saas
|
# erpnext-saas
|
||||||
if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
|
if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
|
||||||
from server_tools.gateway_utils import add_user_gateway
|
from server_tools.gateway_utils import add_user_gateway
|
||||||
add_user_gateway(args['user'])
|
add_user_gateway(args)
|
||||||
|
|
||||||
add_profile(args)
|
add_profile(args)
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ def execute():
|
|||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.modules.module_manager import reload_doc
|
from webnotes.modules.module_manager import reload_doc
|
||||||
reload_doc('selling', 'doctype', 'quotation_detail')
|
reload_doc('selling', 'doctype', 'quotation_detail')
|
||||||
|
reload_doc('selling', 'doctype', 'sales_order_detail')
|
||||||
reload_doc('stock', 'doctype', 'delivery_note_detail')
|
reload_doc('stock', 'doctype', 'delivery_note_detail')
|
||||||
reload_doc('stock', 'doctype', 'purchase_receipt_detail')
|
reload_doc('stock', 'doctype', 'purchase_receipt_detail')
|
||||||
reload_doc('buying', 'doctype', 'po_detail')
|
reload_doc('buying', 'doctype', 'po_detail')
|
||||||
reload_doc('accounts', 'doctype', 'rv_detail')
|
reload_doc('accounts', 'doctype', 'rv_detail')
|
||||||
reload_doc('accounts', 'doctype', 'pv_detail')
|
reload_doc('accounts', 'doctype', 'pv_detail')
|
||||||
|
|
||||||
|
|||||||
3
erpnext/patches/jan_mar_2012/remove_series_defval.py
Normal file
3
erpnext/patches/jan_mar_2012/remove_series_defval.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
webnotes.conn.sql("update `tabDocField` set `default`='' where parent = 'Receivable Voucher' and fieldname = 'naming_series' and `default` = 'INV'")
|
||||||
@@ -177,5 +177,10 @@ patch_list = [
|
|||||||
'patch_file': 'reload_table',
|
'patch_file': 'reload_table',
|
||||||
'description': 'Relaod all item table: fld order changes'
|
'description': 'Relaod all item table: fld order changes'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.jan_mar_2012',
|
||||||
|
'patch_file': 'remove_series_defval',
|
||||||
|
'description': 'Remove rv series default value'
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:18',
|
'creation': '2010-08-08 17:09:18',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-05 10:48:27',
|
'modified': '2012-03-05 15:00:10',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 32
|
'version': 33
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -110,14 +110,17 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'default': u'0.00',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'base_ref_rate',
|
'fieldname': u'ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Price List Rate*',
|
'label': u'Price List Rate',
|
||||||
'oldfieldname': u'base_ref_rate',
|
'oldfieldname': u'ref_rate',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 1,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'trigger': u'Client',
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -136,58 +139,6 @@
|
|||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'default': u'0.00',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'basic_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'in_filter': 0,
|
|
||||||
'label': u'Basic Rate*',
|
|
||||||
'oldfieldname': u'basic_rate',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 0,
|
|
||||||
'search_index': 0,
|
|
||||||
'trigger': u'Client',
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'default': u'0.00',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'amount',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'in_filter': 0,
|
|
||||||
'label': u'Amount*',
|
|
||||||
'oldfieldname': u'amount',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 1,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 0,
|
|
||||||
'search_index': 0,
|
|
||||||
'trigger': u'Client',
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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
|
# DocField
|
||||||
{
|
{
|
||||||
'default': u'0.00',
|
'default': u'0.00',
|
||||||
@@ -223,6 +174,55 @@
|
|||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'default': u'0.00',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'basic_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'in_filter': 0,
|
||||||
|
'label': u'Basic Rate*',
|
||||||
|
'oldfieldname': u'basic_rate',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 0,
|
||||||
|
'trigger': u'Client',
|
||||||
|
'width': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'default': u'0.00',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'amount',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'in_filter': 0,
|
||||||
|
'label': u'Amount*',
|
||||||
|
'oldfieldname': u'amount',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 1,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 0,
|
||||||
|
'trigger': u'Client',
|
||||||
|
'width': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
|
|||||||
for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')');
|
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;
|
var hide = (doc.currency == sys_defaults['currency']) ? false : true;
|
||||||
for (f in item_cols_export) {
|
for (f in item_cols_base) {
|
||||||
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
|
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -658,10 +658,10 @@ cur_frm.cscript.update_fname_table = function(doc , tname , fname , n, other_fna
|
|||||||
'basic_rate': flt(flt(cl[i].export_rate) * flt(doc.conversion_rate)),
|
'basic_rate': flt(flt(cl[i].export_rate) * flt(doc.conversion_rate)),
|
||||||
'amount': roundNumber(flt((flt(cl[i].export_rate) * flt(doc.conversion_rate)) * flt(cl[i].qty)), 2)
|
'amount': roundNumber(flt((flt(cl[i].export_rate) * flt(doc.conversion_rate)) * flt(cl[i].qty)), 2)
|
||||||
}, fname);
|
}, fname);
|
||||||
var base_ref_rate = flt(cl[i].basic_rate) + flt(flt(cl[i].basic_rate) * flt(cl[i].adj_rate) / 100);
|
//var base_ref_rate = flt(cl[i].basic_rate) + flt(flt(cl[i].basic_rate) * flt(cl[i].adj_rate) / 100);
|
||||||
set_multiple(tname, cl[i].name, {
|
//set_multiple(tname, cl[i].name, {
|
||||||
'base_ref_rate': flt(base_ref_rate)
|
// 'base_ref_rate': flt(base_ref_rate)
|
||||||
}, fname);
|
//}, fname);
|
||||||
|
|
||||||
} else if(consider_incl_rate) {
|
} else if(consider_incl_rate) {
|
||||||
if(flt(cl[i].export_rate) > 0) {
|
if(flt(cl[i].export_rate) > 0) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:22',
|
'creation': '2010-08-08 17:09:22',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-02 15:49:26',
|
'modified': '2012-03-05 14:59:43',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 53
|
'version': 54
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -117,15 +117,18 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'default': u'0.00',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'base_ref_rate',
|
'fieldname': u'ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Price List Rate*',
|
'label': u'Price List Rate',
|
||||||
'oldfieldname': u'base_ref_rate',
|
'oldfieldname': u'ref_rate',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 1,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'width': u'100px'
|
'reqd': 0,
|
||||||
|
'trigger': u'Client',
|
||||||
|
'width': u'70px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@@ -143,54 +146,6 @@
|
|||||||
'width': u'70px'
|
'width': u'70px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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': u'Client',
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'default': u'0.00',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'amount',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Amount*',
|
|
||||||
'no_copy': 0,
|
|
||||||
'oldfieldname': u'amount',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 1,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 0,
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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'70px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'default': u'0.00',
|
'default': u'0.00',
|
||||||
@@ -221,6 +176,51 @@
|
|||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'Client',
|
||||||
|
'width': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'default': u'0.00',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'amount',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Amount*',
|
||||||
|
'no_copy': 0,
|
||||||
|
'oldfieldname': u'amount',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 1,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'width': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
|
|||||||
@@ -282,7 +282,8 @@ class DocType:
|
|||||||
Returns start and end date depending on the frequency of email digest
|
Returns start and end date depending on the frequency of email digest
|
||||||
"""
|
"""
|
||||||
from datetime import datetime, date, timedelta
|
from datetime import datetime, date, timedelta
|
||||||
today = datetime.now().date()
|
from webnotes.utils import now_datetime
|
||||||
|
today = now_datetime().date()
|
||||||
year, month, day = today.year, today.month, today.day
|
year, month, day = today.year, today.month, today.day
|
||||||
|
|
||||||
if self.doc.frequency == 'Daily':
|
if self.doc.frequency == 'Daily':
|
||||||
@@ -409,6 +410,7 @@ class DocType:
|
|||||||
|
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
try:
|
try:
|
||||||
|
#webnotes.msgprint('in send')
|
||||||
sendmail(
|
sendmail(
|
||||||
recipients=recipient_list,
|
recipients=recipient_list,
|
||||||
sender='notifications+email_digest@erpnext.com',
|
sender='notifications+email_digest@erpnext.com',
|
||||||
@@ -419,64 +421,22 @@ class DocType:
|
|||||||
)
|
)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
webnotes.msgprint('There was a problem in sending your email. Please contact support@erpnext.com')
|
webnotes.msgprint('There was a problem in sending your email. Please contact support@erpnext.com')
|
||||||
#webnotes.errprint(webnotes.getTraceback())
|
webnotes.errprint(webnotes.getTraceback())
|
||||||
|
|
||||||
|
|
||||||
def get_next_sending(self):
|
def get_next_sending(self):
|
||||||
"""
|
|
||||||
|
|
||||||
"""
|
|
||||||
# Get TimeZone
|
|
||||||
# Get System TimeZone
|
|
||||||
import time
|
|
||||||
from pytz import timezone
|
|
||||||
import datetime
|
import datetime
|
||||||
import webnotes.defs
|
|
||||||
cp = webnotes.model.doc.Document('Control Panel','Control Panel')
|
|
||||||
app_tz = timezone(cp.time_zone)
|
|
||||||
server_tz = timezone(getattr(webnotes.defs, 'system_timezone'))
|
|
||||||
|
|
||||||
start_date, end_date = self.get_start_end_dates()
|
start_date, end_date = self.get_start_end_dates()
|
||||||
|
|
||||||
new_date = end_date + datetime.timedelta(days=1)
|
send_date = end_date + datetime.timedelta(days=1)
|
||||||
new_time = datetime.time(hour=6)
|
|
||||||
|
|
||||||
naive_dt = datetime.datetime.combine(new_date, new_time)
|
|
||||||
app_dt = app_tz.localize(naive_dt)
|
|
||||||
server_dt = server_tz.normalize(app_dt.astimezone(server_tz))
|
|
||||||
|
|
||||||
res = {
|
|
||||||
'app_dt': app_dt.replace(tzinfo=None),
|
|
||||||
'app_tz': app_tz,
|
|
||||||
'server_dt': server_dt.replace(tzinfo=None),
|
|
||||||
'server_tz': server_tz
|
|
||||||
}
|
|
||||||
|
|
||||||
from webnotes.utils import formatdate
|
from webnotes.utils import formatdate
|
||||||
str_date = formatdate(str(res['app_dt'].date()))
|
str_date = formatdate(str(send_date))
|
||||||
str_time = res['app_dt'].time().strftime('%I:%M')
|
|
||||||
|
|
||||||
self.doc.next_send = str_date + " at about " + str_time
|
self.doc.next_send = str_date + " at midnight"
|
||||||
|
|
||||||
return res
|
return send_date
|
||||||
|
|
||||||
|
|
||||||
def get_next_execution(self):
|
|
||||||
"""
|
|
||||||
|
|
||||||
"""
|
|
||||||
from datetime import datetime, timedelta
|
|
||||||
dt_args = self.get_next_sending()
|
|
||||||
server_dt = dt_args['server_dt']
|
|
||||||
now_dt = datetime.now(dt_args['server_tz'])
|
|
||||||
if now_dt.time() <= server_dt.time():
|
|
||||||
next_date = now_dt.date()
|
|
||||||
else:
|
|
||||||
next_date = now_dt.date() + timedelta(days=1)
|
|
||||||
|
|
||||||
next_time = server_dt.time()
|
|
||||||
|
|
||||||
return datetime.combine(next_date, next_time)
|
|
||||||
|
|
||||||
|
|
||||||
def onload(self):
|
def onload(self):
|
||||||
@@ -743,21 +703,16 @@ def send():
|
|||||||
""", as_list=1)
|
""", as_list=1)
|
||||||
|
|
||||||
from webnotes.model.code import get_obj
|
from webnotes.model.code import get_obj
|
||||||
from datetime import datetime, timedelta
|
from webnotes.utils import now_datetime
|
||||||
now = datetime.now()
|
|
||||||
now_date = now.date()
|
now_date = now_datetime().date()
|
||||||
now_time = (now + timedelta(hours=2)).time()
|
|
||||||
|
|
||||||
for ed in edigest_list:
|
for ed in edigest_list:
|
||||||
if ed[0]:
|
if ed[0]:
|
||||||
ed_obj = get_obj('Email Digest', ed[0])
|
ed_obj = get_obj('Email Digest', ed[0])
|
||||||
ed_obj.sending = True
|
ed_obj.sending = True
|
||||||
dt_dict = ed_obj.get_next_sending()
|
send_date = ed_obj.get_next_sending()
|
||||||
send_date = dt_dict['server_dt'].date()
|
#webnotes.msgprint([ed[0], now_date, send_date])
|
||||||
send_time = dt_dict['server_dt'].time()
|
|
||||||
|
|
||||||
if (now_date == send_date):
|
if (now_date == send_date):
|
||||||
#webnotes.msgprint('sending ' + ed_obj.doc.name)
|
|
||||||
ed_obj.send()
|
ed_obj.send()
|
||||||
#else:
|
|
||||||
# webnotes.msgprint('not sending ' + ed_obj.doc.name)
|
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ class DocType:
|
|||||||
"""
|
"""
|
||||||
Update value in control panel
|
Update value in control panel
|
||||||
"""
|
"""
|
||||||
if self.doc.fields.get(key):
|
webnotes.conn.set_value('Control Panel', None, key,
|
||||||
webnotes.conn.set_value('Control Panel', None, key, self.doc.fields[key])
|
self.doc.fields.get(key))
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
"""
|
"""
|
||||||
@@ -117,19 +117,7 @@ class DocType:
|
|||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
"""
|
"""
|
||||||
Sets or cancels the event in the scheduler
|
update control panel
|
||||||
"""
|
"""
|
||||||
# update control panel
|
|
||||||
for f in ('outgoing_mail_server', 'mail_login', 'mail_password', 'auto_email_id', 'mail_port', 'use_ssl'):
|
for f in ('outgoing_mail_server', 'mail_login', 'mail_password', 'auto_email_id', 'mail_port', 'use_ssl'):
|
||||||
self.set_cp_value(f)
|
self.set_cp_value(f)
|
||||||
|
|
||||||
# setup scheduler for support emails
|
|
||||||
if cint(self.doc.sync_support_mails):
|
|
||||||
if not (self.doc.support_host and self.doc.support_username and self.doc.support_password):
|
|
||||||
webnotes.msgprint("You must give the incoming POP3 settings for support emails to activiate mailbox integration", raise_exception=1)
|
|
||||||
|
|
||||||
from webnotes.utils.scheduler import set_event
|
|
||||||
set_event('support.doctype.support_ticket.get_support_mails', 60*5, 1)
|
|
||||||
else:
|
|
||||||
from webnotes.utils.scheduler import cancel_event
|
|
||||||
cancel_event('support.doctype.support_ticket.get_support_mails')
|
|
||||||
|
|||||||
@@ -122,18 +122,18 @@ pscript.feature_dict = {
|
|||||||
'Sales Order': {'sales_order_details':['page_break']}
|
'Sales Order': {'sales_order_details':['page_break']}
|
||||||
},
|
},
|
||||||
'fs_exports': {
|
'fs_exports': {
|
||||||
'Delivery Note': {'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['ref_rate','export_amount','export_rate']},
|
'Delivery Note': {'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','amount','basic_rate']},
|
||||||
'POS Setting': {'fields':['conversion_rate','currency']},
|
'POS Setting': {'fields':['conversion_rate','currency']},
|
||||||
'Quotation': {'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['ref_rate','export_amount','export_rate']},
|
'Quotation': {'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','amount','basic_rate']},
|
||||||
'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['ref_rate','export_amount','export_rate']},
|
'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','amount','basic_rate']},
|
||||||
'Item': {'ref_rate_details':['ref_currency']},
|
'Item': {'ref_rate_details':['ref_currency']},
|
||||||
'Sales BOM': {'fields':['currency']},
|
'Sales BOM': {'fields':['currency']},
|
||||||
'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['ref_rate','export_amount','export_rate']}
|
'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','amount','basic_rate']}
|
||||||
},
|
},
|
||||||
'fs_imports': {
|
'fs_imports': {
|
||||||
'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['import_amount','import_rate']},
|
'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['purchase_ref_rate', 'amount','rate']},
|
||||||
'Purchase Order': {'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['import_amount','import_rate']},
|
'Purchase Order': {'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['purchase_ref_rate', 'amount','purchase_rate']},
|
||||||
'Purchase Receipt': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['import_amount','import_rate']},
|
'Purchase Receipt': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['purchase_ref_rate','amount','purchase_rate']},
|
||||||
'Supplier Quotation': {'fields':['conversion_rate','currency']}
|
'Supplier Quotation': {'fields':['conversion_rate','currency']}
|
||||||
},
|
},
|
||||||
'fs_item_advanced': {
|
'fs_item_advanced': {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:08:58',
|
'creation': '2010-08-08 17:08:58',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-05 10:49:39',
|
'modified': '2012-03-05 15:00:39',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 55
|
'version': 56
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -117,14 +117,18 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'default': u'0.00',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'base_ref_rate',
|
'fieldname': u'ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Price List Rate*',
|
'label': u'Price List Rate',
|
||||||
'oldfieldname': u'base_ref_rate',
|
'no_copy': 0,
|
||||||
|
'oldfieldname': u'ref_rate',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 1,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'trigger': u'Client',
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -143,53 +147,6 @@
|
|||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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': u'Client',
|
|
||||||
'width': u'150px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'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': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'default': u'0.00',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'ref_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Price List Rate',
|
|
||||||
'no_copy': 0,
|
|
||||||
'oldfieldname': u'ref_rate',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 0,
|
|
||||||
'trigger': u'Client',
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@@ -219,6 +176,49 @@
|
|||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'Client',
|
||||||
|
'width': u'150px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'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': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:16',
|
'creation': '2010-08-08 17:09:16',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-05 10:51:18',
|
'modified': '2012-03-05 17:44:23',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
'section_style': u'Tray',
|
'section_style': u'Tray',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 76
|
'version': 78
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -135,9 +135,9 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'purchase_ref_rate',
|
'fieldname': u'import_ref_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
'label': u'Ref Rate *',
|
'label': u'Ref Rate ',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
},
|
},
|
||||||
@@ -152,6 +152,43 @@
|
|||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'default': u'0.00',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'import_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Rate',
|
||||||
|
'oldfieldname': u'import_rate',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'trigger': u'Client',
|
||||||
|
'width': u'100px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'import_amount',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Amount',
|
||||||
|
'oldfieldname': u'import_amount',
|
||||||
|
'oldfieldtype': u'Currency',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'purchase_ref_rate',
|
||||||
|
'fieldtype': u'Currency',
|
||||||
|
'label': u'Ref Rate *',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
@@ -185,43 +222,6 @@
|
|||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_ref_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Ref Rate ',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'default': u'0.00',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_rate',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Rate',
|
|
||||||
'oldfieldname': u'import_rate',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 0,
|
|
||||||
'trigger': u'Client',
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'import_amount',
|
|
||||||
'fieldtype': u'Currency',
|
|
||||||
'label': u'Amount',
|
|
||||||
'oldfieldname': u'import_amount',
|
|
||||||
'oldfieldtype': u'Currency',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
'oldfieldname': u'serial_no',
|
'oldfieldname': u'serial_no',
|
||||||
'oldfieldtype': u'Text',
|
'oldfieldtype': u'Text',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 0,
|
||||||
'report_hide': 0
|
'report_hide': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<p class="help">Single unit of an Item</p>
|
<p class="help">Single unit of an Item</p>
|
||||||
<h4><a href="#!List/Batch">Batch</a></h4>
|
<h4><a href="#!List/Batch">Batch</a></h4>
|
||||||
<p class="help">Batch of units of an Item</p>
|
<p class="help">Batch of units of an Item</p>
|
||||||
<h4><a href="#!List/Item">Warehouse</a></h4>
|
<h4><a href="#!List/Warehouse">Warehouse</a></h4>
|
||||||
<p class="help">Warehouse is where items are stored</p>
|
<p class="help">Warehouse is where items are stored</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both"></div>
|
<div style="clear: both"></div>
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
st.make_response_record(content, mail.mail['From'], content_type)
|
st.make_response_record(content, mail.mail['From'], content_type)
|
||||||
webnotes.conn.set(st.doc, 'status', 'Open')
|
webnotes.conn.set(st.doc, 'status', 'Open')
|
||||||
update_feed(st.doc, 'on_update')
|
update_feed(st.doc, 'on_update')
|
||||||
|
webnotes.conn.commit()
|
||||||
# extract attachments
|
# extract attachments
|
||||||
self.save_attachments(st.doc, mail.attachments)
|
self.save_attachments(st.doc, mail.attachments)
|
||||||
return
|
return
|
||||||
@@ -99,18 +100,19 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
d.naming_series = (opts and opts[0] and opts[0][0] and opts[0][0].split("\n")[0]) or 'SUP'
|
d.naming_series = (opts and opts[0] and opts[0][0] and opts[0][0].split("\n")[0]) or 'SUP'
|
||||||
try:
|
try:
|
||||||
d.save(1)
|
d.save(1)
|
||||||
|
except:
|
||||||
|
d.description = 'Unable to extract message'
|
||||||
|
d.save(1)
|
||||||
|
|
||||||
|
else:
|
||||||
# update feed
|
# update feed
|
||||||
update_feed(d, 'on_update')
|
update_feed(d, 'on_update')
|
||||||
|
|
||||||
# send auto reply
|
# send auto reply
|
||||||
self.send_auto_reply(d)
|
self.send_auto_reply(d)
|
||||||
|
|
||||||
except:
|
webnotes.conn.commit()
|
||||||
d.description = 'Unable to extract message'
|
|
||||||
d.save(1)
|
|
||||||
|
|
||||||
else:
|
|
||||||
# extract attachments
|
# extract attachments
|
||||||
self.save_attachments(d, mail.attachments)
|
self.save_attachments(d, mail.attachments)
|
||||||
|
|
||||||
@@ -138,9 +140,10 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
"""
|
"""
|
||||||
Send auto reply to emails
|
Send auto reply to emails
|
||||||
"""
|
"""
|
||||||
signature = self.email_settings.support_signature
|
from webnotes.utils import cstr
|
||||||
|
signature = self.email_settings.fields.get('support_signature') or ''
|
||||||
|
|
||||||
response = self.email_settings.support_autoreply or ("""
|
response = self.email_settings.fields.get('support_autoreply') or ("""
|
||||||
A new Ticket has been raised for your query. If you have any additional information, please
|
A new Ticket has been raised for your query. If you have any additional information, please
|
||||||
reply back to this mail.
|
reply back to this mail.
|
||||||
|
|
||||||
@@ -148,15 +151,15 @@ We will get back to you as soon as possible
|
|||||||
|
|
||||||
[This is an automatic response]
|
[This is an automatic response]
|
||||||
|
|
||||||
""" + (signature or ''))
|
""" + cstr(signature))
|
||||||
|
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
|
|
||||||
sendmail(\
|
sendmail(\
|
||||||
recipients = [d.raised_by], \
|
recipients = [cstr(d.raised_by)], \
|
||||||
sender = self.email_settings.support_email, \
|
sender = cstr(self.email_settings.fields.get('support_email')), \
|
||||||
subject = '['+d.name+'] ' + cstr(d.subject), \
|
subject = '['+cstr(d.name)+'] ' + cstr(d.subject), \
|
||||||
msg = response)
|
msg = cstr(response))
|
||||||
|
|
||||||
def auto_close_tickets(self):
|
def auto_close_tickets(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
819
|
821
|
||||||
|
|||||||
Reference in New Issue
Block a user