From de91a219466d03ff95e0a83be7e9a4e07265e79f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 26 Nov 2012 11:58:22 +0530 Subject: [PATCH] commonified naming_series --- selling/doctype/lead/lead.py | 5 - selling/doctype/lead/lead.txt | 5 +- selling/doctype/quotation/quotation.py | 11 +- selling/doctype/quotation/quotation.txt | 2348 +++++++------- selling/doctype/sales_order/sales_order.py | 8 +- selling/doctype/sales_order/sales_order.txt | 2568 +++++++--------- stock/doctype/delivery_note/delivery_note.py | 7 +- stock/doctype/delivery_note/delivery_note.txt | 2701 ++++++++--------- stock/doctype/stock_entry/stock_entry.py | 8 +- stock/doctype/stock_entry/stock_entry.txt | 1842 ++++++----- .../doctype/communication/communication.py | 3 - .../doctype/communication/communication.txt | 5 +- .../doctype/customer_issue/customer_issue.py | 5 +- .../doctype/customer_issue/customer_issue.txt | 1142 ++++--- support/doctype/newsletter/newsletter.py | 4 - support/doctype/newsletter/newsletter.txt | 413 ++- .../doctype/support_ticket/support_ticket.py | 14 +- .../doctype/support_ticket/support_ticket.txt | 3 +- 18 files changed, 5054 insertions(+), 6038 deletions(-) diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py index 2af2dddef5..1b51e55c6e 100644 --- a/selling/doctype/lead/lead.py +++ b/selling/doctype/lead/lead.py @@ -39,11 +39,6 @@ class DocType: self.doc = doc self.doclist = doclist - # Autoname - # --------- - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') - #check status of lead #------------------------ def check_status(self): diff --git a/selling/doctype/lead/lead.txt b/selling/doctype/lead/lead.txt index ff8b0a88ce..08218b3989 100644 --- a/selling/doctype/lead/lead.txt +++ b/selling/doctype/lead/lead.txt @@ -4,9 +4,10 @@ "docstatus": 0, "creation": "2012-11-02 17:16:46", "modified_by": "Administrator", - "modified": "2012-11-24 15:09:56" + "modified": "2012-11-26 11:12:27" }, { + "autoname": "naming_series:", "name": "__common__", "default_print_format": "Standard", "search_fields": "lead_name,lead_owner,status", @@ -121,7 +122,7 @@ "search_index": 0, "reqd": 0, "in_filter": 1, - "options": "\nAdvertisement\nBlog\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite" + "options": "\nAdvertisement\nBlog\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail" }, { "description": "Source of th", diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py index b9dafc107c..76b1ef6b93 100644 --- a/selling/doctype/quotation/quotation.py +++ b/selling/doctype/quotation/quotation.py @@ -20,7 +20,7 @@ import webnotes from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, load_json from webnotes.model import db_exists -from webnotes.model.doc import Document, addchild, getchildren, make_autoname +from webnotes.model.doc import Document, addchild, getchildren from webnotes.model.wrapper import getlist, copy_doclist from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax from webnotes import session, form, msgprint, errprint @@ -41,15 +41,6 @@ class DocType(TransactionBase): self.doclist = doclist self.tname = 'Quotation Item' self.fname = 'quotation_details' - - # Autoname - # --------- - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') - - -# DOCTYPE TRIGGER FUNCTIONS -# ============================================================================== # Pull Opportunity Details # -------------------- diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index 6a42cda637..920b819d01 100644 --- a/selling/doctype/quotation/quotation.txt +++ b/selling/doctype/quotation/quotation.txt @@ -1,1275 +1,1077 @@ -# DocType, Quotation [ - - # These values are common in all dictionaries - { - 'creation': '2012-07-05 11:04:12', - 'docstatus': 0, - 'modified': '2012-07-16 16:23:50', - 'modified_by': u'Administrator', - 'owner': u'Administrator' - }, - - # These values are common for all DocType - { - '_last_update': u'1332235370', - 'allow_attach': 1, - 'allow_email': 0, - 'allow_trash': 1, - 'colour': u'White:FFF', - 'default_print_format': u'Standard', - 'doctype': 'DocType', - 'document_type': u'Transaction', - 'hide_toolbar': 0, - 'is_submittable': 1, - 'is_transaction_doc': 1, - 'max_attachments': 1, - 'module': u'Selling', - 'name': '__common__', - 'read_only_onload': 1, - 'search_fields': u'status,transaction_date,customer,lead,order_type', - 'section_style': u'Tabbed', - 'server_code_error': u' ', - 'show_in_menu': 0, - 'subject': u'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s', - 'tag_fields': u'status', - 'version': 1 - }, - - # These values are common for all DocField - { - 'doctype': u'DocField', - 'name': '__common__', - 'parent': u'Quotation', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - 'doctype': u'DocPerm', - 'name': '__common__', - 'parent': u'Quotation', - 'parentfield': u'permissions', - 'parenttype': u'DocType', - 'read': 1 - }, - - # DocType, Quotation - { - 'doctype': 'DocType', - 'name': u'Quotation' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'basic_info', - 'fieldtype': u'Section Break', - 'label': u'Basic Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break0', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'To manage multiple series please go to Setup > Manage Series', - 'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'label': u'Naming Series', - 'no_copy': 1, - 'oldfieldname': u'naming_series', - 'oldfieldtype': u'Select', - 'options': u'QTN', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'quotation_to', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Quotation To', - 'oldfieldname': u'quotation_to', - 'oldfieldtype': u'Select', - 'options': u'\nLead\nCustomer', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'customer', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Customer', - 'oldfieldname': u'customer', - 'oldfieldtype': u'Link', - 'options': u'Customer', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'lead', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Lead', - 'oldfieldname': u'lead', - 'oldfieldtype': u'Link', - 'options': u'Lead', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'lead_name', - 'fieldtype': u'Text', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Lead Name', - 'permlevel': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'customer_name', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Customer Name', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'organization', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Organization', - 'permlevel': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'address_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Address', - 'oldfieldname': u'customer_address', - 'oldfieldtype': u'Small Text', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'contact_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Contact', - 'permlevel': 1, - 'print_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'contact_mobile', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Mobile No', - 'permlevel': 1, - 'print_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'contact_email', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'default': u'Today', - 'description': u'The date at which current entry is made in system.', - 'doctype': u'DocField', - 'fieldname': u'transaction_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Quotation Date', - 'no_copy': 1, - 'oldfieldname': u'transaction_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'reqd': 1, - 'search_index': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'Sales', - 'doctype': u'DocField', - 'fieldname': u'order_type', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Order Type', - 'oldfieldname': u'order_type', - 'oldfieldtype': u'Select', - 'options': u'\nSales\nMaintenance', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'items', - 'fieldtype': u'Section Break', - 'label': u'Items', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'quotation_details', - 'fieldtype': u'Table', - 'label': u'Quotation Items', - 'oldfieldname': u'quotation_details', - 'oldfieldtype': u'Table', - 'options': u'Quotation Item', - 'permlevel': 0, - 'width': u'40px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'sec_break23', - 'fieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break34', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total*', - 'no_copy': 0, - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'100px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'recalculate_values', - 'fieldtype': u'Button', - 'label': u'Re-Calculate Values', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break35', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ", - 'doctype': u'DocField', - 'fieldname': u'enq_no', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Opportunity No', - 'no_copy': 0, - 'oldfieldname': u'enq_no', - 'oldfieldtype': u'Link', - 'options': u'Opportunity', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'pull_enquiry_detail', - 'fieldtype': u'Button', - 'hidden': 0, - 'label': u'Pull Opportunity Detail', - 'no_copy': 0, - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'label': u'Price List and Currency', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', - 'doctype': u'DocField', - 'fieldname': u'price_list_name', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Price List', - 'oldfieldname': u'price_list_name', - 'oldfieldtype': u'Select', - 'options': u'link:Price List', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the currency in which price list is maintained', - 'doctype': u'DocField', - 'fieldname': u'price_list_currency', - 'fieldtype': u'Select', - 'label': u'Price List Currency', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"Rate at which Price list currency is converted to company's base currency", - 'doctype': u'DocField', - 'fieldname': u'plc_conversion_rate', - 'fieldtype': u'Float', - 'label': u'Price List Currency Conversion Rate', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break2', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.", - 'doctype': u'DocField', - 'fieldname': u'currency', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Currency', - 'oldfieldname': u'currency', - 'oldfieldtype': u'Select', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'1.00', - 'description': u"Rate at which customer's currency is converted to company's base currency", - 'doctype': u'DocField', - 'fieldname': u'conversion_rate', - 'fieldtype': u'Float', - 'label': u'Conversion Rate', - 'oldfieldname': u'conversion_rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'taxes', - 'fieldtype': u'Section Break', - 'label': u'Taxes', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'charge', - 'fieldtype': u'Link', - 'hidden': 0, - 'label': u'Sales Taxes and Charges', - 'oldfieldname': u'charge', - 'oldfieldtype': u'Link', - 'options': u'Sales Taxes and Charges Master', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_charges', - 'fieldtype': u'Button', - 'hidden': 0, - 'label': u'Get Taxes and Charges', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges', - 'fieldtype': u'Table', - 'label': u'Sales Taxes and Charges', - 'oldfieldname': u'other_charges', - 'oldfieldtype': u'Table', - 'options': u'Sales Taxes and Charges', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'calculate_charges', - 'fieldtype': u'Button', - 'label': u'Calculate Taxes and Charges', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_total', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Total*', - 'oldfieldname': u'other_charges_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_calculation', - 'fieldtype': u'HTML', - 'label': u'Taxes and Charges Calculation', - 'oldfieldtype': u'HTML', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'totals', - 'fieldtype': u'Section Break', - 'label': u'Totals', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'grand_total', - 'fieldtype': u'Currency', - 'label': u'Grand Total*', - 'no_copy': 0, - 'oldfieldname': u'grand_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0, - 'width': u'200px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'rounded_total', - 'fieldtype': u'Currency', - 'label': u'Rounded Total', - 'no_copy': 0, - 'oldfieldname': u'rounded_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'trigger': u'Client', - 'width': u'200px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'In Words will be visible once you save the Quotation.', - 'doctype': u'DocField', - 'fieldname': u'in_words', - 'fieldtype': u'Data', - 'label': u'In Words', - 'no_copy': 0, - 'oldfieldname': u'in_words', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'200px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'grand_total_export', - 'fieldtype': u'Currency', - 'label': u'Grand Total', - 'no_copy': 0, - 'oldfieldname': u'grand_total_export', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'200px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'rounded_total_export', - 'fieldtype': u'Currency', - 'label': u'Rounded Total', - 'no_copy': 0, - 'oldfieldname': u'rounded_total_export', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'200px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'in_words_export', - 'fieldtype': u'Data', - 'label': u'In Words', - 'no_copy': 0, - 'oldfieldname': u'in_words_export', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 0, - 'width': u'200px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a Terms and Conditions Master and use the Template', - 'doctype': u'DocField', - 'fieldname': u'terms_section_break', - 'fieldtype': u'Section Break', - 'label': u'Terms and Conditions', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tc_name', - 'fieldtype': u'Link', - 'label': u'Select Terms and Conditions', - 'oldfieldname': u'tc_name', - 'oldfieldtype': u'Link', - 'options': u'Terms and Conditions', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_terms', - 'fieldtype': u'Button', - 'label': u'Get Terms and Conditions', - 'oldfieldtype': u'Button', - 'options': u'get_tc_details', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'terms_html', - 'fieldtype': u'HTML', - 'label': u'Terms and Conditions HTML', - 'oldfieldtype': u'HTML', - 'options': u'You can add Terms and Notes that will be printed in the Transaction', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'terms', - 'fieldtype': u'Text Editor', - 'label': u'Term Details', - 'oldfieldname': u'terms', - 'oldfieldtype': u'Text Editor', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_section', - 'fieldtype': u'Section Break', - 'label': u'Contact Info', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break98', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'customer_address', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Customer Address', - 'options': u'Address', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Contact Person', - 'oldfieldname': u'contact_person', - 'oldfieldtype': u'Link', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break99', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Will be fetched from Customer', - 'doctype': u'DocField', - 'fieldname': u'territory', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Territory', - 'options': u'Territory', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'customer_group', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer Group', - 'oldfieldname': u'customer_group', - 'oldfieldtype': u'Link', - 'options': u'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Filling in additional information about the Quotation will help you analyze your data better.', - 'doctype': u'DocField', - 'fieldname': u'more_info', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'letter_head', - 'fieldtype': u'Select', - 'label': u'Letter Head', - 'oldfieldname': u'letter_head', - 'oldfieldtype': u'Select', - 'options': u'link:Letter Head', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the relevant company name if you have multiple companies.', - 'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Company', - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'trigger': u'Client', - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Fiscal Year', - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'enq_det', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Opportunity Item', - 'no_copy': 0, - 'oldfieldname': u'enq_det', - 'oldfieldtype': u'Text', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'source', - 'fieldtype': u'Select', - 'hidden': 0, - 'label': u'Source', - 'no_copy': 0, - 'oldfieldname': u'source', - 'oldfieldtype': u'Select', - 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'campaign', - 'fieldtype': u'Link', - 'hidden': 0, - 'label': u'Campaign', - 'no_copy': 0, - 'oldfieldname': u'campaign', - 'oldfieldtype': u'Link', - 'options': u'Campaign', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'order_lost_reason', - 'fieldtype': u'Small Text', - 'label': u'Quotation Lost Reason', - 'no_copy': 1, - 'oldfieldname': u'order_lost_reason', - 'oldfieldtype': u'Small Text', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break4', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'default': u'Draft', - 'doctype': u'DocField', - 'fieldname': u'status', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Status', - 'no_copy': 1, - 'oldfieldname': u'status', - 'oldfieldtype': u'Select', - 'options': u'\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'select_print_heading', - 'fieldtype': u'Link', - 'label': u'Select Print Heading', - 'no_copy': 1, - 'oldfieldname': u'select_print_heading', - 'oldfieldtype': u'Link', - 'options': u'Print Heading', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1 - }, - - # DocField - { - 'description': u'Your sales person who will contact the customer/lead in future', - 'doctype': u'DocField', - 'fieldname': u'contact_by', - 'fieldtype': u'Link', - 'label': u'Next Contact By', - 'oldfieldname': u'contact_by', - 'oldfieldtype': u'Link', - 'options': u'Profile', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'description': u'Your sales person will get a reminder on this date to contact the customer/lead', - 'doctype': u'DocField', - 'fieldname': u'contact_date', - 'fieldtype': u'Date', - 'label': u'Next Contact Date', - 'oldfieldname': u'contact_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Date on which the lead/customer was last contacted', - 'doctype': u'DocField', - 'fieldname': u'last_contact_date', - 'fieldtype': u'Date', - 'label': u'Last Contact Date', - 'no_copy': 1, - 'oldfieldname': u'last_contact_date', - 'oldfieldtype': u'Date', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'to_discuss', - 'fieldtype': u'Small Text', - 'label': u'To Discuss', - 'oldfieldname': u'to_discuss', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Data', - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Keep a track on communications regarding this Quotation. This will help you remember earlier communications in case the Customer comes back again', - 'doctype': u'DocField', - 'fieldname': u'communication_history', - 'fieldtype': u'Section Break', - 'label': u'Communication History', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'communication_html', - 'fieldtype': u'HTML', - 'label': u'Communication HTML', - 'oldfieldname': u'follow_up', - 'oldfieldtype': u'Table', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'40px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'file_list', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'File List', - 'no_copy': 1, - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Sales Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Sales Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Sales User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Sales User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'match': u'customer_name', - 'permlevel': 0, - 'role': u'Customer' - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Maintenance Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Maintenance Manager' - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Maintenance User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Maintenance User' - } + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2012-11-02 17:16:44", + "modified_by": "Administrator", + "modified": "2012-11-26 11:57:10" + }, + { + "is_submittable": 1, + "allow_attach": 1, + "search_fields": "status,transaction_date,customer,lead,order_type", + "module": "Selling", + "read_only_onload": 1, + "document_type": "Transaction", + "allow_email": 0, + "autoname": "naming_series:", + "name": "__common__", + "default_print_format": "Standard", + "doctype": "DocType", + "max_attachments": 1, + "hide_toolbar": 0 + }, + { + "name": "__common__", + "parent": "Quotation", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Quotation", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Quotation", + "doctype": "DocType" + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Basic Info", + "fieldname": "basic_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "To manage multiple series please go to Setup > Manage Series", + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Naming Series", + "oldfieldname": "naming_series", + "permlevel": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "reqd": 1, + "options": "QTN" + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Quotation To", + "oldfieldname": "quotation_to", + "permlevel": 0, + "trigger": "Client", + "fieldname": "quotation_to", + "fieldtype": "Select", + "reqd": 1, + "options": "\nLead\nCustomer", + "report_hide": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer", + "oldfieldname": "customer", + "permlevel": 0, + "trigger": "Client", + "fieldname": "customer", + "fieldtype": "Link", + "search_index": 1, + "hidden": 0, + "options": "Customer", + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Lead", + "oldfieldname": "lead", + "permlevel": 0, + "trigger": "Client", + "fieldname": "lead", + "fieldtype": "Link", + "hidden": 0, + "options": "Lead", + "in_filter": 1 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "Lead Name", + "fieldname": "lead_name", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1, + "in_filter": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer Name", + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Organization", + "fieldname": "organization", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 0, + "oldfieldtype": "Small Text", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Address", + "oldfieldname": "customer_address", + "fieldname": "address_display", + "fieldtype": "Small Text", + "search_index": 0, + "reqd": 0, + "hidden": 1, + "permlevel": 1, + "in_filter": 0 + }, + { + "print_hide": 0, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Contact", + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1, + "in_filter": 0 + }, + { + "print_hide": 0, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Mobile No", + "fieldname": "contact_mobile", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Contact Email", + "fieldname": "contact_email", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "oldfieldtype": "Column Break", + "colour": "White:FFF", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "description": "The date at which current entry is made in system.", + "width": "100px", + "default": "Today", + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Quotation Date", + "oldfieldname": "transaction_date", + "no_copy": 1, + "fieldname": "transaction_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "default": "Sales", + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Order Type", + "oldfieldname": "order_type", + "permlevel": 0, + "fieldname": "order_type", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "options": "\nSales\nMaintenance", + "in_filter": 1 + }, + { + "print_hide": 0, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Items", + "fieldname": "items", + "fieldtype": "Section Break", + "search_index": 0, + "permlevel": 0 + }, + { + "allow_on_submit": 1, + "oldfieldtype": "Table", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Quotation Items", + "oldfieldname": "quotation_details", + "width": "40px", + "options": "Quotation Item", + "fieldname": "quotation_details", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "doctype": "DocField", + "options": "Simple", + "fieldname": "sec_break23", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break34", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Net Total*", + "oldfieldname": "net_total", + "width": "100px", + "fieldname": "net_total", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Re-Calculate Values", + "trigger": "Client", + "fieldname": "recalculate_values", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break35", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "description": "To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ", + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Opportunity No", + "oldfieldname": "enq_no", + "permlevel": 0, + "fieldname": "enq_no", + "fieldtype": "Link", + "search_index": 0, + "hidden": 0, + "in_filter": 1, + "options": "Opportunity", + "report_hide": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Pull Opportunity Detail", + "trigger": "Client", + "fieldname": "pull_enquiry_detail", + "fieldtype": "Button", + "hidden": 0, + "permlevel": 0, + "report_hide": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List and Currency", + "fieldname": "section_break0", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", + "permlevel": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List", + "oldfieldname": "price_list_name", + "width": "100px", + "trigger": "Client", + "fieldname": "price_list_name", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "in_filter": 1, + "options": "link:Price List" + }, + { + "print_hide": 1, + "description": "Select the currency in which price list is maintained", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List Currency", + "options": "link:Currency", + "fieldname": "price_list_currency", + "fieldtype": "Select", + "reqd": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Rate at which Price list currency is converted to company's base currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List Currency Conversion Rate", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "reqd": 1, + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.", + "permlevel": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Currency", + "oldfieldname": "currency", + "width": "100px", + "trigger": "Client", + "fieldname": "currency", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "in_filter": 1, + "options": "link:Currency" + }, + { + "print_hide": 1, + "description": "Rate at which customer's currency is converted to company's base currency", + "default": "1.00", + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Conversion Rate", + "oldfieldname": "conversion_rate", + "width": "100px", + "trigger": "Client", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "reqd": 1, + "permlevel": 0 + }, + { + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Taxes", + "fieldname": "taxes", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Sales Taxes and Charges", + "oldfieldname": "charge", + "trigger": "Client", + "fieldname": "charge", + "fieldtype": "Link", + "hidden": 0, + "options": "Sales Taxes and Charges Master", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Taxes and Charges", + "trigger": "Client", + "fieldname": "get_charges", + "fieldtype": "Button", + "hidden": 0, + "permlevel": 0 + }, + { + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Sales Taxes and Charges", + "oldfieldname": "other_charges", + "options": "Sales Taxes and Charges", + "fieldname": "other_charges", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Calculate Taxes and Charges", + "trigger": "Client", + "fieldname": "calculate_charges", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Total*", + "oldfieldname": "other_charges_total", + "fieldname": "other_charges_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "HTML", + "doctype": "DocField", + "label": "Taxes and Charges Calculation", + "fieldname": "other_charges_calculation", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Totals", + "fieldname": "totals", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total*", + "oldfieldname": "grand_total", + "width": "200px", + "fieldname": "grand_total", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rounded Total", + "oldfieldname": "rounded_total", + "width": "200px", + "trigger": "Client", + "fieldname": "rounded_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "In Words will be visible once you save the Quotation.", + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words", + "oldfieldname": "in_words", + "width": "200px", + "fieldname": "in_words", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total", + "oldfieldname": "grand_total_export", + "width": "200px", + "fieldname": "grand_total_export", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rounded Total", + "oldfieldname": "rounded_total_export", + "width": "200px", + "fieldname": "rounded_total_export", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words", + "oldfieldname": "in_words_export", + "width": "200px", + "fieldname": "in_words_export", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 0, + "description": "Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a Terms and Conditions Master and use the Template", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Terms and Conditions", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Select Terms and Conditions", + "oldfieldname": "tc_name", + "options": "Terms and Conditions", + "fieldname": "tc_name", + "fieldtype": "Link", + "permlevel": 0, + "report_hide": 1 + }, + { + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Terms and Conditions", + "options": "get_tc_details", + "fieldname": "get_terms", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "HTML", + "doctype": "DocField", + "label": "Terms and Conditions HTML", + "options": "You can add Terms and Notes that will be printed in the Transaction", + "fieldname": "terms_html", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "oldfieldtype": "Text Editor", + "doctype": "DocField", + "label": "Term Details", + "oldfieldname": "terms", + "fieldname": "terms", + "fieldtype": "Text Editor", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Contact Info", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break98", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer Address", + "trigger": "Client", + "fieldname": "customer_address", + "fieldtype": "Link", + "hidden": 0, + "options": "Address", + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Contact Person", + "oldfieldname": "contact_person", + "permlevel": 0, + "trigger": "Client", + "fieldname": "contact_person", + "fieldtype": "Link", + "reqd": 0, + "hidden": 0, + "options": "Contact", + "in_filter": 1 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break99", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Will be fetched from Customer", + "search_index": 0, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Territory", + "permlevel": 0, + "trigger": "Client", + "fieldname": "territory", + "fieldtype": "Link", + "reqd": 1, + "hidden": 0, + "in_filter": 1, + "options": "Territory" + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer Group", + "oldfieldname": "customer_group", + "permlevel": 0, + "trigger": "Client", + "fieldname": "customer_group", + "fieldtype": "Link", + "search_index": 0, + "reqd": 0, + "options": "Customer Group", + "in_filter": 1 + }, + { + "print_hide": 1, + "description": "Filling in additional information about the Quotation will help you analyze your data better.", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "More Info", + "fieldname": "more_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "allow_on_submit": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Letter Head", + "oldfieldname": "letter_head", + "options": "link:Letter Head", + "fieldname": "letter_head", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select the relevant company name if you have multiple companies.", + "permlevel": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Company", + "oldfieldname": "company", + "width": "150px", + "trigger": "Client", + "fieldname": "company", + "fieldtype": "Link", + "search_index": 0, + "reqd": 1, + "in_filter": 1, + "options": "Company" + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "permlevel": 0, + "fieldname": "fiscal_year", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "options": "link:Fiscal Year", + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Text", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Opportunity Item", + "oldfieldname": "enq_det", + "fieldname": "enq_det", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1, + "report_hide": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Source", + "oldfieldname": "source", + "permlevel": 0, + "fieldname": "source", + "fieldtype": "Select", + "hidden": 0, + "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + "report_hide": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Campaign", + "oldfieldname": "campaign", + "permlevel": 0, + "fieldname": "campaign", + "fieldtype": "Link", + "hidden": 0, + "options": "Campaign", + "report_hide": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Cancel Reason", + "oldfieldname": "cancel_reason", + "fieldname": "cancel_reason", + "fieldtype": "Data", + "permlevel": 1, + "report_hide": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Small Text", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Quotation Lost Reason", + "oldfieldname": "order_lost_reason", + "fieldname": "order_lost_reason", + "fieldtype": "Small Text", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break4", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "permlevel": 1, + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Status", + "oldfieldname": "status", + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "options": "\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled", + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Link", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Select Print Heading", + "oldfieldname": "select_print_heading", + "permlevel": 0, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "options": "Print Heading", + "report_hide": 1 + }, + { + "print_hide": 1, + "description": "Your sales person who will contact the customer/lead in future", + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Next Contact By", + "oldfieldname": "contact_by", + "options": "Profile", + "fieldname": "contact_by", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Your sales person will get a reminder on this date to contact the customer/lead", + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Next Contact Date", + "oldfieldname": "contact_date", + "fieldname": "contact_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Date on which the lead/customer was last contacted", + "no_copy": 1, + "oldfieldtype": "Date", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Last Contact Date", + "oldfieldname": "last_contact_date", + "fieldname": "last_contact_date", + "fieldtype": "Date", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Small Text", + "doctype": "DocField", + "label": "To Discuss", + "oldfieldname": "to_discuss", + "fieldname": "to_discuss", + "fieldtype": "Small Text", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Amended From", + "oldfieldname": "amended_from", + "width": "150px", + "fieldname": "amended_from", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "The date at which current entry is corrected in the system.", + "no_copy": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Amendment Date", + "oldfieldname": "amendment_date", + "width": "100px", + "fieldname": "amendment_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Keep a track on communications regarding this Quotation. This will help you remember earlier communications in case the Customer comes back again", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Communication History", + "fieldname": "communication_history", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Table", + "colour": "White:FFF", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Communication HTML", + "oldfieldname": "follow_up", + "width": "40px", + "fieldname": "communication_html", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "File List", + "fieldname": "file_list", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Sales User", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Sales User", + "cancel": 0, + "permlevel": 1 + }, + { + "doctype": "DocPerm", + "role": "Customer", + "permlevel": 0, + "match": "customer_name" + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Sales Manager", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Sales Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Maintenance Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Maintenance Manager", + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Maintenance User", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Maintenance User", + "permlevel": 1 + } ] \ No newline at end of file diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py index f7c4f1e5ed..a79c84749e 100644 --- a/selling/doctype/sales_order/sales_order.py +++ b/selling/doctype/sales_order/sales_order.py @@ -20,7 +20,7 @@ import webnotes from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add from webnotes.model import db_exists -from webnotes.model.doc import Document, addchild, getchildren, make_autoname +from webnotes.model.doc import Document, addchild, getchildren from webnotes.model.wrapper import getlist, copy_doclist from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax from webnotes import session, form, msgprint, errprint @@ -45,12 +45,6 @@ class DocType(TransactionBase): self.person_tname = 'Target Detail' self.partner_tname = 'Partner Target Detail' self.territory_tname = 'Territory Target Detail' - -# Autoname -# =============== - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') - # DOCTYPE TRIGGER FUNCTIONS # ============================= diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt index e5e821cd70..745ca20b55 100644 --- a/selling/doctype/sales_order/sales_order.txt +++ b/selling/doctype/sales_order/sales_order.txt @@ -1,1394 +1,1178 @@ -# DocType, Sales Order [ - - # These values are common in all dictionaries - { - u'creation': '2012-09-18 11:20:27', - u'docstatus': 0, - u'modified': '2012-09-26 13:05:20', - u'modified_by': u'Administrator', - u'owner': u'Administrator' - }, - - # These values are common for all DocType - { - '_last_update': u'1330670942', - 'allow_attach': 1, - 'colour': u'White:FFF', - 'default_print_format': u'Standard', - u'doctype': u'DocType', - 'document_type': u'Transaction', - 'is_submittable': 1, - 'is_transaction_doc': 1, - 'issingle': 0, - 'module': u'Selling', - u'name': u'__common__', - 'read_only_onload': 1, - 'search_fields': u'status,transaction_date,customer,customer_name, territory,order_type,company', - 'section_style': u'Tabbed', - 'server_code_error': u' ', - 'show_in_menu': 0, - 'subject': u'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed', - 'tag_fields': u'delivery_status,billing_status', - 'version': 1 - }, - - # These values are common for all DocField - { - u'doctype': u'DocField', - u'name': u'__common__', - 'parent': u'Sales Order', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - u'doctype': u'DocPerm', - u'name': u'__common__', - 'parent': u'Sales Order', - 'parentfield': u'permissions', - 'parenttype': u'DocType' - }, - - # DocType, Sales Order - { - u'doctype': u'DocType', - u'name': u'Sales Order' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'basic_info', - 'fieldtype': u'Section Break', - 'label': u'Basic Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break0', - 'fieldtype': u'Column Break', - 'in_filter': 0, - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'search_index': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'To manage multiple series please go to Setup > Manage Series', - u'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'label': u'Series', - 'no_copy': 1, - 'oldfieldname': u'naming_series', - 'oldfieldtype': u'Select', - 'options': u'PI/2011/\nSO\nSO/10-11/\nSO1112', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select Customer', - u'doctype': u'DocField', - 'fieldname': u'customer', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer', - 'oldfieldname': u'customer', - 'oldfieldtype': u'Link', - 'options': u'Customer', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'customer_name', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Name', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'address_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Address', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Contact', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_mobile', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_email', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'Sales', - u'doctype': u'DocField', - 'fieldname': u'order_type', - 'fieldtype': u'Select', - 'label': u'Order Type', - 'oldfieldname': u'order_type', - 'oldfieldtype': u'Select', - 'options': u'\nSales\nMaintenance', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'default': u'Today', - 'description': u'The date at which current entry is made in system.', - u'doctype': u'DocField', - 'fieldname': u'transaction_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Sales Order Date', - 'no_copy': 1, - 'oldfieldname': u'transaction_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 1, - 'search_index': 1, - 'width': u'160px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u"eval:doc.order_type == 'Sales'", - u'doctype': u'DocField', - 'fieldname': u'delivery_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Expected Delivery Date', - 'oldfieldname': u'delivery_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 1, - 'width': u'160px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Purchase Order sent by customer', - u'doctype': u'DocField', - 'fieldname': u'po_no', - 'fieldtype': u'Data', - 'hidden': 0, - 'label': u'P.O. No', - 'oldfieldname': u'po_no', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 0, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.po_no', - u'doctype': u'DocField', - 'fieldname': u'po_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'label': u'P.O. Date', - 'oldfieldname': u'po_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 0, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'shipping_address_name', - 'fieldtype': u'Link', - 'hidden': 1, - 'in_filter': 1, - 'label': u'Shipping Address Name', - 'options': u'Address', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'shipping_address', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Shipping Address', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'items', - 'fieldtype': u'Section Break', - 'label': u'Items', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'sales_order_details', - 'fieldtype': u'Table', - 'label': u'Sales Order Items', - 'oldfieldname': u'sales_order_details', - 'oldfieldtype': u'Table', - 'options': u'Sales Order Item', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break20', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total*', - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'recalculate_values', - 'fieldtype': u'Button', - 'label': u'Re-Calculate Values', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break_21', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Quotation no against which this Sales Order is made ', - u'doctype': u'DocField', - 'fieldname': u'quotation_no', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Quotation No', - 'no_copy': 0, - 'oldfieldname': u'quotation_no', - 'oldfieldtype': u'Link', - 'options': u'Quotation', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1, - 'trigger': u'Client', - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.quotation_no', - u'doctype': u'DocField', - 'fieldname': u'quotation_date', - 'fieldtype': u'Date', - 'hidden': 1, - 'label': u'Quotation Date', - 'no_copy': 0, - 'oldfieldname': u'quotation_date', - 'oldfieldtype': u'Date', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0, - 'width': u'100px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'pull_quotation_details', - 'fieldtype': u'Button', - 'label': u'Pull Quotation Items', - 'oldfieldtype': u'Button', - 'options': u'pull_quotation_details', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'sec_break45', - 'fieldtype': u'Section Break', - 'label': u'Price List and Currency', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', - u'doctype': u'DocField', - 'fieldname': u'price_list_name', - 'fieldtype': u'Select', - 'label': u'Price List', - 'oldfieldname': u'price_list_name', - 'oldfieldtype': u'Select', - 'options': u'link:Price List', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - 'description': u'Select the currency in which price list is maintained', - u'doctype': u'DocField', - 'fieldname': u'price_list_currency', - 'fieldtype': u'Select', - 'label': u'Price List Currency', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"Rate at which Price list currency is converted to company's base currency", - u'doctype': u'DocField', - 'fieldname': u'plc_conversion_rate', - 'fieldtype': u'Float', - 'label': u'Price List Currency Conversion Rate', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break2', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"Customer's currency", - u'doctype': u'DocField', - 'fieldname': u'currency', - 'fieldtype': u'Select', - 'label': u'Currency', - 'oldfieldname': u'currency', - 'oldfieldtype': u'Select', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'1.00', - 'description': u"Rate at which customer's currency is converted to company's base currency", - u'doctype': u'DocField', - 'fieldname': u'conversion_rate', - 'fieldtype': u'Float', - 'label': u'Conversion Rate', - 'oldfieldname': u'conversion_rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'taxes', - 'fieldtype': u'Section Break', - 'label': u'Taxes', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'charge', - 'fieldtype': u'Link', - 'label': u'Sales Taxes and Charges', - 'oldfieldname': u'charge', - 'oldfieldtype': u'Link', - 'options': u'Sales Taxes and Charges Master', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'get_charges', - 'fieldtype': u'Button', - 'label': u'Get Taxes and Charges', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'other_charges', - 'fieldtype': u'Table', - 'label': u'Sales Taxes and Charges', - 'oldfieldname': u'other_charges', - 'oldfieldtype': u'Table', - 'options': u'Sales Taxes and Charges', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'calculate_charges', - 'fieldtype': u'Button', - 'label': u'Calculate Taxes and Charges', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 0, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'other_charges_total', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Total*', - 'oldfieldname': u'other_charges_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'other_charges_calculation', - 'fieldtype': u'HTML', - 'label': u'Taxes and Charges Calculation', - 'oldfieldtype': u'HTML', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'totals', - 'fieldtype': u'Section Break', - 'label': u'Totals', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'grand_total', - 'fieldtype': u'Currency', - 'label': u'Grand Total*', - 'oldfieldname': u'grand_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0, - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'rounded_total', - 'fieldtype': u'Currency', - 'label': u'Rounded Total', - 'oldfieldname': u'rounded_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'In Words will be visible once you save the Sales Order.', - u'doctype': u'DocField', - 'fieldname': u'in_words', - 'fieldtype': u'Data', - 'label': u'In Words', - 'oldfieldname': u'in_words', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'200px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'grand_total_export', - 'fieldtype': u'Currency', - 'label': u'Grand Total (Export)', - 'oldfieldname': u'grand_total_export', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'rounded_total_export', - 'fieldtype': u'Currency', - 'label': u'Rounded Total (Export)', - 'oldfieldname': u'rounded_total_export', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'in_words_export', - 'fieldtype': u'Data', - 'label': u'In Words (Export)', - 'oldfieldname': u'in_words_export', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 0, - 'width': u'200px' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'terms_section_break', - 'fieldtype': u'Section Break', - 'label': u'Terms and Conditions', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'tc_name', - 'fieldtype': u'Link', - 'label': u'Select Terms and Conditions', - 'oldfieldname': u'tc_name', - 'oldfieldtype': u'Link', - 'options': u'Terms and Conditions', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'get_terms', - 'fieldtype': u'Button', - 'label': u'Get Terms and Conditions', - 'oldfieldtype': u'Button', - 'options': u'get_tc_details', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'terms_html', - 'fieldtype': u'HTML', - 'label': u'Terms and Conditions HTML', - 'oldfieldtype': u'HTML', - 'options': u'You can add Terms and Notes that will be printed in the Transaction', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'terms', - 'fieldtype': u'Text Editor', - 'label': u'Terms and Conditions Details', - 'oldfieldname': u'terms', - 'oldfieldtype': u'Text Editor', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_info', - 'fieldtype': u'Section Break', - 'label': u'Contact Info', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break45', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'customer_address', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Customer Address', - 'options': u'Address', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'territory', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Territory', - 'options': u'Territory', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break46', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Category of customer as entered in Customer master', - u'doctype': u'DocField', - 'fieldname': u'customer_group', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer Group', - 'options': u'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Filling in additional information about the Sales Order will help you analyze your data better.', - u'doctype': u'DocField', - 'fieldname': u'more_info', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break4', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'allow_on_submit': 1, - u'doctype': u'DocField', - 'fieldname': u'letter_head', - 'fieldtype': u'Select', - 'label': u'Letter Head', - 'oldfieldname': u'letter_head', - 'oldfieldtype': u'Select', - 'options': u'link:Letter Head', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'select_print_heading', - 'fieldtype': u'Link', - 'label': u'Select Print Heading', - 'no_copy': 1, - 'oldfieldname': u'select_print_heading', - 'oldfieldtype': u'Link', - 'options': u'Print Heading', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u"eval:doc.source == 'Campaign'", - u'doctype': u'DocField', - 'fieldname': u'campaign', - 'fieldtype': u'Link', - 'label': u'Campaign', - 'oldfieldname': u'campaign', - 'oldfieldtype': u'Link', - 'options': u'Campaign', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'The date at which current entry is corrected in the system.', - u'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'hidden': 1, - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the relevant company name if you have multiple companies.', - u'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Company', - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': u'Client', - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Fiscal Year', - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - u'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'label': u'Cancel Reason', - 'no_column': 0, - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break5', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'source', - 'fieldtype': u'Select', - 'label': u'Source', - 'oldfieldname': u'source', - 'oldfieldtype': u'Select', - 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Track this Sales Order against any Project', - u'doctype': u'DocField', - 'fieldname': u'project_name', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Project Name', - 'oldfieldname': u'project_name', - 'oldfieldtype': u'Link', - 'options': u'Project', - 'permlevel': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'default': u'Draft', - u'doctype': u'DocField', - 'fieldname': u'status', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Status', - 'no_copy': 1, - 'oldfieldname': u'status', - 'oldfieldtype': u'Select', - 'options': u'\nDraft\nSubmitted\nStopped\nCancelled', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials delivered against this Sales Order', - u'doctype': u'DocField', - 'fieldname': u'per_delivered', - 'fieldtype': u'Currency', - 'in_filter': 1, - 'label': u'% Delivered', - 'no_copy': 1, - 'oldfieldname': u'per_delivered', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials billed against this Sales Order', - u'doctype': u'DocField', - 'fieldname': u'per_billed', - 'fieldtype': u'Currency', - 'in_filter': 1, - 'label': u'% Amount Billed', - 'no_copy': 1, - 'oldfieldname': u'per_billed', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'delivery_status', - 'fieldtype': u'Select', - 'hidden': 1, - 'label': u'Delivery Status', - 'no_column': 0, - 'no_copy': 1, - 'options': u'Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'billing_status', - 'fieldtype': u'Select', - 'hidden': 1, - 'label': u'Billing Status', - 'no_column': 0, - 'no_copy': 1, - 'options': u'Billed\nNot Billed\nPartly Billed\nClosed', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Display all the individual items delivered with the main items', - u'doctype': u'DocField', - 'fieldname': u'packing_list', - 'fieldtype': u'Section Break', - 'hidden': 0, - 'label': u'Packing List', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'packing_details', - 'fieldtype': u'Table', - 'label': u'Packing Details', - 'oldfieldname': u'packing_details', - 'oldfieldtype': u'Table', - 'options': u'Delivery Note Packing Item', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'sales_team_section_break', - 'fieldtype': u'Section Break', - 'label': u'Sales Team', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break6', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Name as entered in Sales Partner master', - u'doctype': u'DocField', - 'fieldname': u'sales_partner', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Sales Partner', - 'oldfieldname': u'sales_partner', - 'oldfieldtype': u'Link', - 'options': u'Sales Partner', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1, - 'trigger': u'Client', - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break7', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'commission_rate', - 'fieldtype': u'Currency', - 'label': u'Commission Rate', - 'oldfieldname': u'commission_rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'total_commission', - 'fieldtype': u'Currency', - 'label': u'Total Commission', - 'oldfieldname': u'total_commission', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'section_break1', - 'fieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'sales_team', - 'fieldtype': u'Table', - 'label': u'Sales Team1', - 'oldfieldname': u'sales_team', - 'oldfieldtype': u'Table', - 'options': u'Sales Team', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'file_list', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'File List', - 'no_copy': 1, - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Production Manager' - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - u'doctype': u'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': u'Sales Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'read': 1, - 'role': u'Sales Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'read': 1, - 'role': u'Sales User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - u'doctype': u'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': u'Sales User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'match': u'customer_name', - 'permlevel': 0, - 'read': 1, - 'role': u'Customer' - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 2, - 'read': 1, - 'role': u'Accounts User', - 'write': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'read': 1, - 'role': u'Maintenance Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': u'Maintenance Manager' - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'read': 1, - 'role': u'Maintenance User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'read': 1, - 'role': u'Maintenance User' - } + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2012-11-24 17:21:44", + "modified_by": "Administrator", + "modified": "2012-11-26 11:56:33" + }, + { + "is_submittable": 1, + "allow_attach": 1, + "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company", + "module": "Selling", + "read_only_onload": 1, + "autoname": "naming_series:", + "document_type": "Transaction", + "issingle": 0, + "name": "__common__", + "default_print_format": "Standard", + "doctype": "DocType" + }, + { + "name": "__common__", + "parent": "Sales Order", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Sales Order", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Sales Order", + "doctype": "DocType" + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Basic Info", + "fieldname": "basic_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "search_index": 0, + "permlevel": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "description": "To manage multiple series please go to Setup > Manage Series", + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Series", + "oldfieldname": "naming_series", + "permlevel": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "reqd": 1, + "options": "PI/2011/\nSO\nSO/10-11/\nSO1112" + }, + { + "print_hide": 1, + "description": "Select Customer", + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer", + "oldfieldname": "customer", + "permlevel": 0, + "trigger": "Client", + "fieldname": "customer", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "options": "Customer" + }, + { + "doctype": "DocField", + "label": "Name", + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Address", + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Contact", + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Mobile No", + "fieldname": "contact_mobile", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Contact Email", + "fieldname": "contact_email", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "default": "Sales", + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Order Type", + "oldfieldname": "order_type", + "permlevel": 0, + "fieldname": "order_type", + "fieldtype": "Select", + "reqd": 1, + "options": "\nSales\nMaintenance" + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "description": "The date at which current entry is made in system.", + "width": "160px", + "default": "Today", + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Sales Order Date", + "oldfieldname": "transaction_date", + "no_copy": 1, + "fieldname": "transaction_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "depends_on": "eval:doc.order_type == 'Sales'", + "search_index": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Expected Delivery Date", + "oldfieldname": "delivery_date", + "width": "160px", + "fieldname": "delivery_date", + "fieldtype": "Date", + "oldfieldtype": "Date", + "reqd": 0, + "hidden": 0, + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 0, + "description": "Purchase Order sent by customer", + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "P.O. No", + "oldfieldname": "po_no", + "width": "100px", + "fieldname": "po_no", + "fieldtype": "Data", + "reqd": 0, + "hidden": 0, + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Date", + "colour": "White:FFF", + "doctype": "DocField", + "label": "P.O. Date", + "oldfieldname": "po_date", + "width": "100px", + "fieldname": "po_date", + "fieldtype": "Date", + "depends_on": "eval:doc.po_no", + "reqd": 0, + "hidden": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Shipping Address Name", + "options": "Address", + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "hidden": 1, + "permlevel": 1, + "in_filter": 1 + }, + { + "print_hide": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Shipping Address", + "fieldname": "shipping_address", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1, + "in_filter": 0 + }, + { + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Items", + "fieldname": "items", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Table", + "colour": "White:FFF", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Sales Order Items", + "oldfieldname": "sales_order_details", + "options": "Sales Order Item", + "fieldname": "sales_order_details", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "doctype": "DocField", + "fieldname": "section_break0", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break20", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Net Total*", + "oldfieldname": "net_total", + "width": "150px", + "fieldname": "net_total", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Re-Calculate Values", + "trigger": "Client", + "fieldname": "recalculate_values", + "fieldtype": "Button", + "search_index": 0, + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break_21", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "permlevel": 0, + "description": "Quotation no against which this Sales Order is made ", + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Quotation No", + "oldfieldname": "quotation_no", + "width": "150px", + "trigger": "Client", + "fieldname": "quotation_no", + "fieldtype": "Link", + "search_index": 1, + "in_filter": 1, + "options": "Quotation" + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Date", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Quotation Date", + "oldfieldname": "quotation_date", + "width": "100px", + "fieldname": "quotation_date", + "fieldtype": "Date", + "depends_on": "eval:doc.quotation_no", + "reqd": 0, + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Pull Quotation Items", + "options": "pull_quotation_details", + "fieldname": "pull_quotation_details", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Price List and Currency", + "fieldname": "sec_break45", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", + "permlevel": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List", + "oldfieldname": "price_list_name", + "width": "100px", + "trigger": "Client", + "fieldname": "price_list_name", + "fieldtype": "Select", + "reqd": 1, + "options": "link:Price List" + }, + { + "print_hide": 1, + "description": "Select the currency in which price list is maintained", + "doctype": "DocField", + "label": "Price List Currency", + "options": "link:Currency", + "fieldname": "price_list_currency", + "fieldtype": "Select", + "reqd": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Rate at which Price list currency is converted to company's base currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List Currency Conversion Rate", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "reqd": 1, + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Customer's currency", + "permlevel": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Currency", + "oldfieldname": "currency", + "width": "100px", + "fieldname": "currency", + "fieldtype": "Select", + "reqd": 1, + "options": "link:Currency" + }, + { + "print_hide": 1, + "description": "Rate at which customer's currency is converted to company's base currency", + "default": "1.00", + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Conversion Rate", + "oldfieldname": "conversion_rate", + "width": "100px", + "trigger": "Client", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "reqd": 1, + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Taxes", + "fieldname": "taxes", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Sales Taxes and Charges", + "oldfieldname": "charge", + "options": "Sales Taxes and Charges Master", + "fieldname": "charge", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Taxes and Charges", + "trigger": "Client", + "fieldname": "get_charges", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Sales Taxes and Charges", + "oldfieldname": "other_charges", + "options": "Sales Taxes and Charges", + "fieldname": "other_charges", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Calculate Taxes and Charges", + "trigger": "Client", + "fieldname": "calculate_charges", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Total*", + "oldfieldname": "other_charges_total", + "width": "150px", + "fieldname": "other_charges_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 0, + "oldfieldtype": "HTML", + "doctype": "DocField", + "label": "Taxes and Charges Calculation", + "fieldname": "other_charges_calculation", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Totals", + "fieldname": "totals", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total*", + "oldfieldname": "grand_total", + "width": "150px", + "fieldname": "grand_total", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rounded Total", + "oldfieldname": "rounded_total", + "width": "150px", + "fieldname": "rounded_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "In Words will be visible once you save the Sales Order.", + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words", + "oldfieldname": "in_words", + "width": "200px", + "fieldname": "in_words", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total (Export)", + "oldfieldname": "grand_total_export", + "width": "150px", + "fieldname": "grand_total_export", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rounded Total (Export)", + "oldfieldname": "rounded_total_export", + "width": "150px", + "fieldname": "rounded_total_export", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words (Export)", + "oldfieldname": "in_words_export", + "width": "200px", + "fieldname": "in_words_export", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 0, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Terms and Conditions", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Select Terms and Conditions", + "oldfieldname": "tc_name", + "options": "Terms and Conditions", + "fieldname": "tc_name", + "fieldtype": "Link", + "search_index": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Terms and Conditions", + "options": "get_tc_details", + "fieldname": "get_terms", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "HTML", + "doctype": "DocField", + "label": "Terms and Conditions HTML", + "options": "You can add Terms and Notes that will be printed in the Transaction", + "fieldname": "terms_html", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Text Editor", + "doctype": "DocField", + "label": "Terms and Conditions Details", + "oldfieldname": "terms", + "fieldname": "terms", + "fieldtype": "Text Editor", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Contact Info", + "fieldname": "contact_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break45", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Customer Address", + "options": "Address", + "fieldname": "customer_address", + "fieldtype": "Link", + "hidden": 0, + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Contact Person", + "options": "Contact", + "fieldname": "contact_person", + "fieldtype": "Link", + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "search_index": 1, + "doctype": "DocField", + "label": "Territory", + "options": "Territory", + "fieldname": "territory", + "fieldtype": "Link", + "reqd": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break46", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Category of customer as entered in Customer master", + "search_index": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer Group", + "permlevel": 0, + "fieldname": "customer_group", + "fieldtype": "Link", + "reqd": 1, + "in_filter": 1, + "options": "Customer Group" + }, + { + "print_hide": 1, + "description": "Filling in additional information about the Sales Order will help you analyze your data better.", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "More Info", + "fieldname": "more_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break4", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Letter Head", + "oldfieldname": "letter_head", + "options": "link:Letter Head", + "fieldname": "letter_head", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Select Print Heading", + "oldfieldname": "select_print_heading", + "permlevel": 0, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "options": "Print Heading", + "report_hide": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Campaign", + "oldfieldname": "campaign", + "options": "Campaign", + "fieldname": "campaign", + "fieldtype": "Link", + "depends_on": "eval:doc.source == 'Campaign'", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Amended From", + "oldfieldname": "amended_from", + "width": "150px", + "fieldname": "amended_from", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "The date at which current entry is corrected in the system.", + "no_copy": 1, + "oldfieldtype": "Date", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Amendment Date", + "oldfieldname": "amendment_date", + "width": "100px", + "fieldname": "amendment_date", + "fieldtype": "Date", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select the relevant company name if you have multiple companies.", + "permlevel": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Company", + "oldfieldname": "company", + "width": "150px", + "trigger": "Client", + "fieldname": "company", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "options": "Company" + }, + { + "print_hide": 1, + "permlevel": 0, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "width": "150px", + "fieldname": "fiscal_year", + "fieldtype": "Select", + "search_index": 1, + "reqd": 1, + "options": "link:Fiscal Year", + "in_filter": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "no_copy": 1, + "depends_on": "eval:!doc.__islocal", + "colour": "White:FFF", + "oldfieldtype": "Data", + "label": "Cancel Reason", + "oldfieldname": "cancel_reason", + "fieldname": "cancel_reason", + "fieldtype": "Data", + "no_column": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break5", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Source", + "oldfieldname": "source", + "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + "fieldname": "source", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "description": "Track this Sales Order against any Project", + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Project Name", + "oldfieldname": "project_name", + "permlevel": 0, + "trigger": "Client", + "fieldname": "project_name", + "fieldtype": "Link", + "search_index": 1, + "in_filter": 1, + "options": "Project" + }, + { + "print_hide": 1, + "permlevel": 1, + "width": "100px", + "default": "Draft", + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Status", + "oldfieldname": "status", + "no_copy": 1, + "fieldname": "status", + "fieldtype": "Select", + "search_index": 1, + "reqd": 1, + "options": "\nDraft\nSubmitted\nStopped\nCancelled", + "in_filter": 1 + }, + { + "print_hide": 1, + "description": "% of materials delivered against this Sales Order", + "no_copy": 1, + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "% Delivered", + "oldfieldname": "per_delivered", + "width": "100px", + "fieldname": "per_delivered", + "fieldtype": "Currency", + "depends_on": "eval:!doc.__islocal", + "in_filter": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "% of materials billed against this Sales Order", + "no_copy": 1, + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "% Amount Billed", + "oldfieldname": "per_billed", + "width": "100px", + "fieldname": "per_billed", + "fieldtype": "Currency", + "depends_on": "eval:!doc.__islocal", + "in_filter": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "Delivery Status", + "options": "Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable", + "fieldname": "delivery_status", + "fieldtype": "Select", + "no_column": 0, + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "Billing Status", + "options": "Billed\nNot Billed\nPartly Billed\nClosed", + "fieldname": "billing_status", + "fieldtype": "Select", + "no_column": 0, + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Display all the individual items delivered with the main items", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Packing List", + "fieldname": "packing_list", + "fieldtype": "Section Break", + "hidden": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Table", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Packing Details", + "oldfieldname": "packing_details", + "options": "Delivery Note Packing Item", + "fieldname": "packing_details", + "fieldtype": "Table", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Sales Team", + "fieldname": "sales_team_section_break", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break6", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Name as entered in Sales Partner master", + "permlevel": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Sales Partner", + "oldfieldname": "sales_partner", + "width": "150px", + "trigger": "Client", + "fieldname": "sales_partner", + "fieldtype": "Link", + "search_index": 1, + "in_filter": 1, + "options": "Sales Partner" + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break7", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Commission Rate", + "oldfieldname": "commission_rate", + "width": "100px", + "trigger": "Client", + "fieldname": "commission_rate", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Total Commission", + "oldfieldname": "total_commission", + "trigger": "Client", + "fieldname": "total_commission", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "options": "Simple", + "fieldname": "section_break1", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Sales Team1", + "oldfieldname": "sales_team", + "options": "Sales Team", + "fieldname": "sales_team", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "File List", + "fieldname": "file_list", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Sales User", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Maintenance User", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Maintenance Manager", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Maintenance Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Sales Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Sales Manager", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 1, + "role": "Accounts User", + "cancel": 0, + "permlevel": 2 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Customer", + "cancel": 0, + "permlevel": 0, + "match": "customer" + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Sales User", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Maintenance User", + "cancel": 0, + "permlevel": 1 + } ] \ No newline at end of file diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py index 755ca86c01..e5aa9090c3 100644 --- a/stock/doctype/delivery_note/delivery_note.py +++ b/stock/doctype/delivery_note/delivery_note.py @@ -20,7 +20,7 @@ import webnotes from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add from webnotes.model import db_exists -from webnotes.model.doc import Document, addchild, getchildren, make_autoname +from webnotes.model.doc import Document, addchild, getchildren from webnotes.model.wrapper import getlist, copy_doclist from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax from webnotes import session, form, msgprint, errprint @@ -42,11 +42,6 @@ class DocType(TransactionBase): self.tname = 'Delivery Note Item' self.fname = 'delivery_note_details' - - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') - - def validate_fiscal_year(self): get_obj('Sales Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.posting_date,'Posting Date') diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt index 2520c47992..bdeea6c031 100644 --- a/stock/doctype/delivery_note/delivery_note.txt +++ b/stock/doctype/delivery_note/delivery_note.txt @@ -1,1471 +1,1234 @@ -# DocType, Delivery Note [ - - # These values are common in all dictionaries - { - 'creation': '2012-07-13 11:57:15', - 'docstatus': 0, - 'modified': '2012-07-16 16:24:46', - 'modified_by': u'Administrator', - 'owner': u'Administrator' - }, - - # These values are common for all DocType - { - '_last_update': u'1330593645', - 'allow_attach': 1, - 'colour': u'White:FFF', - 'default_print_format': u'Standard', - 'doctype': 'DocType', - 'document_type': u'Transaction', - 'in_create': 0, - 'is_submittable': 1, - 'is_transaction_doc': 1, - 'module': u'Stock', - 'name': '__common__', - 'read_only_onload': 1, - 'search_fields': u'status,customer,customer_name, territory,grand_total', - 'section_style': u'Tabbed', - 'server_code_error': u' ', - 'show_in_menu': 0, - 'subject': u'To %(customer_name)s on %(posting_date)s | %(per_billed)s% billed', - 'tag_fields': u'billing_status', - 'version': 1 - }, - - # These values are common for all DocField - { - 'doctype': u'DocField', - 'name': '__common__', - 'parent': u'Delivery Note', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - 'doctype': u'DocPerm', - 'name': '__common__', - 'parent': u'Delivery Note', - 'parentfield': u'permissions', - 'parenttype': u'DocType', - 'read': 1 - }, - - # DocType, Delivery Note - { - 'doctype': 'DocType', - 'name': u'Delivery Note' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'basic_info', - 'fieldtype': u'Section Break', - 'label': u'Basic Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break0', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'trigger': u'Client', - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'To manage multiple series please go to Setup > Manage Series', - 'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'label': u'Series', - 'no_copy': 1, - 'oldfieldname': u'naming_series', - 'oldfieldtype': u'Select', - 'options': u'DN', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'customer', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer', - 'oldfieldname': u'customer', - 'oldfieldtype': u'Link', - 'options': u'Customer', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'customer_name', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Customer Name', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'customer_address', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Select Shipping Address', - 'options': u'Address', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'address_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Shipping Address', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_display', - 'fieldtype': u'Small Text', - 'hidden': 1, - 'label': u'Contact', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_mobile', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_email', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'Contact Email', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'Today', - 'description': u'The date at which current entry will get or has actually executed.', - 'doctype': u'DocField', - 'fieldname': u'posting_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Posting Date', - 'no_copy': 1, - 'oldfieldname': u'posting_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 0, - 'reqd': 1, - 'search_index': 1, - 'width': u'100px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'challan_no', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Challan No', - 'oldfieldname': u'challan_no', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'challan_date', - 'fieldtype': u'Date', - 'hidden': 1, - 'label': u'Challan Date', - 'oldfieldname': u'challan_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'po_no', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'P.O. No', - 'no_copy': 0, - 'oldfieldname': u'po_no', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.po_no', - 'doctype': u'DocField', - 'fieldname': u'po_date', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'P.O. Date', - 'no_copy': 0, - 'oldfieldname': u'po_date', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'items', - 'fieldtype': u'Section Break', - 'label': u'Items', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'delivery_note_details', - 'fieldtype': u'Table', - 'label': u'Delivery Note Items', - 'no_copy': 0, - 'oldfieldname': u'delivery_note_details', - 'oldfieldtype': u'Table', - 'options': u'Delivery Note Item', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'sales_bom_help', - 'fieldtype': u'HTML', - 'label': u'Sales BOM Help', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'section_break0', - 'fieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break24', - 'fieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'net_total', - 'fieldtype': u'Currency', - 'label': u'Net Total*', - 'no_copy': 0, - 'oldfieldname': u'net_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'recalculate_values', - 'fieldtype': u'Button', - 'label': u'Re-Calculate Values', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break28', - 'fieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.', - 'doctype': u'DocField', - 'fieldname': u'sales_order_no', - 'fieldtype': u'Link', - 'label': u'Sales Order No', - 'no_copy': 0, - 'oldfieldname': u'sales_order_no', - 'oldfieldtype': u'Link', - 'options': u'Sales Order', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_items', - 'fieldtype': u'Button', - 'hidden': 0, - 'label': u'Get Items', - 'oldfieldtype': u'Button', - 'options': u'pull_sales_order_details', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'sec_break25', - 'fieldtype': u'Section Break', - 'label': u'Price List and Currency', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break23', - 'fieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.', - 'doctype': u'DocField', - 'fieldname': u'price_list_name', - 'fieldtype': u'Select', - 'label': u'Price List', - 'oldfieldname': u'price_list_name', - 'oldfieldtype': u'Select', - 'options': u'link:Price List', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the currency in which price list is maintained', - 'doctype': u'DocField', - 'fieldname': u'price_list_currency', - 'fieldtype': u'Select', - 'label': u'Price List Currency', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"Rate at which Price list currency is converted to company's base currency", - 'doctype': u'DocField', - 'fieldname': u'plc_conversion_rate', - 'fieldtype': u'Float', - 'label': u'Price List Currency Conversion Rate', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break2', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u"Customer's Currency", - 'doctype': u'DocField', - 'fieldname': u'currency', - 'fieldtype': u'Select', - 'label': u'Currency', - 'oldfieldname': u'currency', - 'oldfieldtype': u'Select', - 'options': u'link:Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'1.00', - 'description': u"Rate at which customer's currency is converted to company's base currency", - 'doctype': u'DocField', - 'fieldname': u'conversion_rate', - 'fieldtype': u'Float', - 'label': u'Conversion Rate', - 'no_copy': 0, - 'oldfieldname': u'conversion_rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'taxes', - 'fieldtype': u'Section Break', - 'label': u'Taxes', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.', - 'doctype': u'DocField', - 'fieldname': u'charge', - 'fieldtype': u'Link', - 'label': u'Taxes and Charges', - 'oldfieldname': u'charge', - 'oldfieldtype': u'Link', - 'options': u'Sales Taxes and Charges Master', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_charges', - 'fieldtype': u'Button', - 'label': u'Get Taxes and Charges', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges', - 'fieldtype': u'Table', - 'label': u'Sales Taxes and Charges', - 'no_copy': 0, - 'oldfieldname': u'other_charges', - 'oldfieldtype': u'Table', - 'options': u'Sales Taxes and Charges', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_total', - 'fieldtype': u'Currency', - 'label': u'Taxes and Charges Total', - 'oldfieldname': u'other_charges_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'calculate_charges', - 'fieldtype': u'Button', - 'label': u'Calculate Charges', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'other_charges_calculation', - 'fieldtype': u'HTML', - 'label': u'Taxes and Charges Calculation', - 'oldfieldtype': u'HTML', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'totals', - 'fieldtype': u'Section Break', - 'label': u'Totals', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'grand_total', - 'fieldtype': u'Currency', - 'label': u'Grand Total', - 'no_copy': 0, - 'oldfieldname': u'grand_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 0, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'rounded_total', - 'fieldtype': u'Currency', - 'label': u'Rounded Total', - 'no_copy': 0, - 'oldfieldname': u'rounded_total', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'In Words will be visible once you save the Delivery Note.', - 'doctype': u'DocField', - 'fieldname': u'in_words', - 'fieldtype': u'Data', - 'label': u'In Words', - 'no_copy': 0, - 'oldfieldname': u'in_words', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'200px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'grand_total_export', - 'fieldtype': u'Currency', - 'label': u'Grand Total (Export)', - 'no_copy': 0, - 'oldfieldname': u'grand_total_export', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'reqd': 0, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'rounded_total_export', - 'fieldtype': u'Currency', - 'label': u'Rounded Total (Export)', - 'no_copy': 0, - 'oldfieldname': u'rounded_total_export', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 0, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'In Words (Export) will be visible once you save the Delivery Note.', - 'doctype': u'DocField', - 'fieldname': u'in_words_export', - 'fieldtype': u'Data', - 'label': u'In Words (Export)', - 'no_copy': 0, - 'oldfieldname': u'in_words_export', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 0, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'terms_section_break', - 'fieldtype': u'Section Break', - 'label': u'Terms and Conditions', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'tc_name', - 'fieldtype': u'Link', - 'label': u'Select Terms and Conditions', - 'oldfieldname': u'tc_name', - 'oldfieldtype': u'Link', - 'options': u'Terms and Conditions', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'get_terms', - 'fieldtype': u'Button', - 'label': u'Get Terms and Conditions', - 'oldfieldtype': u'Button', - 'options': u'get_tc_details', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Server' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'terms_html', - 'fieldtype': u'HTML', - 'label': u'Terms and Conditions HTML', - 'oldfieldtype': u'HTML', - 'options': u'You can add Terms and Notes that will be printed in the Transaction', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'terms', - 'fieldtype': u'Text Editor', - 'label': u'Terms and Conditions Details', - 'oldfieldname': u'terms', - 'oldfieldtype': u'Text Editor', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'transporter_info', - 'fieldtype': u'Section Break', - 'label': u'Transporter Info', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break4', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'transporter_name', - 'fieldtype': u'Data', - 'label': u'Transporter Name', - 'no_copy': 0, - 'oldfieldname': u'transporter_name', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'trigger': u'Client', - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break34', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Transporter lorry number', - 'doctype': u'DocField', - 'fieldname': u'lr_no', - 'fieldtype': u'Data', - 'label': u'LR No', - 'no_copy': 0, - 'oldfieldname': u'lr_no', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'Today', - 'description': u'Date on which lorry started from your warehouse', - 'doctype': u'DocField', - 'fieldname': u'lr_date', - 'fieldtype': u'Date', - 'label': u'LR Date', - 'no_copy': 0, - 'oldfieldname': u'lr_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_info', - 'fieldtype': u'Section Break', - 'label': u'Contact Info', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break20', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col_break21', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'territory', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Territory', - 'options': u'Territory', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'customer_group', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer Group', - 'options': u'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Filling in Additional Information about the Delivery Note will help you analyze your data better.', - 'doctype': u'DocField', - 'fieldname': u'more_info', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Time at which items were delivered from warehouse', - 'doctype': u'DocField', - 'fieldname': u'posting_time', - 'fieldtype': u'Time', - 'in_filter': 0, - 'label': u'Posting Time', - 'oldfieldname': u'posting_time', - 'oldfieldtype': u'Time', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 0, - 'width': u'100px' - }, - - # DocField - { - 'default': u'Draft', - 'doctype': u'DocField', - 'fieldname': u'status', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Status', - 'no_copy': 1, - 'oldfieldname': u'status', - 'oldfieldtype': u'Select', - 'options': u'\nDraft\nSubmitted\nCancelled', - 'permlevel': 1, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': u'150px' - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'letter_head', - 'fieldtype': u'Select', - 'label': u'Letter Head', - 'oldfieldname': u'letter_head', - 'oldfieldtype': u'Link', - 'options': u'link:Letter Head', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'select_print_heading', - 'fieldtype': u'Link', - 'label': u'Select Print Heading', - 'no_copy': 1, - 'oldfieldname': u'select_print_heading', - 'oldfieldtype': u'Link', - 'options': u'Print Heading', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Track this Delivery Note against any Project', - 'doctype': u'DocField', - 'fieldname': u'project_name', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Project Name', - 'oldfieldname': u'project_name', - 'oldfieldtype': u'Link', - 'options': u'Project', - 'permlevel': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'source', - 'fieldtype': u'Select', - 'label': u'Source', - 'oldfieldname': u'source', - 'oldfieldtype': u'Select', - 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u"eval:doc.source == 'Campaign'", - 'doctype': u'DocField', - 'fieldname': u'campaign', - 'fieldtype': u'Link', - 'label': u'Campaign', - 'oldfieldname': u'campaign', - 'oldfieldtype': u'Link', - 'options': u'Campaign', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'print_without_amount', - 'fieldtype': u'Check', - 'label': u'Print Without Amount', - 'oldfieldname': u'print_without_amount', - 'oldfieldtype': u'Check', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break5', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials billed against this Delivery Note', - 'doctype': u'DocField', - 'fieldname': u'per_billed', - 'fieldtype': u'Currency', - 'in_filter': 1, - 'label': u'% Amount Billed', - 'no_copy': 1, - 'oldfieldname': u'per_billed', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'billing_status', - 'fieldtype': u'Select', - 'hidden': 1, - 'label': u'Billing Status', - 'no_copy': 1, - 'options': u'\nNot Billed\nPartly Billed\nFully Billed', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'description': u'% of materials delivered against this Delivery Note', - 'doctype': u'DocField', - 'fieldname': u'per_installed', - 'fieldtype': u'Currency', - 'in_filter': 1, - 'label': u'% Installed', - 'no_copy': 1, - 'oldfieldname': u'per_installed', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'search_index': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'installation_status', - 'fieldtype': u'Select', - 'hidden': 1, - 'label': u'Installation Status', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Data', - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Required only for sample item.', - 'doctype': u'DocField', - 'fieldname': u'to_warehouse', - 'fieldtype': u'Link', - 'hidden': 0, - 'label': u'To Warehouse', - 'no_copy': 1, - 'oldfieldname': u'to_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'excise_page', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Excise Page Number', - 'oldfieldname': u'excise_page', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'instructions', - 'fieldtype': u'Text', - 'label': u'Instructions', - 'oldfieldname': u'instructions', - 'oldfieldtype': u'Text', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Select the relevant company name if you have multiple companies', - 'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Company', - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Fiscal Year', - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'width': u'150px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:!doc.__islocal', - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'hidden': 0, - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'packing_list', - 'fieldtype': u'Section Break', - 'label': u'Packing List', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'packing_details', - 'fieldtype': u'Table', - 'label': u'Packing Details', - 'oldfieldname': u'packing_details', - 'oldfieldtype': u'Table', - 'options': u'Delivery Note Packing Item', - 'permlevel': 1, - 'print_hide': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'sales_team_section_break', - 'fieldtype': u'Section Break', - 'label': u'Sales Team', - 'oldfieldtype': u'Section Break', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break6', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'sales_partner', - 'fieldtype': u'Link', - 'label': u'Sales Partner', - 'no_copy': 0, - 'oldfieldname': u'sales_partner', - 'oldfieldtype': u'Link', - 'options': u'Sales Partner', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client', - 'width': u'150px' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'column_break7', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'commission_rate', - 'fieldtype': u'Currency', - 'label': u'Commission Rate (%)', - 'no_copy': 0, - 'oldfieldname': u'commission_rate', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client', - 'width': u'100px' - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'total_commission', - 'fieldtype': u'Currency', - 'label': u'Total Commission', - 'no_copy': 0, - 'oldfieldname': u'total_commission', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'section_break1', - 'fieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'sales_team', - 'fieldtype': u'Table', - 'label': u'Sales Team1', - 'oldfieldname': u'sales_team', - 'oldfieldtype': u'Table', - 'options': u'Sales Team', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'file_list', - 'fieldtype': u'Text', - 'hidden': 1, - 'label': u'File List', - 'no_copy': 1, - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Material User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Material User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Material Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Material Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Sales User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Sales User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Accounts User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Accounts User' - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'match': u'customer_name', - 'permlevel': 0, - 'role': u'Customer' - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 2, - 'role': u'All', - 'write': 1 - } + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2012-11-02 17:16:55", + "modified_by": "Administrator", + "modified": "2012-11-26 11:56:10" + }, + { + "is_submittable": 1, + "in_create": 0, + "search_fields": "status,customer,customer_name, territory,grand_total", + "module": "Stock", + "read_only_onload": 1, + "document_type": "Transaction", + "allow_attach": 1, + "autoname": "naming_series:", + "name": "__common__", + "default_print_format": "Standard", + "doctype": "DocType" + }, + { + "name": "__common__", + "parent": "Delivery Note", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Delivery Note", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Delivery Note", + "doctype": "DocType" + }, + { + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Basic Info", + "fieldname": "basic_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "trigger": "Client", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "To manage multiple series please go to Setup > Manage Series", + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Series", + "oldfieldname": "naming_series", + "permlevel": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "reqd": 1, + "options": "DN" + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Customer", + "oldfieldname": "customer", + "permlevel": 0, + "trigger": "Client", + "fieldname": "customer", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "options": "Customer", + "in_filter": 1 + }, + { + "doctype": "DocField", + "label": "Customer Name", + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Select Shipping Address", + "options": "Address", + "fieldname": "customer_address", + "fieldtype": "Link", + "permlevel": 0, + "in_filter": 1 + }, + { + "doctype": "DocField", + "label": "Shipping Address", + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Contact", + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Mobile No", + "fieldname": "contact_mobile", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Contact Email", + "fieldname": "contact_email", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 1 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "description": "The date at which current entry will get or has actually executed.", + "width": "100px", + "default": "Today", + "oldfieldtype": "Date", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Posting Date", + "oldfieldname": "posting_date", + "no_copy": 1, + "fieldname": "posting_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Challan No", + "oldfieldname": "challan_no", + "fieldname": "challan_no", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Challan Date", + "oldfieldname": "challan_date", + "fieldname": "challan_date", + "fieldtype": "Date", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "P.O. No", + "oldfieldname": "po_no", + "width": "100px", + "fieldname": "po_no", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "P.O. Date", + "oldfieldname": "po_date", + "width": "100px", + "fieldname": "po_date", + "fieldtype": "Data", + "depends_on": "eval:doc.po_no", + "hidden": 1, + "permlevel": 1 + }, + { + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Items", + "fieldname": "items", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Table", + "colour": "White:FFF", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Delivery Note Items", + "oldfieldname": "delivery_note_details", + "permlevel": 0, + "fieldname": "delivery_note_details", + "fieldtype": "Table", + "options": "Delivery Note Item" + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Sales BOM Help", + "fieldname": "sales_bom_help", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "doctype": "DocField", + "options": "Simple", + "fieldname": "section_break0", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "fieldname": "col_break24", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Net Total*", + "oldfieldname": "net_total", + "width": "150px", + "fieldname": "net_total", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Re-Calculate Values", + "trigger": "Client", + "fieldname": "recalculate_values", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "doctype": "DocField", + "fieldname": "col_break28", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.", + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Sales Order No", + "oldfieldname": "sales_order_no", + "permlevel": 0, + "fieldname": "sales_order_no", + "fieldtype": "Link", + "options": "Sales Order" + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Items", + "options": "pull_sales_order_details", + "fieldname": "get_items", + "fieldtype": "Button", + "hidden": 0, + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Price List and Currency", + "fieldname": "sec_break25", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "fieldname": "col_break23", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List", + "oldfieldname": "price_list_name", + "permlevel": 0, + "trigger": "Client", + "fieldname": "price_list_name", + "fieldtype": "Select", + "reqd": 1, + "options": "link:Price List" + }, + { + "print_hide": 1, + "description": "Select the currency in which price list is maintained", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List Currency", + "options": "link:Currency", + "fieldname": "price_list_currency", + "fieldtype": "Select", + "reqd": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Rate at which Price list currency is converted to company's base currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Price List Currency Conversion Rate", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "reqd": 1, + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Customer's Currency", + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Currency", + "oldfieldname": "currency", + "permlevel": 0, + "fieldname": "currency", + "fieldtype": "Select", + "reqd": 1, + "options": "link:Currency" + }, + { + "print_hide": 1, + "description": "Rate at which customer's currency is converted to company's base currency", + "no_copy": 0, + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Conversion Rate", + "oldfieldname": "conversion_rate", + "default": "1.00", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "reqd": 1, + "permlevel": 0 + }, + { + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Taxes", + "fieldname": "taxes", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Taxes and Charges", + "oldfieldname": "charge", + "options": "Sales Taxes and Charges Master", + "fieldname": "charge", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Taxes and Charges", + "trigger": "Client", + "fieldname": "get_charges", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "no_copy": 0, + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Sales Taxes and Charges", + "oldfieldname": "other_charges", + "options": "Sales Taxes and Charges", + "fieldname": "other_charges", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Taxes and Charges Total", + "oldfieldname": "other_charges_total", + "width": "150px", + "fieldname": "other_charges_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Calculate Charges", + "trigger": "Client", + "fieldname": "calculate_charges", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "oldfieldtype": "HTML", + "doctype": "DocField", + "label": "Taxes and Charges Calculation", + "fieldname": "other_charges_calculation", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 0, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Totals", + "fieldname": "totals", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total", + "oldfieldname": "grand_total", + "width": "150px", + "fieldname": "grand_total", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rounded Total", + "oldfieldname": "rounded_total", + "width": "150px", + "fieldname": "rounded_total", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "In Words will be visible once you save the Delivery Note.", + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words", + "oldfieldname": "in_words", + "width": "200px", + "fieldname": "in_words", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Grand Total (Export)", + "oldfieldname": "grand_total_export", + "width": "150px", + "fieldname": "grand_total_export", + "fieldtype": "Currency", + "reqd": 0, + "permlevel": 1 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Rounded Total (Export)", + "oldfieldname": "rounded_total_export", + "width": "150px", + "fieldname": "rounded_total_export", + "fieldtype": "Currency", + "permlevel": 1 + }, + { + "print_hide": 0, + "description": "In Words (Export) will be visible once you save the Delivery Note.", + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "In Words (Export)", + "oldfieldname": "in_words_export", + "width": "150px", + "fieldname": "in_words_export", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Terms and Conditions", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Select Terms and Conditions", + "oldfieldname": "tc_name", + "options": "Terms and Conditions", + "fieldname": "tc_name", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Get Terms and Conditions", + "trigger": "Server", + "fieldname": "get_terms", + "fieldtype": "Button", + "options": "get_tc_details", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "HTML", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Terms and Conditions HTML", + "options": "You can add Terms and Notes that will be printed in the Transaction", + "fieldname": "terms_html", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "oldfieldtype": "Text Editor", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Terms and Conditions Details", + "oldfieldname": "terms", + "fieldname": "terms", + "fieldtype": "Text Editor", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Transporter Info", + "fieldname": "transporter_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break4", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Transporter Name", + "oldfieldname": "transporter_name", + "width": "150px", + "trigger": "Client", + "fieldname": "transporter_name", + "fieldtype": "Data", + "reqd": 0, + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break34", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Transporter lorry number", + "no_copy": 0, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "LR No", + "oldfieldname": "lr_no", + "width": "100px", + "fieldname": "lr_no", + "fieldtype": "Data", + "reqd": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Date on which lorry started from your warehouse", + "width": "100px", + "default": "Today", + "oldfieldtype": "Date", + "colour": "White:FFF", + "doctype": "DocField", + "label": "LR Date", + "oldfieldname": "lr_date", + "no_copy": 0, + "fieldname": "lr_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Contact Info", + "fieldname": "contact_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break20", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Contact Person", + "options": "Contact", + "fieldname": "contact_person", + "fieldtype": "Link", + "permlevel": 0, + "in_filter": 1 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break21", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "search_index": 1, + "doctype": "DocField", + "label": "Territory", + "options": "Territory", + "fieldname": "territory", + "fieldtype": "Link", + "reqd": 1, + "hidden": 0, + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "search_index": 1, + "doctype": "DocField", + "label": "Customer Group", + "options": "Customer Group", + "fieldname": "customer_group", + "fieldtype": "Link", + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "More Info", + "fieldname": "more_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Time at which items were delivered from warehouse", + "oldfieldtype": "Time", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Posting Time", + "oldfieldname": "posting_time", + "width": "100px", + "fieldname": "posting_time", + "fieldtype": "Time", + "search_index": 0, + "reqd": 1, + "in_filter": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "permlevel": 1, + "width": "150px", + "default": "Draft", + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Status", + "oldfieldname": "status", + "no_copy": 1, + "fieldname": "status", + "fieldtype": "Select", + "search_index": 1, + "reqd": 1, + "options": "\nDraft\nSubmitted\nCancelled", + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Letter Head", + "oldfieldname": "letter_head", + "options": "link:Letter Head", + "fieldname": "letter_head", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Select Print Heading", + "oldfieldname": "select_print_heading", + "permlevel": 0, + "trigger": "Client", + "fieldname": "select_print_heading", + "fieldtype": "Link", + "options": "Print Heading", + "report_hide": 1 + }, + { + "description": "Track this Delivery Note against any Project", + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Project Name", + "oldfieldname": "project_name", + "permlevel": 0, + "trigger": "Client", + "fieldname": "project_name", + "fieldtype": "Link", + "search_index": 1, + "in_filter": 1, + "options": "Project" + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Source", + "oldfieldname": "source", + "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + "fieldname": "source", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Campaign", + "oldfieldname": "campaign", + "options": "Campaign", + "fieldname": "campaign", + "fieldtype": "Link", + "depends_on": "eval:doc.source == 'Campaign'", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Check", + "allow_on_submit": 1, + "doctype": "DocField", + "label": "Print Without Amount", + "oldfieldname": "print_without_amount", + "trigger": "Client", + "fieldname": "print_without_amount", + "fieldtype": "Check", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break5", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "depends_on": "eval:!doc.__islocal", + "description": "% of materials billed against this Delivery Note", + "no_copy": 1, + "search_index": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "% Amount Billed", + "oldfieldname": "per_billed", + "fieldname": "per_billed", + "fieldtype": "Currency", + "oldfieldtype": "Currency", + "in_filter": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "Billing Status", + "options": "\nNot Billed\nPartly Billed\nFully Billed", + "fieldname": "billing_status", + "fieldtype": "Select", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "depends_on": "eval:!doc.__islocal", + "description": "% of materials delivered against this Delivery Note", + "no_copy": 1, + "search_index": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "% Installed", + "oldfieldname": "per_installed", + "fieldname": "per_installed", + "fieldtype": "Currency", + "oldfieldtype": "Currency", + "in_filter": 1, + "permlevel": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Installation Status", + "fieldname": "installation_status", + "fieldtype": "Select", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Amended From", + "oldfieldname": "amended_from", + "width": "150px", + "fieldname": "amended_from", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "description": "The date at which current entry is corrected in the system.", + "no_copy": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Amendment Date", + "oldfieldname": "amendment_date", + "width": "100px", + "fieldname": "amendment_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Required only for sample item.", + "no_copy": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "To Warehouse", + "oldfieldname": "to_warehouse", + "permlevel": 0, + "fieldname": "to_warehouse", + "fieldtype": "Link", + "hidden": 0, + "options": "Warehouse" + }, + { + "print_hide": 1, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Excise Page Number", + "oldfieldname": "excise_page", + "fieldname": "excise_page", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 0 + }, + { + "oldfieldtype": "Text", + "doctype": "DocField", + "label": "Instructions", + "oldfieldname": "instructions", + "fieldname": "instructions", + "fieldtype": "Text", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "Select the relevant company name if you have multiple companies", + "permlevel": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Company", + "oldfieldname": "company", + "width": "150px", + "fieldname": "company", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "in_filter": 1, + "options": "Company" + }, + { + "print_hide": 1, + "permlevel": 0, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "width": "150px", + "fieldname": "fiscal_year", + "fieldtype": "Select", + "search_index": 1, + "reqd": 1, + "options": "link:Fiscal Year", + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Cancel Reason", + "oldfieldname": "cancel_reason", + "fieldname": "cancel_reason", + "fieldtype": "Data", + "depends_on": "eval:!doc.__islocal", + "hidden": 0, + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Packing List", + "fieldname": "packing_list", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Packing Details", + "oldfieldname": "packing_details", + "options": "Delivery Note Packing Item", + "fieldname": "packing_details", + "fieldtype": "Table", + "permlevel": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Sales Team", + "fieldname": "sales_team_section_break", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break6", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "permlevel": 0, + "no_copy": 0, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Sales Partner", + "oldfieldname": "sales_partner", + "width": "150px", + "trigger": "Client", + "fieldname": "sales_partner", + "fieldtype": "Link", + "options": "Sales Partner" + }, + { + "print_hide": 1, + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break7", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "doctype": "DocField", + "label": "Commission Rate (%)", + "oldfieldname": "commission_rate", + "width": "100px", + "trigger": "Client", + "fieldname": "commission_rate", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Total Commission", + "oldfieldname": "total_commission", + "trigger": "Client", + "fieldname": "total_commission", + "fieldtype": "Currency", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "options": "Simple", + "fieldname": "section_break1", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Table", + "doctype": "DocField", + "label": "Sales Team1", + "oldfieldname": "sales_team", + "options": "Sales Team", + "fieldname": "sales_team", + "fieldtype": "Table", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "doctype": "DocField", + "label": "File List", + "fieldname": "file_list", + "fieldtype": "Text", + "hidden": 1, + "permlevel": 0 + }, + { + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Accounts User", + "cancel": 0, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Accounts User", + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Sales User", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Sales User", + "cancel": 0, + "permlevel": 1 + }, + { + "doctype": "DocPerm", + "role": "Customer", + "permlevel": 0, + "match": "customer_name" + }, + { + "doctype": "DocPerm", + "write": 1, + "role": "All", + "permlevel": 2 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material Manager", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Material Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material User", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Material User", + "cancel": 1, + "permlevel": 0 + } ] \ No newline at end of file diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py index d8ffe2664d..cc3acfe56c 100644 --- a/stock/doctype/stock_entry/stock_entry.py +++ b/stock/doctype/stock_entry/stock_entry.py @@ -20,7 +20,7 @@ import webnotes from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add from webnotes.model import db_exists, delete_doc -from webnotes.model.doc import Document, addchild, getchildren, make_autoname +from webnotes.model.doc import Document, addchild, getchildren from webnotes.model.wrapper import getlist, copy_doclist from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax from webnotes import session, form, msgprint, errprint @@ -40,12 +40,6 @@ class DocType(TransactionBase): self.doclist = doclist self.item_dict = {} self.fname = 'mtn_details' - - # Autoname - # --------- - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') - # get item details # ---------------- diff --git a/stock/doctype/stock_entry/stock_entry.txt b/stock/doctype/stock_entry/stock_entry.txt index 0c1028fdd2..f77808e292 100644 --- a/stock/doctype/stock_entry/stock_entry.txt +++ b/stock/doctype/stock_entry/stock_entry.txt @@ -1,991 +1,855 @@ -# DocType, Stock Entry [ - - # These values are common in all dictionaries - { - 'creation': '2012-05-03 11:12:49', - 'docstatus': 0, - 'modified': '2012-07-17 13:32:44', - 'modified_by': u'Administrator', - 'owner': u'Administrator' - }, - - # These values are common for all DocType - { - '_last_update': u'1334303911', - 'allow_attach': 0, - 'allow_copy': 0, - 'allow_email': 0, - 'allow_print': 0, - 'allow_rename': 0, - 'allow_trash': 0, - 'colour': u'White:FFF', - 'default_print_format': u'Standard', - 'doctype': 'DocType', - 'hide_heading': 0, - 'hide_toolbar': 0, - 'in_create': 0, - 'in_dialog': 0, - 'is_submittable': 1, - 'is_transaction_doc': 0, - 'issingle': 0, - 'max_attachments': 0, - 'module': u'Stock', - 'name': '__common__', - 'print_outline': u'No', - 'read_only': 0, - 'read_only_onload': 0, - 'search_fields': u'transfer_date, from_warehouse, to_warehouse, purpose, remarks', - 'section_style': u'Tabbed', - 'server_code_error': u' ', - 'show_in_menu': 0, - 'subject': u'%(remarks)s', - 'tag_fields': u'purpose', - 'use_template': 0, - 'version': 1 - }, - - # These values are common for all DocField - { - 'doctype': u'DocField', - 'name': '__common__', - 'parent': u'Stock Entry', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - 'doctype': u'DocPerm', - 'name': '__common__', - 'parent': u'Stock Entry', - 'parentfield': u'permissions', - 'parenttype': u'DocType', - 'read': 1 - }, - - # DocType, Stock Entry - { - 'doctype': 'DocType', - 'name': u'Stock Entry' - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Material Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Material Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Material User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Material User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Production User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Production User' - }, - - # DocPerm - { - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 2, - 'role': u'Production User', - 'write': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Production Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Production Manager' - }, - - # DocPerm - { - 'doctype': u'DocPerm', - 'permlevel': 2, - 'role': u'Production Manager', - 'write': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'description': u'To manage multiple series please go to Setup > Manage Series', - 'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Series', - 'no_copy': 1, - 'oldfieldname': u'naming_series', - 'oldfieldtype': u'Select', - 'options': u'\nSTE', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'purpose', - 'fieldtype': u'Select', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Purpose', - 'no_copy': 0, - 'oldfieldname': u'purpose', - 'oldfieldtype': u'Select', - 'options': u'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order\nOther', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'delivery_note_no', - 'fieldtype': u'Link', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Delivery Note No', - 'no_copy': 0, - 'oldfieldname': u'delivery_note_no', - 'oldfieldtype': u'Link', - 'options': u'Delivery Note', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'purchase_receipt_no', - 'fieldtype': u'Link', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Purchase Receipt No', - 'no_copy': 0, - 'oldfieldname': u'purchase_receipt_no', - 'oldfieldtype': u'Link', - 'options': u'Purchase Receipt', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'sales_invoice_no', - 'fieldtype': u'Link', - 'hidden': 1, - 'label': u'Sales Invoice No', - 'options': u'Sales Invoice', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'process', - 'fieldtype': u'Select', - 'hidden': 1, - 'in_filter': 1, - 'label': u'Process', - 'no_copy': 0, - 'oldfieldname': u'process', - 'oldfieldtype': u'Select', - 'options': u'\nMaterial Transfer\nBackflush', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'production_order', - 'fieldtype': u'Link', - 'hidden': 1, - 'in_filter': 1, - 'label': u'Production Order', - 'no_copy': 0, - 'oldfieldname': u'production_order', - 'oldfieldtype': u'Link', - 'options': u'Production Order', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - 'depends_on': u"eval:doc.purpose == 'Other'", - 'doctype': u'DocField', - 'fieldname': u'bom_no', - 'fieldtype': u'Link', - 'label': u'BOM No', - 'options': u'BOM', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u"eval:doc.purpose == 'Other'", - 'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.', - 'doctype': u'DocField', - 'fieldname': u'consider_sa_items_as_raw_materials', - 'fieldtype': u'Select', - 'label': u'Consider SA Items as Raw Materials', - 'options': u'\nNo\nYes', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'fg_completed_qty', - 'fieldtype': u'Currency', - 'hidden': 0, - 'in_filter': 0, - 'label': u'FG Completed Qty', - 'no_copy': 0, - 'oldfieldname': u'fg_completed_qty', - 'oldfieldtype': u'Currency', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'get_items', - 'fieldtype': u'Button', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Get Items', - 'no_copy': 0, - 'oldfieldtype': u'Button', - 'options': u'get_items', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'warehouse_html', - 'fieldtype': u'HTML', - 'label': u'Warehouse HTML', - 'no_copy': 0, - 'oldfieldtype': u'HTML', - 'options': u"
Warehouse
", - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'from_warehouse', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Source Warehouse', - 'no_copy': 0, - 'oldfieldname': u'from_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'description': u'Notes: Either Source or Target is Mandatory', - 'doctype': u'DocField', - 'fieldname': u'to_warehouse', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Target Warehouse', - 'no_copy': 0, - 'oldfieldname': u'to_warehouse', - 'oldfieldtype': u'Link', - 'options': u'Warehouse', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col2', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'allow_on_submit': 0, - 'description': u'The date at which current entry will get or has actually executed.', - 'doctype': u'DocField', - 'fieldname': u'posting_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Posting Date', - 'no_copy': 1, - 'oldfieldname': u'posting_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'posting_time', - 'fieldtype': u'Time', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Posting Time', - 'no_copy': 1, - 'oldfieldname': u'posting_time', - 'oldfieldtype': u'Time', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'remarks', - 'fieldtype': u'Text', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Remarks', - 'no_copy': 1, - 'oldfieldname': u'remarks', - 'oldfieldtype': u'Text', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'items_section', - 'fieldtype': u'Section Break', - 'label': u'Items', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'mtn_details', - 'fieldtype': u'Table', - 'hidden': 0, - 'in_filter': 0, - 'label': u'MTN Details', - 'no_copy': 0, - 'oldfieldname': u'mtn_details', - 'oldfieldtype': u'Table', - 'options': u'Stock Entry Detail', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'item_section', - 'fieldtype': u'Section Break', - 'oldfieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'total_amount', - 'fieldtype': u'Currency', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Total Amount', - 'no_copy': 0, - 'oldfieldname': u'total_amount', - 'oldfieldtype': u'Currency', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col3', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'get_stock_and_rate', - 'fieldtype': u'Button', - 'label': u'Get Stock and Rate', - 'oldfieldtype': u'Button', - 'options': u'get_stock_and_rate', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'contact_section', - 'fieldtype': u'Section Break', - 'label': u'Contact Info', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'supplier', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Supplier', - 'no_copy': 0, - 'oldfieldname': u'supplier', - 'oldfieldtype': u'Link', - 'options': u'Supplier', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'supplier_name', - 'fieldtype': u'Data', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Supplier Name', - 'no_copy': 0, - 'oldfieldname': u'supplier_name', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'supplier_address', - 'fieldtype': u'Small Text', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Supplier Address', - 'no_copy': 0, - 'oldfieldname': u'supplier_address', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'customer', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Customer', - 'no_copy': 0, - 'oldfieldname': u'customer', - 'oldfieldtype': u'Link', - 'options': u'Customer', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'customer_name', - 'fieldtype': u'Data', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Customer Name', - 'no_copy': 0, - 'oldfieldname': u'customer_name', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'customer_address', - 'fieldtype': u'Small Text', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Customer Address', - 'no_copy': 0, - 'oldfieldname': u'customer_address', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'more_info', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col4', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'project_name', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Project Name', - 'oldfieldname': u'project_name', - 'oldfieldtype': u'Link', - 'options': u'Project', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'select_print_heading', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Select Print Heading', - 'no_copy': 0, - 'oldfieldname': u'select_print_heading', - 'oldfieldtype': u'Link', - 'options': u'Print Heading', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'cancel_reason', - 'fieldtype': u'Data', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Cancel Reason', - 'no_copy': 1, - 'oldfieldname': u'cancel_reason', - 'oldfieldtype': u'Data', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'default': u'Today', - 'doctype': u'DocField', - 'fieldname': u'transfer_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Transfer Date', - 'no_copy': 1, - 'oldfieldname': u'transfer_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 0, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'col5', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'is_excisable_goods', - 'fieldtype': u'Select', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Is Excisable Goods', - 'no_copy': 0, - 'oldfieldname': u'is_excisable_goods', - 'oldfieldtype': u'Select', - 'options': u'\nYes\nNo', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'excisable_goods', - 'fieldtype': u'Select', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Excisable Goods', - 'no_copy': 0, - 'oldfieldname': u'excisable_goods', - 'oldfieldtype': u'Select', - 'options': u'\nReturnable\nNon-Returnable', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'under_rule', - 'fieldtype': u'Select', - 'hidden': 1, - 'in_filter': 0, - 'label': u'Under Rule', - 'no_copy': 0, - 'oldfieldname': u'under_rule', - 'oldfieldtype': u'Select', - 'options': u'\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'transporter', - 'fieldtype': u'Data', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Transporter', - 'no_copy': 0, - 'oldfieldname': u'transporter', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Company', - 'no_copy': 0, - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Fiscal Year', - 'no_copy': 0, - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Link', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Link', - 'options': u'Stock Entry', - 'permlevel': 1, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - }, - - # DocField - { - 'allow_on_submit': 0, - 'description': u'The date at which current entry is corrected in the system.', - 'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'hidden': 0, - 'in_filter': 0, - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'report_hide': 0, - 'reqd': 0, - 'search_index': 0 - } + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2012-11-02 17:16:56", + "modified_by": "Administrator", + "modified": "2012-11-26 11:51:08" + }, + { + "is_submittable": 1, + "in_create": 0, + "allow_print": 0, + "search_fields": "transfer_date, from_warehouse, to_warehouse, purpose, remarks", + "module": "Stock", + "autoname": "naming_series:", + "read_only_onload": 0, + "in_dialog": 0, + "allow_attach": 0, + "read_only": 0, + "allow_email": 0, + "hide_heading": 0, + "issingle": 0, + "name": "__common__", + "default_print_format": "Standard", + "allow_rename": 0, + "doctype": "DocType", + "max_attachments": 0, + "hide_toolbar": 0, + "allow_copy": 0 + }, + { + "name": "__common__", + "parent": "Stock Entry", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Stock Entry", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Stock Entry", + "doctype": "DocType" + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "col1", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "To manage multiple series please go to Setup > Manage Series", + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Series", + "oldfieldname": "naming_series", + "permlevel": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "in_filter": 0, + "options": "\nSTE", + "report_hide": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Purpose", + "oldfieldname": "purpose", + "permlevel": 0, + "trigger": "Client", + "fieldname": "purpose", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order\nOther", + "report_hide": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Delivery Note No", + "oldfieldname": "delivery_note_no", + "permlevel": 0, + "trigger": "Client", + "fieldname": "delivery_note_no", + "fieldtype": "Link", + "search_index": 1, + "reqd": 0, + "hidden": 1, + "options": "Delivery Note", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Purchase Receipt No", + "oldfieldname": "purchase_receipt_no", + "permlevel": 0, + "trigger": "Client", + "fieldname": "purchase_receipt_no", + "fieldtype": "Link", + "search_index": 1, + "reqd": 0, + "hidden": 1, + "options": "Purchase Receipt", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Sales Invoice No", + "options": "Sales Invoice", + "fieldname": "sales_invoice_no", + "fieldtype": "Link", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Select", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Process", + "oldfieldname": "process", + "permlevel": 0, + "trigger": "Client", + "fieldname": "process", + "fieldtype": "Select", + "search_index": 0, + "reqd": 0, + "hidden": 1, + "options": "\nMaterial Transfer\nBackflush", + "report_hide": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Production Order", + "oldfieldname": "production_order", + "permlevel": 0, + "trigger": "Client", + "fieldname": "production_order", + "fieldtype": "Link", + "search_index": 1, + "reqd": 0, + "hidden": 1, + "options": "Production Order", + "report_hide": 0, + "in_filter": 1 + }, + { + "depends_on": "eval:doc.purpose == 'Other'", + "doctype": "DocField", + "label": "BOM No", + "options": "BOM", + "fieldname": "bom_no", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "description": "Select \"Yes\" if stock is maintained and tracked for sub-assembly items. Select \"No\" if you want child items of sub-assembly for material transfer.", + "depends_on": "eval:doc.purpose == 'Other'", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Consider SA Items as Raw Materials", + "options": "\nNo\nYes", + "fieldname": "consider_sa_items_as_raw_materials", + "fieldtype": "Select", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "FG Completed Qty", + "oldfieldname": "fg_completed_qty", + "trigger": "Client", + "fieldname": "fg_completed_qty", + "fieldtype": "Currency", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Button", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Get Items", + "permlevel": 0, + "fieldname": "get_items", + "fieldtype": "Button", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "get_items", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "HTML", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Warehouse HTML", + "options": "
Warehouse
", + "fieldname": "warehouse_html", + "fieldtype": "HTML", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Source Warehouse", + "oldfieldname": "from_warehouse", + "permlevel": 0, + "trigger": "Client", + "fieldname": "from_warehouse", + "fieldtype": "Link", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "Warehouse", + "report_hide": 0, + "in_filter": 0 + }, + { + "no_copy": 0, + "oldfieldtype": "Link", + "oldfieldname": "to_warehouse", + "reqd": 0, + "in_filter": 0, + "print_hide": 1, + "label": "Target Warehouse", + "trigger": "Client", + "hidden": 0, + "permlevel": 0, + "description": "Notes: Either Source or Target is Mandatory", + "search_index": 0, + "allow_on_submit": 0, + "colour": "White:FFF", + "doctype": "DocField", + "fieldname": "to_warehouse", + "fieldtype": "Link", + "options": "Warehouse", + "report_hide": 0 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "col2", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "description": "The date at which current entry will get or has actually executed.", + "no_copy": 1, + "oldfieldtype": "Date", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Posting Date", + "oldfieldname": "posting_date", + "fieldname": "posting_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 1, + "hidden": 0, + "in_filter": 1, + "permlevel": 0, + "report_hide": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Time", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Posting Time", + "oldfieldname": "posting_time", + "fieldname": "posting_time", + "fieldtype": "Time", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Text", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Remarks", + "oldfieldname": "remarks", + "fieldname": "remarks", + "fieldtype": "Text", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 0 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Items", + "fieldname": "items_section", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Table", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "MTN Details", + "oldfieldname": "mtn_details", + "permlevel": 0, + "fieldname": "mtn_details", + "fieldtype": "Table", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "Stock Entry Detail", + "report_hide": 0, + "in_filter": 0 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "options": "Simple", + "fieldname": "item_section", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Currency", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Total Amount", + "oldfieldname": "total_amount", + "fieldname": "total_amount", + "fieldtype": "Currency", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 1, + "report_hide": 0, + "in_filter": 0 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "fieldname": "col3", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Button", + "doctype": "DocField", + "label": "Get Stock and Rate", + "options": "get_stock_and_rate", + "fieldname": "get_stock_and_rate", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Contact Info", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Supplier", + "oldfieldname": "supplier", + "permlevel": 0, + "trigger": "Client", + "fieldname": "supplier", + "fieldtype": "Link", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "Supplier", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Data", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Supplier Name", + "oldfieldname": "supplier_name", + "fieldname": "supplier_name", + "fieldtype": "Data", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 1, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Small Text", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Supplier Address", + "oldfieldname": "supplier_address", + "trigger": "Client", + "fieldname": "supplier_address", + "fieldtype": "Small Text", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "colour": "White:FFF", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Customer", + "oldfieldname": "customer", + "permlevel": 0, + "trigger": "Client", + "fieldname": "customer", + "fieldtype": "Link", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "Customer", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Data", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Customer Name", + "oldfieldname": "customer_name", + "fieldname": "customer_name", + "fieldtype": "Data", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 1, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Small Text", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Customer Address", + "oldfieldname": "customer_address", + "fieldname": "customer_address", + "fieldtype": "Small Text", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 0 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "More Info", + "fieldname": "more_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col4", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Project Name", + "oldfieldname": "project_name", + "options": "Project", + "fieldname": "project_name", + "fieldtype": "Link", + "permlevel": 0, + "in_filter": 1 + }, + { + "print_hide": 0, + "no_copy": 0, + "oldfieldtype": "Link", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Select Print Heading", + "oldfieldname": "select_print_heading", + "permlevel": 0, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "Print Heading", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Cancel Reason", + "oldfieldname": "cancel_reason", + "fieldname": "cancel_reason", + "fieldtype": "Data", + "search_index": 0, + "reqd": 0, + "hidden": 1, + "permlevel": 1, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 0, + "no_copy": 1, + "oldfieldtype": "Date", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Transfer Date", + "oldfieldname": "transfer_date", + "default": "Today", + "fieldname": "transfer_date", + "fieldtype": "Date", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 1 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col5", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Select", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Is Excisable Goods", + "oldfieldname": "is_excisable_goods", + "permlevel": 0, + "fieldname": "is_excisable_goods", + "fieldtype": "Select", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "\nYes\nNo", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Select", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Excisable Goods", + "oldfieldname": "excisable_goods", + "permlevel": 0, + "fieldname": "excisable_goods", + "fieldtype": "Select", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "\nReturnable\nNon-Returnable", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Select", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Under Rule", + "oldfieldname": "under_rule", + "permlevel": 0, + "fieldname": "under_rule", + "fieldtype": "Select", + "search_index": 0, + "reqd": 0, + "hidden": 1, + "options": "\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Data", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Transporter", + "oldfieldname": "transporter", + "fieldname": "transporter", + "fieldtype": "Data", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "permlevel": 0, + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Link", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Company", + "oldfieldname": "company", + "permlevel": 0, + "fieldname": "company", + "fieldtype": "Link", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "options": "Company", + "report_hide": 0, + "in_filter": 1 + }, + { + "print_hide": 1, + "no_copy": 0, + "oldfieldtype": "Select", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "permlevel": 0, + "fieldname": "fiscal_year", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "hidden": 0, + "options": "link:Fiscal Year", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Link", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Amended From", + "oldfieldname": "amended_from", + "permlevel": 1, + "fieldname": "amended_from", + "fieldtype": "Link", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "options": "Stock Entry", + "report_hide": 0, + "in_filter": 0 + }, + { + "print_hide": 1, + "description": "The date at which current entry is corrected in the system.", + "no_copy": 1, + "oldfieldtype": "Date", + "allow_on_submit": 0, + "doctype": "DocField", + "label": "Amendment Date", + "oldfieldname": "amendment_date", + "fieldname": "amendment_date", + "fieldtype": "Date", + "search_index": 0, + "reqd": 0, + "hidden": 0, + "in_filter": 0, + "permlevel": 0, + "report_hide": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Material User", + "cancel": 1, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material User", + "cancel": 0, + "permlevel": 1 + }, + { + "create": 0, + "doctype": "DocPerm", + "write": 1, + "role": "Production User", + "permlevel": 2 + }, + { + "doctype": "DocPerm", + "write": 1, + "role": "Production Manager", + "permlevel": 2 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Production User", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Production User", + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Production Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Production Manager", + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material Manager", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Material Manager", + "cancel": 1, + "permlevel": 0 + } ] \ No newline at end of file diff --git a/support/doctype/communication/communication.py b/support/doctype/communication/communication.py index b046d2c6c7..93174e24f2 100644 --- a/support/doctype/communication/communication.py +++ b/support/doctype/communication/communication.py @@ -42,6 +42,3 @@ class DocType(): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist - - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') diff --git a/support/doctype/communication/communication.txt b/support/doctype/communication/communication.txt index e53f1f7e69..09f83bb3c1 100644 --- a/support/doctype/communication/communication.txt +++ b/support/doctype/communication/communication.txt @@ -4,13 +4,14 @@ "docstatus": 0, "creation": "2012-11-14 12:25:16", "modified_by": "Administrator", - "modified": "2012-11-24 15:22:32" + "modified": "2012-11-26 11:17:28" }, { + "autoname": "naming_series:", "allow_attach": 1, + "name": "__common__", "doctype": "DocType", "module": "Support", - "name": "__common__", "in_dialog": 1, "document_type": "Master", "description": "Keep a track of all communications" diff --git a/support/doctype/customer_issue/customer_issue.py b/support/doctype/customer_issue/customer_issue.py index 37328b8b5c..bdd7ed605d 100644 --- a/support/doctype/customer_issue/customer_issue.py +++ b/support/doctype/customer_issue/customer_issue.py @@ -21,7 +21,7 @@ import webnotes from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add from webnotes.model import db_exists -from webnotes.model.doc import Document, addchild, getchildren, make_autoname +from webnotes.model.doc import Document, addchild, getchildren from webnotes.model.wrapper import getlist, copy_doclist from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax from webnotes import session, form, msgprint, errprint @@ -40,9 +40,6 @@ class DocType(TransactionBase): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist - - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series + '.######') def check_maintenance_visit(self): nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name) diff --git a/support/doctype/customer_issue/customer_issue.txt b/support/doctype/customer_issue/customer_issue.txt index 6d4218fde3..351d641416 100644 --- a/support/doctype/customer_issue/customer_issue.txt +++ b/support/doctype/customer_issue/customer_issue.txt @@ -1,631 +1,515 @@ -# DocType, Customer Issue [ - - # These values are common in all dictionaries - { - u'creation': '2012-07-03 13:30:52', - u'docstatus': 0, - u'modified': '2012-11-15 15:05:51', - u'modified_by': u'Administrator', - u'owner': u'harshada@webnotestech.com' - }, - - # These values are common for all DocType - { - '_last_update': u'1325570647', - 'colour': u'White:FFF', - 'default_print_format': u'Standard', - u'doctype': u'DocType', - 'is_submittable': 1, - 'module': u'Support', - u'name': u'__common__', - 'search_fields': u'status,customer,customer_name,allocated_to,allocated_on, territory', - 'section_style': u'Tabbed', - 'server_code_error': u' ', - 'show_in_menu': 0, - 'subject': u'%(complaint)s By %(complaint_raised_by)s on %(issue_date)s', - 'tag_fields': u'status', - 'version': 1 - }, - - # These values are common for all DocField - { - u'doctype': u'DocField', - u'name': u'__common__', - 'parent': u'Customer Issue', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - u'doctype': u'DocPerm', - u'name': u'__common__', - 'parent': u'Customer Issue', - 'parentfield': u'permissions', - 'parenttype': u'DocType', - 'read': 1 - }, - - # DocType, Customer Issue - { - u'doctype': u'DocType', - u'name': u'Customer Issue' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'basic_info', - 'fieldtype': u'Section Break', - 'label': u'Basic Info', - 'oldfieldtype': u'Section Break', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'in_filter': 0, - 'label': u'Naming Series', - 'no_copy': 1, - 'oldfieldname': u'naming_series', - 'oldfieldtype': u'Select', - 'options': u'\nCI/2010-2011/', - 'permlevel': 0, - 'reqd': 1, - 'search_index': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'Open', - u'doctype': u'DocField', - 'fieldname': u'status', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Status', - 'no_copy': 1, - 'oldfieldname': u'status', - 'oldfieldtype': u'Select', - 'options': u'\nOpen\nClosed\nWork In Progress\nCancelled', - 'permlevel': 0, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - 'default': u'Today', - u'doctype': u'DocField', - 'fieldname': u'complaint_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Issue Date', - 'oldfieldname': u'complaint_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break0', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'customer', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Customer', - 'oldfieldname': u'customer', - 'oldfieldtype': u'Link', - 'options': u'Customer', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'customer_address', - 'fieldtype': u'Link', - 'label': u'Customer Address', - 'options': u'Address', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_person', - 'fieldtype': u'Link', - 'label': u'Contact Person', - 'options': u'Contact', - 'permlevel': 0, - 'print_hide': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'issue_details', - 'fieldtype': u'Section Break', - 'label': u'Issue Details', - 'oldfieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'complaint', - 'fieldtype': u'Small Text', - 'label': u'Issue', - 'no_copy': 1, - 'oldfieldname': u'complaint', - 'oldfieldtype': u'Small Text', - 'permlevel': 0, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'Item, Warranty, AMC (Annual Maintenance Contract) details will be automatically fetched when Serial Number is selected.', - u'doctype': u'DocField', - 'fieldname': u'serial_no', - 'fieldtype': u'Link', - 'label': u'Serial No', - 'options': u'Serial No', - 'permlevel': 0, - 'trigger': u'Client' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'item_code', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Item Code', - 'oldfieldname': u'item_code', - 'oldfieldtype': u'Link', - 'options': u'Item', - 'permlevel': 0, - 'reqd': 0, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'oldfieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.item_code', - u'doctype': u'DocField', - 'fieldname': u'item_name', - 'fieldtype': u'Data', - 'label': u'Item Name', - 'oldfieldname': u'item_name', - 'oldfieldtype': u'Data', - 'permlevel': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'depends_on': u'eval:doc.item_code', - u'doctype': u'DocField', - 'fieldname': u'description', - 'fieldtype': u'Small Text', - 'label': u'Description', - 'oldfieldname': u'description', - 'oldfieldtype': u'Small Text', - 'permlevel': 1, - 'width': u'300px' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'warranty_amc_status', - 'fieldtype': u'Select', - 'hidden': 0, - 'in_filter': 1, - 'label': u'Warranty / AMC Status', - 'options': u'\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'warranty_expiry_date', - 'fieldtype': u'Date', - 'label': u'Warranty Expiry Date', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'amc_expiry_date', - 'fieldtype': u'Date', - 'label': u'AMC Expiry Date', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'To assign this issue, use the "Assign" button in the sidebar.', - u'doctype': u'DocField', - 'fieldname': u'resolution_section', - 'fieldtype': u'Section Break', - 'label': u'Resolution', - 'oldfieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'resolution_date', - 'fieldtype': u'Date', - 'in_filter': 1, - 'label': u'Resolution Date', - 'no_copy': 1, - 'oldfieldname': u'resolution_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'search_index': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'resolved_by', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Resolved By', - 'no_copy': 1, - 'oldfieldname': u'resolved_by', - 'oldfieldtype': u'Link', - 'options': u'Sales Person', - 'permlevel': 0, - 'search_index': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'resolution_details', - 'fieldtype': u'Text', - 'label': u'Resolution Details', - 'no_copy': 1, - 'oldfieldname': u'resolution_details', - 'oldfieldtype': u'Text', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_info', - 'fieldtype': u'Section Break', - 'label': u'Contact Info', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break3', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'customer_name', - 'fieldtype': u'Data', - 'label': u'Customer Name', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'customer_group', - 'fieldtype': u'Link', - 'label': u'Customer Group', - 'options': u'Customer Group', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'territory', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Territory', - 'oldfieldname': u'territory', - 'oldfieldtype': u'Link', - 'options': u'Territory', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'address_display', - 'fieldtype': u'Small Text', - 'label': u'Address', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break4', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_display', - 'fieldtype': u'Small Text', - 'label': u'Contact', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_mobile', - 'fieldtype': u'Data', - 'label': u'Mobile No', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'contact_email', - 'fieldtype': u'Data', - 'label': u'Contact Email', - 'permlevel': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'service_address', - 'fieldtype': u'Small Text', - 'label': u'Service Address', - 'oldfieldname': u'service_address', - 'oldfieldtype': u'Small Text', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'more_info', - 'fieldtype': u'Section Break', - 'label': u'More Info', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break5', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'company', - 'fieldtype': u'Link', - 'in_filter': 1, - 'label': u'Company', - 'oldfieldname': u'company', - 'oldfieldtype': u'Link', - 'options': u'Company', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1, - 'trigger': u'Client' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'fiscal_year', - 'fieldtype': u'Select', - 'in_filter': 1, - 'label': u'Fiscal Year', - 'oldfieldname': u'fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 1, - 'search_index': 1 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'col_break6', - 'fieldtype': u'Column Break', - 'permlevel': 0, - 'width': u'50%' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'complaint_raised_by', - 'fieldtype': u'Data', - 'label': u'Raised By', - 'oldfieldname': u'complaint_raised_by', - 'oldfieldtype': u'Data', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'from_company', - 'fieldtype': u'Data', - 'label': u'From Company', - 'oldfieldname': u'from_company', - 'oldfieldtype': u'Data', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'amended_from', - 'fieldtype': u'Data', - 'hidden': 1, - 'label': u'Amended From', - 'no_copy': 1, - 'oldfieldname': u'amended_from', - 'oldfieldtype': u'Data', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'150px' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'amendment_date', - 'fieldtype': u'Date', - 'hidden': 1, - 'label': u'Amendment Date', - 'no_copy': 1, - 'oldfieldname': u'amendment_date', - 'oldfieldtype': u'Date', - 'permlevel': 0, - 'print_hide': 1, - 'width': u'100px' - }, - - # DocPerm - { - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Guest', - 'write': 1 - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'System Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'System Manager' - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Maintenance Manager', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Maintenance Manager' - }, - - # DocPerm - { - 'amend': 1, - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Maintenance User', - 'submit': 1, - 'write': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Maintenance User' - } + { + "owner": "harshada@webnotestech.com", + "docstatus": 0, + "creation": "2012-11-24 17:21:45", + "modified_by": "Administrator", + "modified": "2012-11-26 11:19:39" + }, + { + "is_submittable": 1, + "autoname": "naming_series:", + "name": "__common__", + "default_print_format": "Standard", + "search_fields": "status,customer,customer_name,allocated_to,allocated_on, territory", + "module": "Support", + "doctype": "DocType" + }, + { + "name": "__common__", + "parent": "Customer Issue", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Customer Issue", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Customer Issue", + "doctype": "DocType" + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Basic Info", + "fieldname": "basic_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "no_copy": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Naming Series", + "oldfieldname": "naming_series", + "permlevel": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "search_index": 0, + "reqd": 1, + "options": "\nCI/2010-2011/", + "in_filter": 0 + }, + { + "permlevel": 0, + "no_copy": 1, + "oldfieldtype": "Select", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Status", + "oldfieldname": "status", + "default": "Open", + "fieldname": "status", + "fieldtype": "Select", + "search_index": 1, + "reqd": 1, + "options": "\nOpen\nClosed\nWork In Progress\nCancelled", + "in_filter": 1 + }, + { + "default": "Today", + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Issue Date", + "oldfieldname": "complaint_date", + "fieldname": "complaint_date", + "fieldtype": "Date", + "search_index": 1, + "reqd": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Customer", + "oldfieldname": "customer", + "permlevel": 0, + "trigger": "Client", + "fieldname": "customer", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "options": "Customer", + "in_filter": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Customer Address", + "options": "Address", + "fieldname": "customer_address", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Contact Person", + "options": "Contact", + "fieldname": "contact_person", + "fieldtype": "Link", + "permlevel": 0 + }, + { + "oldfieldtype": "Section Break", + "doctype": "DocField", + "label": "Issue Details", + "options": "Simple", + "fieldname": "issue_details", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "no_copy": 1, + "oldfieldtype": "Small Text", + "doctype": "DocField", + "label": "Issue", + "oldfieldname": "complaint", + "fieldname": "complaint", + "fieldtype": "Small Text", + "reqd": 1, + "permlevel": 0 + }, + { + "description": "Item, Warranty, AMC (Annual Maintenance Contract) details will be automatically fetched when Serial Number is selected.", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Serial No", + "trigger": "Client", + "fieldname": "serial_no", + "fieldtype": "Link", + "options": "Serial No", + "permlevel": 0 + }, + { + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Item Code", + "oldfieldname": "item_code", + "permlevel": 0, + "trigger": "Client", + "fieldname": "item_code", + "fieldtype": "Link", + "search_index": 1, + "reqd": 0, + "options": "Item", + "in_filter": 1 + }, + { + "oldfieldtype": "Column Break", + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Data", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Item Name", + "oldfieldname": "item_name", + "fieldname": "item_name", + "fieldtype": "Data", + "depends_on": "eval:doc.item_code", + "permlevel": 1 + }, + { + "oldfieldtype": "Small Text", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Description", + "oldfieldname": "description", + "width": "300px", + "fieldname": "description", + "fieldtype": "Small Text", + "depends_on": "eval:doc.item_code", + "permlevel": 1 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "Warranty / AMC Status", + "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC", + "fieldname": "warranty_amc_status", + "fieldtype": "Select", + "hidden": 0, + "permlevel": 0, + "in_filter": 1 + }, + { + "doctype": "DocField", + "label": "Warranty Expiry Date", + "fieldname": "warranty_expiry_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "AMC Expiry Date", + "fieldname": "amc_expiry_date", + "fieldtype": "Date", + "permlevel": 0 + }, + { + "description": "To assign this issue, use the \"Assign\" button in the sidebar.", + "oldfieldtype": "Section Break", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Resolution", + "options": "Simple", + "fieldname": "resolution_section", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "no_copy": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Resolution Date", + "oldfieldname": "resolution_date", + "fieldname": "resolution_date", + "fieldtype": "Date", + "search_index": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "no_copy": 1, + "oldfieldtype": "Link", + "doctype": "DocField", + "label": "Resolved By", + "oldfieldname": "resolved_by", + "options": "Sales Person", + "fieldname": "resolved_by", + "fieldtype": "Link", + "search_index": 1, + "permlevel": 0, + "in_filter": 1 + }, + { + "no_copy": 1, + "oldfieldtype": "Text", + "doctype": "DocField", + "label": "Resolution Details", + "oldfieldname": "resolution_details", + "fieldname": "resolution_details", + "fieldtype": "Text", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Contact Info", + "fieldname": "contact_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break3", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Customer Name", + "fieldname": "customer_name", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "print_hide": 1, + "doctype": "DocField", + "label": "Customer Group", + "options": "Customer Group", + "fieldname": "customer_group", + "fieldtype": "Link", + "reqd": 0, + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Territory", + "oldfieldname": "territory", + "permlevel": 0, + "fieldname": "territory", + "fieldtype": "Link", + "search_index": 1, + "reqd": 0, + "options": "Territory", + "in_filter": 1 + }, + { + "doctype": "DocField", + "label": "Address", + "fieldname": "address_display", + "fieldtype": "Small Text", + "permlevel": 1 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break4", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Contact", + "fieldname": "contact_display", + "fieldtype": "Small Text", + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Mobile No", + "fieldname": "contact_mobile", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "doctype": "DocField", + "label": "Contact Email", + "fieldname": "contact_email", + "fieldtype": "Data", + "permlevel": 1 + }, + { + "oldfieldtype": "Small Text", + "doctype": "DocField", + "label": "Service Address", + "oldfieldname": "service_address", + "fieldname": "service_address", + "fieldtype": "Small Text", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "More Info", + "fieldname": "more_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break5", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "print_hide": 1, + "oldfieldtype": "Link", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Company", + "oldfieldname": "company", + "permlevel": 0, + "trigger": "Client", + "fieldname": "company", + "fieldtype": "Link", + "search_index": 1, + "reqd": 1, + "options": "Company", + "in_filter": 1 + }, + { + "print_hide": 1, + "oldfieldtype": "Select", + "doctype": "DocField", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "permlevel": 0, + "fieldname": "fiscal_year", + "fieldtype": "Select", + "search_index": 1, + "reqd": 1, + "options": "link:Fiscal Year", + "in_filter": 1 + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "col_break6", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Raised By", + "oldfieldname": "complaint_raised_by", + "fieldname": "complaint_raised_by", + "fieldtype": "Data", + "permlevel": 0 + }, + { + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "From Company", + "oldfieldname": "from_company", + "fieldname": "from_company", + "fieldtype": "Data", + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Data", + "doctype": "DocField", + "label": "Amended From", + "oldfieldname": "amended_from", + "width": "150px", + "fieldname": "amended_from", + "fieldtype": "Data", + "hidden": 1, + "permlevel": 0 + }, + { + "print_hide": 1, + "no_copy": 1, + "oldfieldtype": "Date", + "doctype": "DocField", + "label": "Amendment Date", + "oldfieldname": "amendment_date", + "width": "100px", + "fieldname": "amendment_date", + "fieldtype": "Date", + "hidden": 1, + "permlevel": 0 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "System Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "System Manager", + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Maintenance Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Maintenance Manager", + "permlevel": 1 + }, + { + "amend": 1, + "create": 1, + "doctype": "DocPerm", + "submit": 1, + "write": 1, + "role": "Maintenance User", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Maintenance User", + "permlevel": 1 + }, + { + "create": 1, + "doctype": "DocPerm", + "write": 1, + "role": "Guest", + "permlevel": 0 + } ] \ No newline at end of file diff --git a/support/doctype/newsletter/newsletter.py b/support/doctype/newsletter/newsletter.py index ac39ebb630..79464c018e 100644 --- a/support/doctype/newsletter/newsletter.py +++ b/support/doctype/newsletter/newsletter.py @@ -45,10 +45,6 @@ class DocType(): where ifnull(blog_subscriber,0) = 1 and ifnull(email_id, '') != '' """ } - def autoname(self): - from webnotes.model.doc import make_autoname - self.doc.name = make_autoname(self.doc.naming_series+ '.#####') - def send_emails(self): """send emails to leads and customers""" # TODO: create unsubscribed check in customer diff --git a/support/doctype/newsletter/newsletter.txt b/support/doctype/newsletter/newsletter.txt index ef3033d47c..3f48bff85d 100644 --- a/support/doctype/newsletter/newsletter.txt +++ b/support/doctype/newsletter/newsletter.txt @@ -1,233 +1,184 @@ -# DocType, Newsletter [ - - # These values are common in all dictionaries - { - u'creation': '2012-08-23 18:49:12', - u'docstatus': 0, - u'modified': '2012-08-24 14:45:00', - u'modified_by': u'Administrator', - u'owner': u'Administrator' - }, - - # These values are common for all DocType - { - 'description': u'Create and Send Newsletters', - u'doctype': u'DocType', - 'document_type': u'Other', - 'module': u'Support', - u'name': u'__common__', - 'version': 1 - }, - - # These values are common for all DocField - { - u'doctype': u'DocField', - u'name': u'__common__', - 'parent': u'Newsletter', - 'parentfield': u'fields', - 'parenttype': u'DocType' - }, - - # These values are common for all DocPerm - { - u'doctype': u'DocPerm', - u'name': u'__common__', - 'parent': u'Newsletter', - 'parentfield': u'permissions', - 'parenttype': u'DocType', - 'read': 1 - }, - - # DocType, Newsletter - { - u'doctype': u'DocType', - u'name': u'Newsletter' - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'basic_info', - 'fieldtype': u'Section Break', - 'label': u'Basic Info', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - 'default': u'NL-', - u'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'label': u'Naming Series', - 'options': u'NL-', - 'permlevel': 0, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - 'description': u'A Lead with this email id should exist', - u'doctype': u'DocField', - 'fieldname': u'test_email_id', - 'fieldtype': u'Data', - 'label': u'Test Email Id', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'test_send', - 'fieldtype': u'Button', - 'label': u'Test', - 'options': u'test_send', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'column_break1', - 'fieldtype': u'Column Break', - 'label': u'Send To', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'contacts', - 'fieldtype': u'Check', - 'label': u'All Contacts', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'customer_contacts', - 'fieldtype': u'Check', - 'label': u'All Customer Contacts', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'leads', - 'fieldtype': u'Check', - 'label': u'All Leads', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'active_leads', - 'fieldtype': u'Check', - 'label': u'All Active Leads', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'blog_subscribers', - 'fieldtype': u'Check', - 'label': u'All Blog Subscribers', - 'permlevel': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'newsletter_content', - 'fieldtype': u'Section Break', - 'label': u'Newsletter Content', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'subject', - 'fieldtype': u'Small Text', - 'label': u'Subject', - 'permlevel': 0, - 'reqd': 1 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'message', - 'fieldtype': u'Code', - 'label': u'Message', - 'options': u'Markdown', - 'permlevel': 0, - 'reqd': 0 - }, - - # DocField - { - u'doctype': u'DocField', - 'fieldname': u'newsletter_status', - 'fieldtype': u'Section Break', - 'label': u'Newsletter Status', - 'permlevel': 0 - }, - - # DocField - { - 'colour': u'White:FFF', - u'doctype': u'DocField', - 'fieldname': u'email_sent', - 'fieldtype': u'Check', - 'label': u'Email Sent?', - 'no_copy': 1, - 'permlevel': 1 - }, - - # DocPerm - { - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Sales Manager', - 'write': 1 - }, - - # DocPerm - { - 'cancel': 1, - 'create': 1, - u'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Support Manager', - 'write': 1 - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Sales Manager' - }, - - # DocPerm - { - u'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Support Manager' - } + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2012-08-24 14:48:05", + "modified_by": "Administrator", + "modified": "2012-11-26 11:18:43" + }, + { + "autoname": "naming_series:", + "description": "Create and Send Newsletters", + "doctype": "DocType", + "module": "Support", + "document_type": "Other", + "name": "__common__" + }, + { + "name": "__common__", + "parent": "Newsletter", + "doctype": "DocField", + "parenttype": "DocType", + "parentfield": "fields" + }, + { + "name": "__common__", + "parent": "Newsletter", + "read": 1, + "doctype": "DocPerm", + "parenttype": "DocType", + "parentfield": "permissions" + }, + { + "name": "Newsletter", + "doctype": "DocType" + }, + { + "doctype": "DocField", + "label": "Basic Info", + "fieldname": "basic_info", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "default": "NL-", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Naming Series", + "options": "NL-", + "fieldname": "naming_series", + "fieldtype": "Select", + "reqd": 1, + "permlevel": 0 + }, + { + "description": "A Lead with this email id should exist", + "colour": "White:FFF", + "doctype": "DocField", + "label": "Test Email Id", + "fieldname": "test_email_id", + "fieldtype": "Data", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Test", + "options": "test_send", + "fieldname": "test_send", + "fieldtype": "Button", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Send To", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "permlevel": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "All Contacts", + "fieldname": "contacts", + "fieldtype": "Check", + "permlevel": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "All Customer Contacts", + "fieldname": "customer_contacts", + "fieldtype": "Check", + "permlevel": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "All Leads", + "fieldname": "leads", + "fieldtype": "Check", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "All Active Leads", + "fieldname": "active_leads", + "fieldtype": "Check", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "All Blog Subscribers", + "fieldname": "blog_subscribers", + "fieldtype": "Check", + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Newsletter Content", + "fieldname": "newsletter_content", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "Subject", + "fieldname": "subject", + "fieldtype": "Small Text", + "reqd": 1, + "permlevel": 0 + }, + { + "colour": "White:FFF", + "doctype": "DocField", + "label": "Message", + "options": "Markdown", + "fieldname": "message", + "fieldtype": "Code", + "reqd": 0, + "permlevel": 0 + }, + { + "doctype": "DocField", + "label": "Newsletter Status", + "fieldname": "newsletter_status", + "fieldtype": "Section Break", + "permlevel": 0 + }, + { + "no_copy": 1, + "colour": "White:FFF", + "doctype": "DocField", + "label": "Email Sent?", + "fieldname": "email_sent", + "fieldtype": "Check", + "permlevel": 1 + }, + { + "create": 1, + "doctype": "DocPerm", + "write": 1, + "role": "Sales Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "create": 1, + "doctype": "DocPerm", + "write": 1, + "role": "Support Manager", + "cancel": 1, + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "role": "Sales Manager", + "permlevel": 1 + }, + { + "doctype": "DocPerm", + "role": "Support Manager", + "permlevel": 1 + } ] \ No newline at end of file diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py index a9ab729b74..43c650803b 100644 --- a/support/doctype/support_ticket/support_ticket.py +++ b/support/doctype/support_ticket/support_ticket.py @@ -26,9 +26,6 @@ class DocType(TransactionBase): self.doc = doc self.doclist = doclist - def autoname(self): - self.doc.name = make_autoname(self.doc.naming_series+'.#####') - def onload(self): self.add_communication_list() @@ -106,7 +103,6 @@ class DocType(TransactionBase): import email.utils d = webnotes.doc('Communication') - d.naming_series = "COMM-" d.subject = self.doc.subject d.email_address = from_email or webnotes.user.name email_addr = email.utils.parseaddr(d.email_address)[1] @@ -117,6 +113,16 @@ class DocType(TransactionBase): d.communication_medium = "Email" d.save(1) + if not d.lead and not d.contact: + self.make_lead(d, email_addr[0]) + + def make_lead(self, d, real_name): + d = webnotes.doc("Lead") + d.lead_name = real_name or d.email_address + d.email_id = d.email_address + d.source = "Email" + d.save(1) + def close_ticket(self): webnotes.conn.set(self.doc,'status','Closed') update_feed(self.doc) diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt index d261c164e0..c820bc61d7 100644 --- a/support/doctype/support_ticket/support_ticket.txt +++ b/support/doctype/support_ticket/support_ticket.txt @@ -4,9 +4,10 @@ "docstatus": 0, "creation": "2012-11-02 17:17:05", "modified_by": "Administrator", - "modified": "2012-11-24 16:41:45" + "modified": "2012-11-26 11:17:10" }, { + "autoname": "naming_series:", "allow_attach": 1, "default_print_format": "Standard", "search_fields": "status,customer,allocated_to,subject,raised_by",