Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi 2012-09-27 13:06:23 +05:30
commit 4bfbee8281
3 changed files with 169 additions and 144 deletions

View File

@ -3,11 +3,11 @@
# These values are common in all dictionaries # These values are common in all dictionaries
{ {
'creation': '2012-07-11 11:54:24', u'creation': '2012-09-18 11:20:27',
'docstatus': 0, u'docstatus': 0,
'modified': '2012-07-16 16:24:26', u'modified': '2012-09-26 13:05:15',
'modified_by': u'Administrator', u'modified_by': u'Administrator',
'owner': u'Administrator' u'owner': u'Administrator'
}, },
# These values are common for all DocType # These values are common for all DocType
@ -16,13 +16,13 @@
'allow_attach': 1, 'allow_attach': 1,
'colour': u'White:FFF', 'colour': u'White:FFF',
'default_print_format': u'Standard', 'default_print_format': u'Standard',
'doctype': 'DocType', u'doctype': u'DocType',
'document_type': u'Transaction', 'document_type': u'Transaction',
'is_submittable': 1, 'is_submittable': 1,
'is_transaction_doc': 1, 'is_transaction_doc': 1,
'issingle': 0, 'issingle': 0,
'module': u'Selling', 'module': u'Selling',
'name': '__common__', u'name': u'__common__',
'read_only_onload': 1, 'read_only_onload': 1,
'search_fields': u'status,transaction_date,customer,customer_name, territory,order_type,company', 'search_fields': u'status,transaction_date,customer,customer_name, territory,order_type,company',
'section_style': u'Tabbed', 'section_style': u'Tabbed',
@ -35,8 +35,8 @@
# These values are common for all DocField # These values are common for all DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'name': '__common__', u'name': u'__common__',
'parent': u'Sales Order', 'parent': u'Sales Order',
'parentfield': u'fields', 'parentfield': u'fields',
'parenttype': u'DocType' 'parenttype': u'DocType'
@ -44,24 +44,23 @@
# These values are common for all DocPerm # These values are common for all DocPerm
{ {
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'name': '__common__', u'name': u'__common__',
'parent': u'Sales Order', 'parent': u'Sales Order',
'parentfield': u'permissions', 'parentfield': u'permissions',
'parenttype': u'DocType', 'parenttype': u'DocType'
'read': 1
}, },
# DocType, Sales Order # DocType, Sales Order
{ {
'doctype': 'DocType', u'doctype': u'DocType',
'name': u'Sales Order' u'name': u'Sales Order'
}, },
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'basic_info', 'fieldname': u'basic_info',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Basic Info', 'label': u'Basic Info',
@ -72,7 +71,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break0', 'fieldname': u'column_break0',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'in_filter': 0, 'in_filter': 0,
@ -86,7 +85,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'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', u'doctype': u'DocField',
'fieldname': u'naming_series', 'fieldname': u'naming_series',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Series', 'label': u'Series',
@ -103,7 +102,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Select Customer', 'description': u'Select Customer',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'customer', 'fieldname': u'customer',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -120,7 +119,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'customer_name', 'fieldname': u'customer_name',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 1, 'hidden': 1,
@ -130,7 +129,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'address_display', 'fieldname': u'address_display',
'fieldtype': u'Small Text', 'fieldtype': u'Small Text',
'hidden': 1, 'hidden': 1,
@ -140,7 +139,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'contact_display', 'fieldname': u'contact_display',
'fieldtype': u'Small Text', 'fieldtype': u'Small Text',
'hidden': 1, 'hidden': 1,
@ -150,7 +149,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'contact_mobile', 'fieldname': u'contact_mobile',
'fieldtype': u'Text', 'fieldtype': u'Text',
'hidden': 1, 'hidden': 1,
@ -160,7 +159,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'contact_email', 'fieldname': u'contact_email',
'fieldtype': u'Text', 'fieldtype': u'Text',
'hidden': 1, 'hidden': 1,
@ -173,7 +172,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'default': u'Sales', 'default': u'Sales',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'order_type', 'fieldname': u'order_type',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Order Type', 'label': u'Order Type',
@ -187,7 +186,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break1', 'fieldname': u'column_break1',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break', 'oldfieldtype': u'Column Break',
@ -199,7 +198,7 @@
{ {
'default': u'Today', 'default': u'Today',
'description': u'The date at which current entry is made in system.', 'description': u'The date at which current entry is made in system.',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'transaction_date', 'fieldname': u'transaction_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'in_filter': 1, 'in_filter': 1,
@ -218,7 +217,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u"eval:doc.order_type == 'Sales'", 'depends_on': u"eval:doc.order_type == 'Sales'",
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'delivery_date', 'fieldname': u'delivery_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'hidden': 0, 'hidden': 0,
@ -237,7 +236,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Purchase Order sent by customer', 'description': u'Purchase Order sent by customer',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'po_no', 'fieldname': u'po_no',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 0, 'hidden': 0,
@ -254,7 +253,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u'eval:doc.po_no', 'depends_on': u'eval:doc.po_no',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'po_date', 'fieldname': u'po_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'hidden': 0, 'hidden': 0,
@ -269,7 +268,8 @@
# DocField # DocField
{ {
'doctype': u'DocField', 'colour': u'White:FFF',
u'doctype': u'DocField',
'fieldname': u'shipping_address_name', 'fieldname': u'shipping_address_name',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 1, 'hidden': 1,
@ -282,9 +282,11 @@
# DocField # DocField
{ {
'doctype': u'DocField', 'colour': u'White:FFF',
u'doctype': u'DocField',
'fieldname': u'shipping_address', 'fieldname': u'shipping_address',
'fieldtype': u'Small Text', 'fieldtype': u'Small Text',
'hidden': 1,
'in_filter': 0, 'in_filter': 0,
'label': u'Shipping Address', 'label': u'Shipping Address',
'permlevel': 1, 'permlevel': 1,
@ -294,7 +296,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'items', 'fieldname': u'items',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Items', 'label': u'Items',
@ -306,7 +308,7 @@
{ {
'allow_on_submit': 1, 'allow_on_submit': 1,
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'sales_order_details', 'fieldname': u'sales_order_details',
'fieldtype': u'Table', 'fieldtype': u'Table',
'label': u'Sales Order Items', 'label': u'Sales Order Items',
@ -319,7 +321,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'section_break0', 'fieldname': u'section_break0',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'permlevel': 0 'permlevel': 0
@ -327,7 +329,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'col_break20', 'fieldname': u'col_break20',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -336,7 +338,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'net_total', 'fieldname': u'net_total',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Net Total*', 'label': u'Net Total*',
@ -350,7 +352,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'recalculate_values', 'fieldname': u'recalculate_values',
'fieldtype': u'Button', 'fieldtype': u'Button',
'label': u'Re-Calculate Values', 'label': u'Re-Calculate Values',
@ -363,7 +365,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'col_break_21', 'fieldname': u'col_break_21',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -374,7 +376,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Quotation no against which this Sales Order is made ', 'description': u'Quotation no against which this Sales Order is made ',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'quotation_no', 'fieldname': u'quotation_no',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -394,7 +396,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u'eval:doc.quotation_no', 'depends_on': u'eval:doc.quotation_no',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'quotation_date', 'fieldname': u'quotation_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'hidden': 1, 'hidden': 1,
@ -410,7 +412,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'pull_quotation_details', 'fieldname': u'pull_quotation_details',
'fieldtype': u'Button', 'fieldtype': u'Button',
'label': u'Pull Quotation Items', 'label': u'Pull Quotation Items',
@ -422,7 +424,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'sec_break45', 'fieldname': u'sec_break45',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Price List and Currency', 'label': u'Price List and Currency',
@ -433,7 +435,7 @@
{ {
'colour': u'White:FFF', '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.', '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', u'doctype': u'DocField',
'fieldname': u'price_list_name', 'fieldname': u'price_list_name',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Price List', 'label': u'Price List',
@ -450,7 +452,7 @@
# DocField # DocField
{ {
'description': u'Select the currency in which price list is maintained', 'description': u'Select the currency in which price list is maintained',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'price_list_currency', 'fieldname': u'price_list_currency',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Price List Currency', 'label': u'Price List Currency',
@ -464,7 +466,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u"Rate at which Price list currency is converted to company's base currency", 'description': u"Rate at which Price list currency is converted to company's base currency",
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'plc_conversion_rate', 'fieldname': u'plc_conversion_rate',
'fieldtype': u'Float', 'fieldtype': u'Float',
'label': u'Price List Currency Conversion Rate', 'label': u'Price List Currency Conversion Rate',
@ -475,7 +477,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break2', 'fieldname': u'column_break2',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -486,7 +488,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u"Customer's currency", 'description': u"Customer's currency",
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'currency', 'fieldname': u'currency',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Currency', 'label': u'Currency',
@ -504,7 +506,7 @@
'colour': u'White:FFF', 'colour': u'White:FFF',
'default': u'1.00', 'default': u'1.00',
'description': u"Rate at which customer's currency is converted to company's base currency", 'description': u"Rate at which customer's currency is converted to company's base currency",
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'conversion_rate', 'fieldname': u'conversion_rate',
'fieldtype': u'Float', 'fieldtype': u'Float',
'label': u'Conversion Rate', 'label': u'Conversion Rate',
@ -520,7 +522,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'taxes', 'fieldname': u'taxes',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Taxes', 'label': u'Taxes',
@ -531,7 +533,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'charge', 'fieldname': u'charge',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Sales Taxes and Charges', 'label': u'Sales Taxes and Charges',
@ -544,7 +546,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'get_charges', 'fieldname': u'get_charges',
'fieldtype': u'Button', 'fieldtype': u'Button',
'label': u'Get Taxes and Charges', 'label': u'Get Taxes and Charges',
@ -555,7 +557,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'other_charges', 'fieldname': u'other_charges',
'fieldtype': u'Table', 'fieldtype': u'Table',
'label': u'Sales Taxes and Charges', 'label': u'Sales Taxes and Charges',
@ -567,7 +569,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'calculate_charges', 'fieldname': u'calculate_charges',
'fieldtype': u'Button', 'fieldtype': u'Button',
'label': u'Calculate Taxes and Charges', 'label': u'Calculate Taxes and Charges',
@ -579,7 +581,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'other_charges_total', 'fieldname': u'other_charges_total',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Taxes and Charges Total*', 'label': u'Taxes and Charges Total*',
@ -592,7 +594,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'other_charges_calculation', 'fieldname': u'other_charges_calculation',
'fieldtype': u'HTML', 'fieldtype': u'HTML',
'label': u'Taxes and Charges Calculation', 'label': u'Taxes and Charges Calculation',
@ -604,7 +606,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'totals', 'fieldname': u'totals',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Totals', 'label': u'Totals',
@ -615,7 +617,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'grand_total', 'fieldname': u'grand_total',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Grand Total*', 'label': u'Grand Total*',
@ -629,7 +631,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'rounded_total', 'fieldname': u'rounded_total',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Rounded Total', 'label': u'Rounded Total',
@ -644,7 +646,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'In Words will be visible once you save the Sales Order.', 'description': u'In Words will be visible once you save the Sales Order.',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'in_words', 'fieldname': u'in_words',
'fieldtype': u'Data', 'fieldtype': u'Data',
'label': u'In Words', 'label': u'In Words',
@ -657,7 +659,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break3', 'fieldname': u'column_break3',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break', 'oldfieldtype': u'Column Break',
@ -668,7 +670,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'grand_total_export', 'fieldname': u'grand_total_export',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Grand Total (Export)', 'label': u'Grand Total (Export)',
@ -682,7 +684,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'rounded_total_export', 'fieldname': u'rounded_total_export',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Rounded Total (Export)', 'label': u'Rounded Total (Export)',
@ -696,7 +698,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'in_words_export', 'fieldname': u'in_words_export',
'fieldtype': u'Data', 'fieldtype': u'Data',
'label': u'In Words (Export)', 'label': u'In Words (Export)',
@ -710,7 +712,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'terms_section_break', 'fieldname': u'terms_section_break',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Terms and Conditions', 'label': u'Terms and Conditions',
@ -721,7 +723,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'tc_name', 'fieldname': u'tc_name',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Select Terms and Conditions', 'label': u'Select Terms and Conditions',
@ -735,7 +737,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'get_terms', 'fieldname': u'get_terms',
'fieldtype': u'Button', 'fieldtype': u'Button',
'label': u'Get Terms and Conditions', 'label': u'Get Terms and Conditions',
@ -747,7 +749,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'terms_html', 'fieldname': u'terms_html',
'fieldtype': u'HTML', 'fieldtype': u'HTML',
'label': u'Terms and Conditions HTML', 'label': u'Terms and Conditions HTML',
@ -759,7 +761,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'terms', 'fieldname': u'terms',
'fieldtype': u'Text Editor', 'fieldtype': u'Text Editor',
'label': u'Terms and Conditions Details', 'label': u'Terms and Conditions Details',
@ -771,7 +773,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'contact_info', 'fieldname': u'contact_info',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Contact Info', 'label': u'Contact Info',
@ -780,7 +782,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'col_break45', 'fieldname': u'col_break45',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -789,7 +791,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'customer_address', 'fieldname': u'customer_address',
'fieldtype': u'Link', 'fieldtype': u'Link',
'hidden': 0, 'hidden': 0,
@ -802,7 +804,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'contact_person', 'fieldname': u'contact_person',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -814,7 +816,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'territory', 'fieldname': u'territory',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -828,7 +830,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'col_break46', 'fieldname': u'col_break46',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -839,7 +841,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Category of customer as entered in Customer master', 'description': u'Category of customer as entered in Customer master',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'customer_group', 'fieldname': u'customer_group',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -855,7 +857,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Filling in additional information about the Sales Order will help you analyze your data better.', 'description': u'Filling in additional information about the Sales Order will help you analyze your data better.',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'more_info', 'fieldname': u'more_info',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'More Info', 'label': u'More Info',
@ -866,7 +868,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break4', 'fieldname': u'column_break4',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break', 'oldfieldtype': u'Column Break',
@ -878,7 +880,7 @@
# DocField # DocField
{ {
'allow_on_submit': 1, 'allow_on_submit': 1,
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'letter_head', 'fieldname': u'letter_head',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Letter Head', 'label': u'Letter Head',
@ -893,7 +895,7 @@
{ {
'allow_on_submit': 1, 'allow_on_submit': 1,
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'select_print_heading', 'fieldname': u'select_print_heading',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Select Print Heading', 'label': u'Select Print Heading',
@ -910,7 +912,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u"eval:doc.source == 'Campaign'", 'depends_on': u"eval:doc.source == 'Campaign'",
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'campaign', 'fieldname': u'campaign',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Campaign', 'label': u'Campaign',
@ -923,7 +925,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'amended_from', 'fieldname': u'amended_from',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 1, 'hidden': 1,
@ -940,7 +942,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'The date at which current entry is corrected in the system.', 'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'amendment_date', 'fieldname': u'amendment_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'hidden': 1, 'hidden': 1,
@ -957,7 +959,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Select the relevant company name if you have multiple companies.', 'description': u'Select the relevant company name if you have multiple companies.',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'company', 'fieldname': u'company',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -975,7 +977,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'fiscal_year', 'fieldname': u'fiscal_year',
'fieldtype': u'Select', 'fieldtype': u'Select',
'in_filter': 1, 'in_filter': 1,
@ -994,7 +996,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal', 'depends_on': u'eval:!doc.__islocal',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'cancel_reason', 'fieldname': u'cancel_reason',
'fieldtype': u'Data', 'fieldtype': u'Data',
'label': u'Cancel Reason', 'label': u'Cancel Reason',
@ -1008,7 +1010,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break5', 'fieldname': u'column_break5',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break', 'oldfieldtype': u'Column Break',
@ -1020,7 +1022,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'source', 'fieldname': u'source',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Source', 'label': u'Source',
@ -1035,7 +1037,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Track this Sales Order against any Project', 'description': u'Track this Sales Order against any Project',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'project_name', 'fieldname': u'project_name',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -1051,7 +1053,7 @@
# DocField # DocField
{ {
'default': u'Draft', 'default': u'Draft',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'status', 'fieldname': u'status',
'fieldtype': u'Select', 'fieldtype': u'Select',
'in_filter': 1, 'in_filter': 1,
@ -1072,7 +1074,7 @@
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal', 'depends_on': u'eval:!doc.__islocal',
'description': u'% of materials delivered against this Sales Order', 'description': u'% of materials delivered against this Sales Order',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'per_delivered', 'fieldname': u'per_delivered',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'in_filter': 1, 'in_filter': 1,
@ -1090,7 +1092,7 @@
'colour': u'White:FFF', 'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal', 'depends_on': u'eval:!doc.__islocal',
'description': u'% of materials billed against this Sales Order', 'description': u'% of materials billed against this Sales Order',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'per_billed', 'fieldname': u'per_billed',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'in_filter': 1, 'in_filter': 1,
@ -1105,7 +1107,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'delivery_status', 'fieldname': u'delivery_status',
'fieldtype': u'Select', 'fieldtype': u'Select',
'hidden': 1, 'hidden': 1,
@ -1119,7 +1121,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'billing_status', 'fieldname': u'billing_status',
'fieldtype': u'Select', 'fieldtype': u'Select',
'hidden': 1, 'hidden': 1,
@ -1135,7 +1137,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Display all the individual items delivered with the main items', 'description': u'Display all the individual items delivered with the main items',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'packing_list', 'fieldname': u'packing_list',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'hidden': 0, 'hidden': 0,
@ -1148,7 +1150,7 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'packing_details', 'fieldname': u'packing_details',
'fieldtype': u'Table', 'fieldtype': u'Table',
'label': u'Packing Details', 'label': u'Packing Details',
@ -1161,7 +1163,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'sales_team_section_break', 'fieldname': u'sales_team_section_break',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Sales Team', 'label': u'Sales Team',
@ -1172,7 +1174,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break6', 'fieldname': u'column_break6',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -1184,7 +1186,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'description': u'Name as entered in Sales Partner master', 'description': u'Name as entered in Sales Partner master',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'sales_partner', 'fieldname': u'sales_partner',
'fieldtype': u'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
@ -1201,7 +1203,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break7', 'fieldname': u'column_break7',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
@ -1211,7 +1213,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'commission_rate', 'fieldname': u'commission_rate',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Commission Rate', 'label': u'Commission Rate',
@ -1225,7 +1227,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'total_commission', 'fieldname': u'total_commission',
'fieldtype': u'Currency', 'fieldtype': u'Currency',
'label': u'Total Commission', 'label': u'Total Commission',
@ -1238,7 +1240,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'section_break1', 'fieldname': u'section_break1',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'options': u'Simple', 'options': u'Simple',
@ -1248,7 +1250,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'sales_team', 'fieldname': u'sales_team',
'fieldtype': u'Table', 'fieldtype': u'Table',
'label': u'Sales Team1', 'label': u'Sales Team1',
@ -1261,7 +1263,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'file_list', 'fieldname': u'file_list',
'fieldtype': u'Text', 'fieldtype': u'Text',
'hidden': 1, 'hidden': 1,
@ -1271,13 +1273,21 @@
'print_hide': 1 'print_hide': 1
}, },
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Production Manager'
},
# DocPerm # DocPerm
{ {
'amend': 0, 'amend': 0,
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'read': 1,
'role': u'Sales Manager', 'role': u'Sales Manager',
'submit': 0, 'submit': 0,
'write': 0 'write': 0
@ -1288,8 +1298,9 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'read': 1,
'role': u'Sales Manager', 'role': u'Sales Manager',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
@ -1300,8 +1311,9 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'read': 1,
'role': u'Sales User', 'role': u'Sales User',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
@ -1312,8 +1324,9 @@
'amend': 0, 'amend': 0,
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'read': 1,
'role': u'Sales User', 'role': u'Sales User',
'submit': 0, 'submit': 0,
'write': 0 'write': 0
@ -1321,16 +1334,18 @@
# DocPerm # DocPerm
{ {
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'match': u'customer_name', 'match': u'customer_name',
'permlevel': 0, 'permlevel': 0,
'read': 1,
'role': u'Customer' 'role': u'Customer'
}, },
# DocPerm # DocPerm
{ {
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 2, 'permlevel': 2,
'read': 1,
'role': u'Accounts User', 'role': u'Accounts User',
'write': 1 'write': 1
}, },
@ -1340,8 +1355,9 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'read': 1,
'role': u'Maintenance Manager', 'role': u'Maintenance Manager',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
@ -1349,8 +1365,9 @@
# DocPerm # DocPerm
{ {
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'read': 1,
'role': u'Maintenance Manager' 'role': u'Maintenance Manager'
}, },
@ -1359,8 +1376,9 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'read': 1,
'role': u'Maintenance User', 'role': u'Maintenance User',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
@ -1368,8 +1386,9 @@
# DocPerm # DocPerm
{ {
'doctype': u'DocPerm', u'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'read': 1,
'role': u'Maintenance User' 'role': u'Maintenance User'
} }
] ]

View File

@ -111,8 +111,6 @@ class DocType:
if self.doc.file_list: if self.doc.file_list:
self.get_reconciliation_data() self.get_reconciliation_data()
def get_system_stock(self, it, wh): def get_system_stock(self, it, wh):
"""get actual qty on reconciliation date and time as per system""" """get actual qty on reconciliation date and time as per system"""
bin = sql("select name from tabBin where item_code=%s and warehouse=%s", (it, wh)) bin = sql("select name from tabBin where item_code=%s and warehouse=%s", (it, wh))
@ -123,10 +121,9 @@ class DocType:
'val_rate' : prev_sle.get('valuation_rate', 0) 'val_rate' : prev_sle.get('valuation_rate', 0)
} }
def get_incoming_rate(self, row, qty_diff, sys_stock):
def get_incoming_rate(self, row, qty_diff, sys_stock, is_submit):
"""Calculate incoming rate to maintain valuation rate""" """Calculate incoming rate to maintain valuation rate"""
if qty_diff and is_submit: if qty_diff:
if self.val_method == 'Moving Average': if self.val_method == 'Moving Average':
in_rate = flt(row[3]) + (flt(sys_stock['actual_qty'])*(flt(row[3]) - flt(sys_stock['val_rate'])))/ flt(qty_diff) in_rate = flt(row[3]) + (flt(sys_stock['actual_qty'])*(flt(row[3]) - flt(sys_stock['val_rate'])))/ flt(qty_diff)
elif not sys_stock and not row[3]: elif not sys_stock and not row[3]:
@ -138,10 +135,9 @@ class DocType:
return in_rate return in_rate
def make_sl_entry(self, row, qty_diff, sys_stock):
def make_sl_entry(self, is_submit, row, qty_diff, sys_stock):
"""Make stock ledger entry""" """Make stock ledger entry"""
in_rate = self.get_incoming_rate(row, qty_diff, sys_stock, is_submit) in_rate = self.get_incoming_rate(row, qty_diff, sys_stock)
values = [{ values = [{
'item_code' : row[0], 'item_code' : row[0],
'warehouse' : row[1], 'warehouse' : row[1],
@ -151,27 +147,24 @@ class DocType:
'voucher_type' : self.doc.doctype, 'voucher_type' : self.doc.doctype,
'voucher_no' : self.doc.name, 'voucher_no' : self.doc.name,
'voucher_detail_no' : self.doc.name, 'voucher_detail_no' : self.doc.name,
'actual_qty' : flt(is_submit) * flt(qty_diff), 'actual_qty' : flt(qty_diff),
'stock_uom' : sys_stock['stock_uom'], 'stock_uom' : sys_stock['stock_uom'],
'incoming_rate' : in_rate, 'incoming_rate' : in_rate,
'company' : get_defaults()['company'], 'company' : get_defaults()['company'],
'fiscal_year' : get_defaults()['fiscal_year'], 'fiscal_year' : get_defaults()['fiscal_year'],
'is_cancelled' : (is_submit==1) and 'No' or 'Yes', 'is_cancelled' : 'No',
'batch_no' : '', 'batch_no' : '',
'serial_no' : '' 'serial_no' : ''
}] }]
get_obj('Stock Ledger', 'Stock Ledger').update_stock(values) get_obj('Stock Ledger', 'Stock Ledger').update_stock(values)
def make_entry_for_valuation(self, row, sys_stock):
self.make_sl_entry(row, 1, sys_stock)
def make_entry_for_valuation(self, row, sys_stock, is_submit):
self.make_sl_entry(is_submit, row, 1, sys_stock)
sys_stock['val_rate'] = row[3] sys_stock['val_rate'] = row[3]
sys_stock['actual_qty'] += 1 sys_stock['actual_qty'] += 1
self.make_sl_entry(is_submit, row, -1, sys_stock) self.make_sl_entry(row, -1, sys_stock)
def do_stock_reco(self):
def do_stock_reco(self, is_submit = 1):
""" """
Make stock entry of qty diff, calculate incoming rate to maintain valuation rate. Make stock entry of qty diff, calculate incoming rate to maintain valuation rate.
If no qty diff, but diff in valuation rate, make (+1,-1) entry to update valuation If no qty diff, but diff in valuation rate, make (+1,-1) entry to update valuation
@ -187,19 +180,18 @@ class DocType:
# Make sl entry # Make sl entry
if qty_diff: if qty_diff:
self.make_sl_entry(is_submit, row, qty_diff, sys_stock) self.make_sl_entry(row, qty_diff, sys_stock)
sys_stock['actual_qty'] += qty_diff sys_stock['actual_qty'] += qty_diff
if (not qty_diff and rate_diff) or qty_diff < 0 and self.val_method == 'Moving Average': if (not qty_diff and rate_diff) or qty_diff < 0 and self.val_method == 'Moving Average':
self.make_entry_for_valuation(row, sys_stock, is_submit) self.make_entry_for_valuation(row, sys_stock)
if is_submit == 1:
r = [cstr(i) for i in row] + [cstr(qty_diff), cstr(rate_diff)] r = [cstr(i) for i in row] + [cstr(qty_diff), cstr(rate_diff)]
self.store_diff_info(r) self.store_diff_info(r)
msgprint("Stock Reconciliation Completed Successfully...") msgprint("Stock Reconciliation Completed Successfully...")
def store_diff_info(self, r): def store_diff_info(self, r):
"""Add diffs column in attached file""" """Add diffs column in attached file"""
@ -222,11 +214,25 @@ class DocType:
if not self.doc.file_list: if not self.doc.file_list:
msgprint("Please attach file before submitting.", raise_exception=1) msgprint("Please attach file before submitting.", raise_exception=1)
else: else:
self.do_stock_reco(is_submit = 1) self.do_stock_reco()
def on_cancel(self): def on_cancel(self):
msgprint("Cancellation of stock reconciliation is temporarily suspended. The feature will come back soon.") self.cancel_stock_ledger_entries()
raise Exception self.update_entries_after()
def cancel_stock_ledger_entries(self):
webnotes.conn.sql("""
update `tabStock Ledger Entry`
set is_cancelled = 'Yes'
where voucher_type = 'Stock Reconciliation' and voucher_no = %s
""", self.doc.name)
def update_entries_after(self):
self.get_reconciliation_data(submit = 0) self.get_reconciliation_data(submit = 0)
self.do_stock_reco(is_submit = -1) from webnotes.model.code import get_obj
for d in self.data:
bin = webnotes.conn.sql("select name from `tabBin` where item_code = %s and \
warehouse = %s", (d[0], d[1]))
get_obj('Bin', bin[0][0]).update_entries_after(self.doc.reconciliation_date, \
self.doc.reconciliation_time)

View File

@ -83,7 +83,7 @@ class TransactionBase:
cond = 'name="%s"' % address_name cond = 'name="%s"' % address_name
if is_shipping_address: if is_shipping_address:
details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_shipping_address desc limit 1" % cond, as_dict = 1) details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_shipping_address desc, is_primary_address desc limit 1" % cond, as_dict = 1)
else: else:
details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_primary_address desc limit 1" % cond, as_dict = 1) details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_primary_address desc limit 1" % cond, as_dict = 1)
@ -146,7 +146,7 @@ class TransactionBase:
# Get Customer Shipping Address # Get Customer Shipping Address
# ----------------------- # -----------------------
def get_shipping_address(self, name): def get_shipping_address(self, name):
details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone from `tabAddress` where customer = '%s' and docstatus != 2 order by is_shipping_address desc limit 1" %(name), as_dict = 1) details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone from `tabAddress` where customer = '%s' and docstatus != 2 order by is_shipping_address desc, is_primary_address desc limit 1" %(name), as_dict = 1)
extract = lambda x: details and details[0] and details[0].get(x,'') or '' extract = lambda x: details and details[0] and details[0].get(x,'') or ''
address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','phone')] address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','phone')]