From 36bf910563e7646bec56190b84835f5d35bc4a6b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 11 Dec 2012 14:01:59 +0530 Subject: [PATCH 1/2] removed Standard from default print format --- accounts/doctype/account/account.txt | 1 - .../bank_reconciliation_detail/bank_reconciliation_detail.txt | 1 - accounts/doctype/cost_center/cost_center.txt | 1 - accounts/doctype/fiscal_year/fiscal_year.txt | 1 - accounts/doctype/gl_entry/gl_entry.txt | 1 - accounts/doctype/journal_voucher/journal_voucher.txt | 1 - .../doctype/journal_voucher_detail/journal_voucher_detail.txt | 1 - .../payment_to_invoice_matching_tool.txt | 1 - .../payment_to_invoice_matching_tool_detail.txt | 1 - .../doctype/period_closing_voucher/period_closing_voucher.txt | 1 - accounts/doctype/pos_setting/pos_setting.txt | 1 - accounts/doctype/purchase_invoice/purchase_invoice.txt | 1 - .../doctype/purchase_invoice_item/purchase_invoice_item.txt | 1 - .../purchase_taxes_and_charges/purchase_taxes_and_charges.txt | 1 - .../purchase_taxes_and_charges_master.txt | 1 - accounts/doctype/sales_invoice/sales_invoice.txt | 1 - accounts/doctype/sales_invoice_item/sales_invoice_item.txt | 1 - .../sales_taxes_and_charges/sales_taxes_and_charges.txt | 1 - .../sales_taxes_and_charges_master.txt | 1 - buying/doctype/purchase_order/purchase_order.txt | 1 - buying/doctype/purchase_order_item/purchase_order_item.txt | 1 - buying/doctype/purchase_request/purchase_request.txt | 1 - .../doctype/purchase_request_item/purchase_request_item.txt | 1 - buying/doctype/quality_inspection/quality_inspection.txt | 1 - buying/doctype/supplier_quotation/supplier_quotation.txt | 1 - .../supplier_quotation_item/supplier_quotation_item.txt | 1 - home/doctype/feed/feed.txt | 1 - hr/doctype/appraisal/appraisal.txt | 1 - hr/doctype/appraisal_goal/appraisal_goal.txt | 1 - hr/doctype/attendance/attendance.txt | 1 - hr/doctype/expense_claim/expense_claim.txt | 1 - hr/doctype/holiday/holiday.txt | 1 - hr/doctype/leave_allocation/leave_allocation.txt | 1 - hr/doctype/leave_control_panel/leave_control_panel.txt | 1 - hr/doctype/salary_manager/salary_manager.txt | 1 - patches/december_2012/fix_default_print_format.py | 4 ++++ patches/patch_list.py | 4 ++++ production/doctype/bom/bom.txt | 1 - production/doctype/bom_explosion_item/bom_explosion_item.txt | 1 - production/doctype/bom_item/bom_item.txt | 1 - production/doctype/bom_operation/bom_operation.txt | 1 - production/doctype/production_order/production_order.txt | 1 - .../doctype/production_plan_item/production_plan_item.txt | 1 - .../production_plan_sales_order.txt | 1 - .../production_planning_tool/production_planning_tool.txt | 1 - production/doctype/workstation/workstation.txt | 1 - projects/doctype/project/project.txt | 1 - projects/doctype/project_milestone/project_milestone.txt | 1 - projects/doctype/task/task.txt | 1 - selling/doctype/campaign/campaign.txt | 1 - selling/doctype/customer/customer.txt | 1 - selling/doctype/installation_note/installation_note.txt | 1 - .../doctype/installation_note_item/installation_note_item.txt | 1 - selling/doctype/lead/lead.txt | 1 - selling/doctype/opportunity/opportunity.txt | 1 - selling/doctype/quotation/quotation.txt | 1 - selling/doctype/quotation_item/quotation_item.txt | 1 - selling/doctype/sales_order/sales_order.txt | 1 - selling/doctype/sales_order_item/sales_order_item.txt | 1 - selling/doctype/sms_center/sms_center.txt | 1 - setup/doctype/customer_group/customer_group.txt | 1 - setup/doctype/email_settings/email_settings.txt | 1 - setup/doctype/features_setup/features_setup.txt | 1 - setup/doctype/global_defaults/global_defaults.txt | 1 - setup/doctype/item_group/item_group.txt | 1 - setup/doctype/naming_series_options/naming_series_options.txt | 1 - setup/doctype/sales_partner/sales_partner.txt | 1 - setup/doctype/terms_and_conditions/terms_and_conditions.txt | 1 - setup/doctype/territory/territory.txt | 1 - setup/doctype/workflow_rule/workflow_rule.txt | 1 - stock/doctype/bin/bin.txt | 1 - stock/doctype/delivery_note/delivery_note.txt | 1 - stock/doctype/delivery_note_item/delivery_note_item.txt | 1 - stock/doctype/item/item.txt | 1 - stock/doctype/item_price/item_price.txt | 1 - stock/doctype/landed_cost_item/landed_cost_item.txt | 1 - .../landed_cost_purchase_receipt.txt | 1 - stock/doctype/landed_cost_wizard/landed_cost_wizard.txt | 1 - stock/doctype/purchase_receipt/purchase_receipt.txt | 1 - stock/doctype/purchase_receipt_item/purchase_receipt_item.txt | 1 - stock/doctype/serial_no/serial_no.txt | 1 - stock/doctype/stock_entry/stock_entry.txt | 1 - stock/doctype/stock_entry_detail/stock_entry_detail.txt | 1 - stock/doctype/stock_ledger_entry/stock_ledger_entry.txt | 1 - stock/doctype/stock_reconciliation/stock_reconciliation.txt | 1 - stock/doctype/warehouse/warehouse.txt | 1 - support/doctype/customer_issue/customer_issue.txt | 1 - support/doctype/maintenance_schedule/maintenance_schedule.txt | 1 - .../maintenance_schedule_detail.txt | 1 - .../maintenance_schedule_item/maintenance_schedule_item.txt | 1 - support/doctype/maintenance_visit/maintenance_visit.txt | 1 - support/doctype/support_ticket/support_ticket.txt | 1 - utilities/doctype/address/address.txt | 1 - utilities/doctype/contact/contact.txt | 1 - utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt | 1 - 95 files changed, 8 insertions(+), 93 deletions(-) create mode 100644 patches/december_2012/fix_default_print_format.py diff --git a/accounts/doctype/account/account.txt b/accounts/doctype/account/account.txt index 2beb08aa26..c6f85e1aad 100644 --- a/accounts/doctype/account/account.txt +++ b/accounts/doctype/account/account.txt @@ -13,7 +13,6 @@ "document_type": "Master", "description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType", "allow_copy": 1 diff --git a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt index 3924980e94..e3688b4a90 100644 --- a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt +++ b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Accounts', diff --git a/accounts/doctype/cost_center/cost_center.txt b/accounts/doctype/cost_center/cost_center.txt index ecb3ad6f39..b145a0c972 100644 --- a/accounts/doctype/cost_center/cost_center.txt +++ b/accounts/doctype/cost_center/cost_center.txt @@ -14,7 +14,6 @@ "description": "Track separate Income and Expense for product verticals or divisions.", "autoname": "field:cost_center_name", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType", "allow_copy": 1 diff --git a/accounts/doctype/fiscal_year/fiscal_year.txt b/accounts/doctype/fiscal_year/fiscal_year.txt index 68dbdb2332..23ccc856a0 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.txt +++ b/accounts/doctype/fiscal_year/fiscal_year.txt @@ -16,7 +16,6 @@ 'allow_trash': 1, 'autoname': u'field:year', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.', 'doctype': 'DocType', 'document_type': u'Master', diff --git a/accounts/doctype/gl_entry/gl_entry.txt b/accounts/doctype/gl_entry/gl_entry.txt index 0888a9508c..9c8b5dd54e 100644 --- a/accounts/doctype/gl_entry/gl_entry.txt +++ b/accounts/doctype/gl_entry/gl_entry.txt @@ -15,7 +15,6 @@ '_last_update': u'1319016431', 'autoname': u'GL.#######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'in_create': 1, 'module': u'Accounts', diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt index bfa0bfa3d4..ad0004f829 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.txt +++ b/accounts/doctype/journal_voucher/journal_voucher.txt @@ -10,7 +10,6 @@ "is_submittable": 1, "autoname": "naming_series:", "name": "__common__", - "default_print_format": "Standard", "search_fields": "voucher_type,posting_date, due_date, cheque_no", "module": "Accounts", "doctype": "DocType", diff --git a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt index c7b4ab4143..972c125370 100644 --- a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt +++ b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt @@ -14,7 +14,6 @@ { 'autoname': u'JVD.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'istable': 1, 'module': u'Accounts', diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt index 5a95ba8bb5..3887743208 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt @@ -14,7 +14,6 @@ { '_last_update': u'1316509358', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'document_type': u'Other', 'issingle': 1, diff --git a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt index 5291057e72..7b3beb82b8 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt +++ b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Accounts', diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.txt b/accounts/doctype/period_closing_voucher/period_closing_voucher.txt index f56c1b0c93..2313d40b13 100644 --- a/accounts/doctype/period_closing_voucher/period_closing_voucher.txt +++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.txt @@ -15,7 +15,6 @@ '_last_update': u'1311621379', 'autoname': u'PCE/.###', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_submittable': 1, 'module': u'Accounts', diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt index 49ab1d3507..1c7de5b0dd 100755 --- a/accounts/doctype/pos_setting/pos_setting.txt +++ b/accounts/doctype/pos_setting/pos_setting.txt @@ -15,7 +15,6 @@ '_last_update': u'1322549700', 'autoname': u'POS/.####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'module': u'Accounts', 'name': '__common__', diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt index 3880689415..988dd5f20e 100755 --- a/accounts/doctype/purchase_invoice/purchase_invoice.txt +++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt @@ -10,7 +10,6 @@ "is_submittable": 1, "autoname": "naming_series:", "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount", "module": "Accounts", "doctype": "DocType", diff --git a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt index 30493b3fa0..a09398d84c 100755 --- a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt +++ b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'EVD.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Accounts', diff --git a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt index 3198b25632..05bcb86831 100644 --- a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt +++ b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt @@ -15,7 +15,6 @@ '_last_update': u'1322549700', 'autoname': u'PVTD.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'hide_heading': 1, 'istable': 1, diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt index 5c72c2c584..9e659ee2e6 100644 --- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt +++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt @@ -16,7 +16,6 @@ 'allow_trash': 1, 'autoname': u'field:title', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like "Shipping", "Insurance", "Handling" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on "Previous Row Total" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.', 'doctype': 'DocType', 'document_type': u'Master', diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt index 91e3298107..95156b16ee 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.txt +++ b/accounts/doctype/sales_invoice/sales_invoice.txt @@ -10,7 +10,6 @@ "is_submittable": 1, "autoname": "naming_series:", "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "posting_date, due_date, debit_to, fiscal_year, grand_total, outstanding_amount", "module": "Accounts", "doctype": "DocType", diff --git a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt index 0dddb8a924..da30751c17 100644 --- a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt +++ b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'INVD.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Accounts', diff --git a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt index 66d7aae835..234907cc97 100644 --- a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt +++ b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt @@ -14,7 +14,6 @@ { 'autoname': u'INVTD.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_heading': 1, 'istable': 1, diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt index 1707bf4cfb..5870a46687 100644 --- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt +++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt @@ -16,7 +16,6 @@ 'allow_trash': 1, 'autoname': u'field:title', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like "Shipping", "Insurance", "Handling" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on "Previous Row Total" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.', 'doctype': 'DocType', 'document_type': u'Master', diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt index 2463a0dcbd..3a08bee409 100644 --- a/buying/doctype/purchase_order/purchase_order.txt +++ b/buying/doctype/purchase_order/purchase_order.txt @@ -9,7 +9,6 @@ { "is_submittable": 1, "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "status, transaction_date, supplier,grand_total", "module": "Buying", "doctype": "DocType", diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt index cecf9630c7..6f38e189ba 100755 --- a/buying/doctype/purchase_order_item/purchase_order_item.txt +++ b/buying/doctype/purchase_order_item/purchase_order_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'POD/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Buying', diff --git a/buying/doctype/purchase_request/purchase_request.txt b/buying/doctype/purchase_request/purchase_request.txt index 393367e133..b64ee0ab1c 100644 --- a/buying/doctype/purchase_request/purchase_request.txt +++ b/buying/doctype/purchase_request/purchase_request.txt @@ -9,7 +9,6 @@ { "is_submittable": 1, "allow_attach": 1, - "default_print_format": "Standard", "allow_print": 0, "search_fields": "status,transaction_date,sales_order_no", "module": "Buying", diff --git a/buying/doctype/purchase_request_item/purchase_request_item.txt b/buying/doctype/purchase_request_item/purchase_request_item.txt index 9407894536..3107529b36 100644 --- a/buying/doctype/purchase_request_item/purchase_request_item.txt +++ b/buying/doctype/purchase_request_item/purchase_request_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'IDTD/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Buying', diff --git a/buying/doctype/quality_inspection/quality_inspection.txt b/buying/doctype/quality_inspection/quality_inspection.txt index afbd73737b..8d4cd0a93e 100644 --- a/buying/doctype/quality_inspection/quality_inspection.txt +++ b/buying/doctype/quality_inspection/quality_inspection.txt @@ -15,7 +15,6 @@ '_last_update': u'1317365120', 'autoname': u'QAI/.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_submittable': 1, 'module': u'Buying', diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt index 587478b66f..3b27049024 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.txt +++ b/buying/doctype/supplier_quotation/supplier_quotation.txt @@ -9,7 +9,6 @@ { "is_submittable": 1, "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "status, transaction_date, supplier,grand_total", "module": "Buying", "doctype": "DocType", diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt index 895c8fc899..a1a49b355b 100644 --- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt +++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'autoname': u'SQI-.#####', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Buying', diff --git a/home/doctype/feed/feed.txt b/home/doctype/feed/feed.txt index 57471bd214..ad76eb031e 100644 --- a/home/doctype/feed/feed.txt +++ b/home/doctype/feed/feed.txt @@ -14,7 +14,6 @@ { 'autoname': u'_FEED.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'module': u'Home', u'name': u'__common__', diff --git a/hr/doctype/appraisal/appraisal.txt b/hr/doctype/appraisal/appraisal.txt index dd7ad195c4..525b689778 100644 --- a/hr/doctype/appraisal/appraisal.txt +++ b/hr/doctype/appraisal/appraisal.txt @@ -15,7 +15,6 @@ '_last_update': u'1316075905', 'autoname': u'APRSL.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'is_submittable': 1, 'module': u'HR', diff --git a/hr/doctype/appraisal_goal/appraisal_goal.txt b/hr/doctype/appraisal_goal/appraisal_goal.txt index ada41f5300..cdfa188b5d 100644 --- a/hr/doctype/appraisal_goal/appraisal_goal.txt +++ b/hr/doctype/appraisal_goal/appraisal_goal.txt @@ -14,7 +14,6 @@ { 'autoname': u'APRSLD.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'istable': 1, 'module': u'HR', diff --git a/hr/doctype/attendance/attendance.txt b/hr/doctype/attendance/attendance.txt index 04df67d966..85ebb04280 100644 --- a/hr/doctype/attendance/attendance.txt +++ b/hr/doctype/attendance/attendance.txt @@ -14,7 +14,6 @@ { '_last_update': u'1317365120', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'document_type': u'Master', 'is_submittable': 1, diff --git a/hr/doctype/expense_claim/expense_claim.txt b/hr/doctype/expense_claim/expense_claim.txt index 5ef2c59785..a5a0860085 100644 --- a/hr/doctype/expense_claim/expense_claim.txt +++ b/hr/doctype/expense_claim/expense_claim.txt @@ -10,7 +10,6 @@ "is_submittable": 1, "autoname": "EXP.######", "name": "__common__", - "default_print_format": "Standard", "search_fields": "approval_status,employee,employee_name", "module": "HR", "doctype": "DocType" diff --git a/hr/doctype/holiday/holiday.txt b/hr/doctype/holiday/holiday.txt index bfcc7b3312..0d210c5f79 100644 --- a/hr/doctype/holiday/holiday.txt +++ b/hr/doctype/holiday/holiday.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'HR', diff --git a/hr/doctype/leave_allocation/leave_allocation.txt b/hr/doctype/leave_allocation/leave_allocation.txt index ed0e6e307a..7a9f9152a7 100644 --- a/hr/doctype/leave_allocation/leave_allocation.txt +++ b/hr/doctype/leave_allocation/leave_allocation.txt @@ -15,7 +15,6 @@ '_last_update': u'1317365120', 'autoname': u'LAL/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'is_submittable': 1, 'module': u'HR', diff --git a/hr/doctype/leave_control_panel/leave_control_panel.txt b/hr/doctype/leave_control_panel/leave_control_panel.txt index 9adc2433b7..9d05ada57c 100644 --- a/hr/doctype/leave_control_panel/leave_control_panel.txt +++ b/hr/doctype/leave_control_panel/leave_control_panel.txt @@ -17,7 +17,6 @@ 'allow_email': 1, 'allow_print': 1, 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_heading': 0, 'hide_toolbar': 0, diff --git a/hr/doctype/salary_manager/salary_manager.txt b/hr/doctype/salary_manager/salary_manager.txt index 6eff0dbdbe..7c47f1c339 100644 --- a/hr/doctype/salary_manager/salary_manager.txt +++ b/hr/doctype/salary_manager/salary_manager.txt @@ -17,7 +17,6 @@ 'allow_email': 1, 'allow_print': 1, 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'document_type': u'Other', 'issingle': 1, diff --git a/patches/december_2012/fix_default_print_format.py b/patches/december_2012/fix_default_print_format.py new file mode 100644 index 0000000000..e4751225d9 --- /dev/null +++ b/patches/december_2012/fix_default_print_format.py @@ -0,0 +1,4 @@ +import webnotes +def execute(): + webnotes.conn.sql("""update `tabDocType` set default_print_format=null + where default_print_format='Standard'""") \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 4f64dff8c8..0b079b8db8 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -729,4 +729,8 @@ patch_list = [ 'patch_module': 'patches.december_2012', 'patch_file': 'website_cache_refactor', }, + { + 'patch_module': 'patches.december_2012', + 'patch_file': 'fix_default_print_format', + }, ] \ No newline at end of file diff --git a/production/doctype/bom/bom.txt b/production/doctype/bom/bom.txt index 58cb5cb01e..ed7004596f 100644 --- a/production/doctype/bom/bom.txt +++ b/production/doctype/bom/bom.txt @@ -19,7 +19,6 @@ "hide_heading": 0, "issingle": 0, "name": "__common__", - "default_print_format": "Standard", "allow_rename": 0, "doctype": "DocType", "is_submittable": 1, diff --git a/production/doctype/bom_explosion_item/bom_explosion_item.txt b/production/doctype/bom_explosion_item/bom_explosion_item.txt index 1ba688f77e..b96023108a 100644 --- a/production/doctype/bom_explosion_item/bom_explosion_item.txt +++ b/production/doctype/bom_explosion_item/bom_explosion_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'FBD/.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Production', diff --git a/production/doctype/bom_item/bom_item.txt b/production/doctype/bom_item/bom_item.txt index 741de0e030..4204b20a9b 100644 --- a/production/doctype/bom_item/bom_item.txt +++ b/production/doctype/bom_item/bom_item.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Production', diff --git a/production/doctype/bom_operation/bom_operation.txt b/production/doctype/bom_operation/bom_operation.txt index 1e5b93a1ff..b09856d3c9 100644 --- a/production/doctype/bom_operation/bom_operation.txt +++ b/production/doctype/bom_operation/bom_operation.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Production', diff --git a/production/doctype/production_order/production_order.txt b/production/doctype/production_order/production_order.txt index 5fed2ddb8c..64d0bad929 100644 --- a/production/doctype/production_order/production_order.txt +++ b/production/doctype/production_order/production_order.txt @@ -9,7 +9,6 @@ { "is_submittable": 1, "in_create": 0, - "default_print_format": "Standard", "doctype": "DocType", "module": "Production", "name": "__common__" diff --git a/production/doctype/production_plan_item/production_plan_item.txt b/production/doctype/production_plan_item/production_plan_item.txt index cd4507fc1a..b2cbf8dcf0 100644 --- a/production/doctype/production_plan_item/production_plan_item.txt +++ b/production/doctype/production_plan_item/production_plan_item.txt @@ -10,7 +10,6 @@ "istable": 1, "autoname": "PPID/.#####", "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType", "module": "Production" }, diff --git a/production/doctype/production_plan_sales_order/production_plan_sales_order.txt b/production/doctype/production_plan_sales_order/production_plan_sales_order.txt index e42d8d5c46..79adc14ecc 100644 --- a/production/doctype/production_plan_sales_order/production_plan_sales_order.txt +++ b/production/doctype/production_plan_sales_order/production_plan_sales_order.txt @@ -10,7 +10,6 @@ "istable": 1, "autoname": "PP/.SO/.#####", "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType", "module": "Production" }, diff --git a/production/doctype/production_planning_tool/production_planning_tool.txt b/production/doctype/production_planning_tool/production_planning_tool.txt index bf736417d0..9bda9ab0e7 100644 --- a/production/doctype/production_planning_tool/production_planning_tool.txt +++ b/production/doctype/production_planning_tool/production_planning_tool.txt @@ -10,7 +10,6 @@ "read_only": 1, "issingle": 1, "in_create": 1, - "default_print_format": "Standard", "doctype": "DocType", "module": "Production", "name": "__common__" diff --git a/production/doctype/workstation/workstation.txt b/production/doctype/workstation/workstation.txt index 999ce58dbe..f625971783 100644 --- a/production/doctype/workstation/workstation.txt +++ b/production/doctype/workstation/workstation.txt @@ -17,7 +17,6 @@ 'allow_trash': 1, 'autoname': u'field:workstation_name', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'document_type': u'Master', 'module': u'Production', diff --git a/projects/doctype/project/project.txt b/projects/doctype/project/project.txt index eaa0ac8974..3c58f1a45a 100644 --- a/projects/doctype/project/project.txt +++ b/projects/doctype/project/project.txt @@ -9,7 +9,6 @@ { "autoname": "field:project_name", "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "customer, status, priority, is_active", "module": "Projects", "doctype": "DocType", diff --git a/projects/doctype/project_milestone/project_milestone.txt b/projects/doctype/project_milestone/project_milestone.txt index 6a7a4fb0aa..4430c7de61 100644 --- a/projects/doctype/project_milestone/project_milestone.txt +++ b/projects/doctype/project_milestone/project_milestone.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Projects', diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt index 2ced8289d7..3fcf1e36f1 100644 --- a/projects/doctype/task/task.txt +++ b/projects/doctype/task/task.txt @@ -17,7 +17,6 @@ 'allow_trash': 1, 'autoname': u'TASK.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'document_type': u'Master', 'max_attachments': 5, diff --git a/selling/doctype/campaign/campaign.txt b/selling/doctype/campaign/campaign.txt index 41c0e77709..0ec59dfc8d 100644 --- a/selling/doctype/campaign/campaign.txt +++ b/selling/doctype/campaign/campaign.txt @@ -16,7 +16,6 @@ 'allow_trash': 1, 'autoname': u'field:campaign_name', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ', 'doctype': 'DocType', 'document_type': u'Master', diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt index cc49c0aa37..1ef77cef4e 100644 --- a/selling/doctype/customer/customer.txt +++ b/selling/doctype/customer/customer.txt @@ -14,7 +14,6 @@ "document_type": "Master", "autoname": "naming_series:", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType" }, diff --git a/selling/doctype/installation_note/installation_note.txt b/selling/doctype/installation_note/installation_note.txt index a3812d7e86..f0239bb66e 100644 --- a/selling/doctype/installation_note/installation_note.txt +++ b/selling/doctype/installation_note/installation_note.txt @@ -15,7 +15,6 @@ '_last_update': u'1306480044', 'autoname': u'IN/.####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_submittable': 1, 'module': u'Selling', diff --git a/selling/doctype/installation_note_item/installation_note_item.txt b/selling/doctype/installation_note_item/installation_note_item.txt index 8a999f4c06..0b9615b778 100644 --- a/selling/doctype/installation_note_item/installation_note_item.txt +++ b/selling/doctype/installation_note_item/installation_note_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'IID/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Selling', diff --git a/selling/doctype/lead/lead.txt b/selling/doctype/lead/lead.txt index 04a399701e..6ffe3c4274 100644 --- a/selling/doctype/lead/lead.txt +++ b/selling/doctype/lead/lead.txt @@ -9,7 +9,6 @@ { "autoname": "naming_series:", "name": "__common__", - "default_print_format": "Standard", "search_fields": "lead_name,lead_owner,status", "module": "Selling", "doctype": "DocType", diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt index f3e9d85355..eafeff0dd3 100644 --- a/selling/doctype/opportunity/opportunity.txt +++ b/selling/doctype/opportunity/opportunity.txt @@ -10,7 +10,6 @@ "is_submittable": 1, "autoname": "naming_series:", "description": "Potential Sales Deal", - "default_print_format": "Standard", "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company", "module": "Selling", "doctype": "DocType", diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index 6924dcb23a..2c9f880674 100644 --- a/selling/doctype/quotation/quotation.txt +++ b/selling/doctype/quotation/quotation.txt @@ -16,7 +16,6 @@ "allow_email": 0, "autoname": "naming_series:", "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType", "max_attachments": 1, "hide_toolbar": 0 diff --git a/selling/doctype/quotation_item/quotation_item.txt b/selling/doctype/quotation_item/quotation_item.txt index 6ae657cbf1..e025d3bae0 100644 --- a/selling/doctype/quotation_item/quotation_item.txt +++ b/selling/doctype/quotation_item/quotation_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'QUOD/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_transaction_doc': 0, 'istable': 1, diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt index 822141123b..ec208599d3 100644 --- a/selling/doctype/sales_order/sales_order.txt +++ b/selling/doctype/sales_order/sales_order.txt @@ -16,7 +16,6 @@ "document_type": "Transaction", "issingle": 0, "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType" }, { diff --git a/selling/doctype/sales_order_item/sales_order_item.txt b/selling/doctype/sales_order_item/sales_order_item.txt index 1c806982c6..1987b6ecc8 100644 --- a/selling/doctype/sales_order_item/sales_order_item.txt +++ b/selling/doctype/sales_order_item/sales_order_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'SOD/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Selling', diff --git a/selling/doctype/sms_center/sms_center.txt b/selling/doctype/sms_center/sms_center.txt index d80787abf3..7f2aefcee7 100644 --- a/selling/doctype/sms_center/sms_center.txt +++ b/selling/doctype/sms_center/sms_center.txt @@ -18,7 +18,6 @@ 'allow_email': 1, 'allow_print': 1, 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_heading': 0, 'hide_toolbar': 0, diff --git a/setup/doctype/customer_group/customer_group.txt b/setup/doctype/customer_group/customer_group.txt index 0cecb592a5..dc5641cec6 100644 --- a/setup/doctype/customer_group/customer_group.txt +++ b/setup/doctype/customer_group/customer_group.txt @@ -14,7 +14,6 @@ "read_only": 1, "autoname": "field:customer_group_name", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType" }, diff --git a/setup/doctype/email_settings/email_settings.txt b/setup/doctype/email_settings/email_settings.txt index cf9d443198..8d60fbcc46 100644 --- a/setup/doctype/email_settings/email_settings.txt +++ b/setup/doctype/email_settings/email_settings.txt @@ -17,7 +17,6 @@ 'allow_email': 1, 'allow_print': 1, 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'Email Settings for Outgoing and Incoming Emails.', 'doctype': 'DocType', 'in_create': 1, diff --git a/setup/doctype/features_setup/features_setup.txt b/setup/doctype/features_setup/features_setup.txt index 486e9d356d..cd47ce5072 100644 --- a/setup/doctype/features_setup/features_setup.txt +++ b/setup/doctype/features_setup/features_setup.txt @@ -14,7 +14,6 @@ { '_last_update': u'1323840127', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'issingle': 1, 'module': u'Setup', diff --git a/setup/doctype/global_defaults/global_defaults.txt b/setup/doctype/global_defaults/global_defaults.txt index 6c47b610ee..2a4c74cc43 100644 --- a/setup/doctype/global_defaults/global_defaults.txt +++ b/setup/doctype/global_defaults/global_defaults.txt @@ -17,7 +17,6 @@ 'allow_email': 1, 'allow_print': 1, 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'hide_toolbar': 0, 'in_create': 1, diff --git a/setup/doctype/item_group/item_group.txt b/setup/doctype/item_group/item_group.txt index 7d8b22558b..653752b8bb 100644 --- a/setup/doctype/item_group/item_group.txt +++ b/setup/doctype/item_group/item_group.txt @@ -15,7 +15,6 @@ "description": "Item Classification", "issingle": 0, "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType" }, diff --git a/setup/doctype/naming_series_options/naming_series_options.txt b/setup/doctype/naming_series_options/naming_series_options.txt index 88554ecec6..ade734e309 100644 --- a/setup/doctype/naming_series_options/naming_series_options.txt +++ b/setup/doctype/naming_series_options/naming_series_options.txt @@ -14,7 +14,6 @@ { 'autoname': u'__NSO.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'in_create': 1, 'module': u'Setup', diff --git a/setup/doctype/sales_partner/sales_partner.txt b/setup/doctype/sales_partner/sales_partner.txt index 4e792617ab..43e869d2be 100644 --- a/setup/doctype/sales_partner/sales_partner.txt +++ b/setup/doctype/sales_partner/sales_partner.txt @@ -16,7 +16,6 @@ 'allow_trash': 1, 'autoname': u'field:partner_name', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'A **Sales Partner** is a third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission. This is useful if you make the end sale to the **Customer**, involving your **Sales Partner**.\n\nIf you sell to your **Sales Partner** who in-turn sells it to the **Customer**, then you must make a **Customer** instead.', 'doctype': 'DocType', 'document_type': u'Master', diff --git a/setup/doctype/terms_and_conditions/terms_and_conditions.txt b/setup/doctype/terms_and_conditions/terms_and_conditions.txt index c120b2c4ff..14b1f8c3c2 100644 --- a/setup/doctype/terms_and_conditions/terms_and_conditions.txt +++ b/setup/doctype/terms_and_conditions/terms_and_conditions.txt @@ -16,7 +16,6 @@ 'allow_trash': 1, 'autoname': u'field:title', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'description': u'Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.', 'doctype': 'DocType', 'document_type': u'Master', diff --git a/setup/doctype/territory/territory.txt b/setup/doctype/territory/territory.txt index f0a112e88b..e431eb2e8d 100644 --- a/setup/doctype/territory/territory.txt +++ b/setup/doctype/territory/territory.txt @@ -15,7 +15,6 @@ "read_only": 1, "autoname": "field:territory_name", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType", "name_case": "Title Case" diff --git a/setup/doctype/workflow_rule/workflow_rule.txt b/setup/doctype/workflow_rule/workflow_rule.txt index 93f1c40bf9..5b4d56c357 100644 --- a/setup/doctype/workflow_rule/workflow_rule.txt +++ b/setup/doctype/workflow_rule/workflow_rule.txt @@ -14,7 +14,6 @@ { 'autoname': u'field:rule_name', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'document_type': u'Master', 'module': u'Setup', diff --git a/stock/doctype/bin/bin.txt b/stock/doctype/bin/bin.txt index 158dbde2f2..5578a3470b 100644 --- a/stock/doctype/bin/bin.txt +++ b/stock/doctype/bin/bin.txt @@ -15,7 +15,6 @@ '_last_update': u'1322549701', 'autoname': u'BIN/.#######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_toolbar': 1, 'in_create': 1, diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt index 7f402fad11..d3e16423ef 100644 --- a/stock/doctype/delivery_note/delivery_note.txt +++ b/stock/doctype/delivery_note/delivery_note.txt @@ -16,7 +16,6 @@ "allow_attach": 1, "autoname": "naming_series:", "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType" }, { diff --git a/stock/doctype/delivery_note_item/delivery_note_item.txt b/stock/doctype/delivery_note_item/delivery_note_item.txt index 8d0d387699..cb25678dba 100644 --- a/stock/doctype/delivery_note_item/delivery_note_item.txt +++ b/stock/doctype/delivery_note_item/delivery_note_item.txt @@ -15,7 +15,6 @@ '_last_update': u'1311621379', 'autoname': u'DND/.#######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Stock', diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt index 4dfb972481..889f29b4ad 100644 --- a/stock/doctype/item/item.txt +++ b/stock/doctype/item/item.txt @@ -14,7 +14,6 @@ "description": "A Product or a Service that is bought, sold or kept in stock.", "autoname": "field:item_code", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType", "max_attachments": 1 diff --git a/stock/doctype/item_price/item_price.txt b/stock/doctype/item_price/item_price.txt index a48f8d15cb..d575155940 100644 --- a/stock/doctype/item_price/item_price.txt +++ b/stock/doctype/item_price/item_price.txt @@ -14,7 +14,6 @@ { 'autoname': u'RFD/.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'in_create': 1, 'istable': 1, diff --git a/stock/doctype/landed_cost_item/landed_cost_item.txt b/stock/doctype/landed_cost_item/landed_cost_item.txt index 06f765dc7e..268d890eab 100644 --- a/stock/doctype/landed_cost_item/landed_cost_item.txt +++ b/stock/doctype/landed_cost_item/landed_cost_item.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Stock', diff --git a/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt b/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt index ada4fef39b..ec80d7d7e4 100644 --- a/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt +++ b/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt @@ -13,7 +13,6 @@ # These values are common for all DocType { 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Stock', diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt index 0b91c94764..d0659e1ca2 100644 --- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt +++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt @@ -14,7 +14,6 @@ { '_last_update': u'1321441191', 'colour': u'White:FFF', - 'default_print_format': u'Standard', u'doctype': u'DocType', 'issingle': 1, 'module': u'Stock', diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt index 4df938366a..608d265c0c 100755 --- a/stock/doctype/purchase_receipt/purchase_receipt.txt +++ b/stock/doctype/purchase_receipt/purchase_receipt.txt @@ -9,7 +9,6 @@ { "is_submittable": 1, "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "status, posting_date, supplier", "module": "Stock", "doctype": "DocType", diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt index 1d2810fb4a..d49dfa9644 100755 --- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt +++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt @@ -10,7 +10,6 @@ "istable": 1, "autoname": "GRND/.#######", "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType", "module": "Stock" }, diff --git a/stock/doctype/serial_no/serial_no.txt b/stock/doctype/serial_no/serial_no.txt index 79ba415534..5a9f415dfe 100644 --- a/stock/doctype/serial_no/serial_no.txt +++ b/stock/doctype/serial_no/serial_no.txt @@ -14,7 +14,6 @@ "description": "Distinct unit of an Item", "autoname": "field:serial_no", "name": "__common__", - "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType" }, diff --git a/stock/doctype/stock_entry/stock_entry.txt b/stock/doctype/stock_entry/stock_entry.txt index 5d2a79d5b7..f528430081 100644 --- a/stock/doctype/stock_entry/stock_entry.txt +++ b/stock/doctype/stock_entry/stock_entry.txt @@ -21,7 +21,6 @@ "hide_heading": 0, "issingle": 0, "name": "__common__", - "default_print_format": "Standard", "allow_rename": 0, "doctype": "DocType", "max_attachments": 0, diff --git a/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/stock/doctype/stock_entry_detail/stock_entry_detail.txt index 503dd5b438..c191797326 100644 --- a/stock/doctype/stock_entry_detail/stock_entry_detail.txt +++ b/stock/doctype/stock_entry_detail/stock_entry_detail.txt @@ -10,7 +10,6 @@ "istable": 1, "autoname": "MTND/.######", "name": "__common__", - "default_print_format": "Standard", "doctype": "DocType", "module": "Stock" }, diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt index 275cf303d4..6a5baf46ab 100644 --- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt +++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt @@ -15,7 +15,6 @@ '_last_update': u'1322549701', 'autoname': u'SLE/.########', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'hide_toolbar': 1, 'in_create': 1, diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.txt b/stock/doctype/stock_reconciliation/stock_reconciliation.txt index ac23d59c8d..b788745e4d 100644 --- a/stock/doctype/stock_reconciliation/stock_reconciliation.txt +++ b/stock/doctype/stock_reconciliation/stock_reconciliation.txt @@ -16,7 +16,6 @@ 'allow_attach': 1, 'autoname': u'SR/.######', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_submittable': 1, 'max_attachments': 1, diff --git a/stock/doctype/warehouse/warehouse.txt b/stock/doctype/warehouse/warehouse.txt index 428910b382..21afd03029 100644 --- a/stock/doctype/warehouse/warehouse.txt +++ b/stock/doctype/warehouse/warehouse.txt @@ -9,7 +9,6 @@ { "autoname": "field:warehouse_name", "description": "A logical Warehouse against which stock entries are made.", - "default_print_format": "Standard", "allow_rename": 1, "search_fields": "warehouse_type", "module": "Stock", diff --git a/support/doctype/customer_issue/customer_issue.txt b/support/doctype/customer_issue/customer_issue.txt index cc03fffda7..9225eb37b2 100644 --- a/support/doctype/customer_issue/customer_issue.txt +++ b/support/doctype/customer_issue/customer_issue.txt @@ -10,7 +10,6 @@ "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" diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.txt b/support/doctype/maintenance_schedule/maintenance_schedule.txt index 4662ce9217..8061651b3f 100644 --- a/support/doctype/maintenance_schedule/maintenance_schedule.txt +++ b/support/doctype/maintenance_schedule/maintenance_schedule.txt @@ -15,7 +15,6 @@ '_last_update': u'1322549701', 'autoname': u'MS.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_submittable': 1, 'module': u'Support', diff --git a/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt b/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt index 8dc9b919b7..0d24fd4084 100644 --- a/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt +++ b/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt @@ -14,7 +14,6 @@ { 'autoname': u'MSD.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Support', diff --git a/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt b/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt index 7e815f5eaf..68007378b9 100644 --- a/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt +++ b/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt @@ -14,7 +14,6 @@ { 'autoname': u'IMD.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Support', diff --git a/support/doctype/maintenance_visit/maintenance_visit.txt b/support/doctype/maintenance_visit/maintenance_visit.txt index 3b2cec9b50..070daf1270 100644 --- a/support/doctype/maintenance_visit/maintenance_visit.txt +++ b/support/doctype/maintenance_visit/maintenance_visit.txt @@ -15,7 +15,6 @@ '_last_update': u'1322549701', 'autoname': u'MV.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'is_submittable': 1, 'module': u'Support', diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt index fc0c575657..b2bdadb735 100644 --- a/support/doctype/support_ticket/support_ticket.txt +++ b/support/doctype/support_ticket/support_ticket.txt @@ -9,7 +9,6 @@ { "autoname": "naming_series:", "allow_attach": 1, - "default_print_format": "Standard", "search_fields": "status,customer,allocated_to,subject,raised_by", "module": "Support", "doctype": "DocType", diff --git a/utilities/doctype/address/address.txt b/utilities/doctype/address/address.txt index 1ccfaa18f1..338ae8860a 100644 --- a/utilities/doctype/address/address.txt +++ b/utilities/doctype/address/address.txt @@ -15,7 +15,6 @@ '_last_update': u'1319016431', 'allow_trash': 1, 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'document_type': u'Master', 'in_dialog': 1, diff --git a/utilities/doctype/contact/contact.txt b/utilities/doctype/contact/contact.txt index e8813b5372..6eb59c6c1e 100644 --- a/utilities/doctype/contact/contact.txt +++ b/utilities/doctype/contact/contact.txt @@ -8,7 +8,6 @@ }, { "in_create": 0, - "default_print_format": "Standard", "doctype": "DocType", "module": "Utilities", "in_dialog": 0, diff --git a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt b/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt index a62d2e7c45..fadf1a223a 100644 --- a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt +++ b/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt @@ -14,7 +14,6 @@ { 'autoname': u'GLMDetail.#####', 'colour': u'White:FFF', - 'default_print_format': u'Standard', 'doctype': 'DocType', 'istable': 1, 'module': u'Utilities', From cddbe6dd80fdb1aae8f9c06e7b43e27d55055e56 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 11 Dec 2012 14:35:45 +0530 Subject: [PATCH 2/2] validation while created through company saving and root deleted --- accounts/doctype/account/account.py | 77 ++++++++++++++++------------- setup/doctype/company/company.py | 8 ++- 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index 3f7a18128e..042cd5a259 100644 --- a/accounts/doctype/account/account.py +++ b/accounts/doctype/account/account.py @@ -34,22 +34,21 @@ class DocType: company_abbr = sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0] self.doc.name = self.doc.account_name.strip() + ' - ' + company_abbr - # Get customer/supplier address def get_address(self): - add=sql("Select address from `tab%s` where name='%s'"%(self.doc.master_type,self.doc.master_name)) - ret={'address':add[0][0]} - return ret - - # check whether master name entered for supplier/customer + add=sql("Select address from `tab%s` where name='%s'" % + (self.doc.master_type, self.doc.master_name)) + return {'address': add[0][0]} + def validate_master_name(self): - if (self.doc.master_type == 'Customer' or self.doc.master_type == 'Supplier') and not self.doc.master_name: + if (self.doc.master_type == 'Customer' or self.doc.master_type == 'Supplier') \ + and not self.doc.master_name: msgprint("Message: Please enter Master Name once the account is created.") - - # Fetch Parent Details and validation for account not to be created under ledger def validate_parent(self): + """Fetch Parent Details and validation for account not to be created under ledger""" if self.doc.parent_account: - par = sql("select name, group_or_ledger, is_pl_account, debit_or_credit from tabAccount where name =%s",self.doc.parent_account) + par = sql("""select name, group_or_ledger, is_pl_account, debit_or_credit + from tabAccount where name =%s""",self.doc.parent_account) if not par: msgprint("Parent account does not exists", raise_exception=1) elif par and par[0][0] == self.doc.name: @@ -57,7 +56,8 @@ class DocType: elif par and par[0][1] != 'Group': msgprint("Parent account can not be a ledger", raise_exception=1) elif par and self.doc.debit_or_credit and par[0][3] != self.doc.debit_or_credit: - msgprint("You can not move a %s account under %s account" % (self.doc.debit_or_credit, par[0][3]), raise_exception=1) + msgprint("You can not move a %s account under %s account" % + (self.doc.debit_or_credit, par[0][3]), raise_exception=1) elif par and not self.doc.is_pl_account: self.doc.is_pl_account = par[0][2] self.doc.debit_or_credit = par[0][3] @@ -69,9 +69,10 @@ class DocType: webnotes.msgprint("One company cannot have more than 4 root Accounts", raise_exception=1) - # Account name must be unique def validate_duplicate_account(self): - if (self.doc.fields.get('__islocal') or (not self.doc.name)) and sql("select name from tabAccount where account_name=%s and company=%s", (self.doc.account_name, self.doc.company)): + if (self.doc.fields.get('__islocal') or not self.doc.name) and \ + sql("""select name from tabAccount where account_name=%s and company=%s""", + (self.doc.account_name, self.doc.company)): msgprint("Account Name: %s already exists, please rename" % self.doc.account_name, raise_exception=1) @@ -83,9 +84,11 @@ class DocType: def convert_group_to_ledger(self): if self.check_if_child_exists(): - msgprint("Account: %s has existing child. You can not convert this account to ledger" % (self.doc.name), raise_exception=1) + msgprint("Account: %s has existing child. You can not convert this account to ledger" % + (self.doc.name), raise_exception=1) elif self.check_gle_exists(): - msgprint("Account with existing transaction can not be converted to ledger.", raise_exception=1) + msgprint("Account with existing transaction can not be converted to ledger.", + raise_exception=1) else: self.doc.group_or_ledger = 'Ledger' self.doc.save() @@ -105,11 +108,13 @@ class DocType: # Check if any previous balance exists def check_gle_exists(self): - exists = sql("select name from `tabGL Entry` where account = '%s' and ifnull(is_cancelled, 'No') = 'No'" % (self.doc.name)) + exists = sql("""select name from `tabGL Entry` where account = '%s' + and ifnull(is_cancelled, 'No') = 'No'""" % (self.doc.name)) return exists and exists[0][0] or '' def check_if_child_exists(self): - return sql("select name from `tabAccount` where parent_account = %s and docstatus != 2", self.doc.name) + return sql("""select name from `tabAccount` where parent_account = %s + and docstatus != 2""", self.doc.name) def validate_mandatory(self): if not self.doc.debit_or_credit: @@ -124,61 +129,63 @@ class DocType: self.validate_root_details() self.validate_mandatory() - # Defaults if not self.doc.parent_account: self.doc.parent_account = '' - # Update Node Set Model def update_nsm_model(self): import webnotes import webnotes.utils.nestedset webnotes.utils.nestedset.update_nsm(self) def on_update(self): - # update nsm self.validate_max_root_accounts() self.update_nsm_model() - # Check user role for approval process def get_authorized_user(self): # Check logged-in user is authorized - if webnotes.conn.get_value('Global Defaults', None, 'credit_controller') in webnotes.user.get_roles(): + if webnotes.conn.get_value('Global Defaults', None, 'credit_controller') \ + in webnotes.user.get_roles(): return 1 - # Check Credit limit for customer def check_credit_limit(self, account, company, tot_outstanding): # Get credit limit credit_limit_from = 'Customer' - cr_limit = sql("select t1.credit_limit from tabCustomer t1, `tabAccount` t2 where t2.name='%s' and t1.name = t2.master_name" % account) + cr_limit = sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2 + where t2.name='%s' and t1.name = t2.master_name""" % account) credit_limit = cr_limit and flt(cr_limit[0][0]) or 0 if not credit_limit: credit_limit = webnotes.conn.get_value('Company', company, 'credit_limit') credit_limit_from = 'global settings in the Company' # If outstanding greater than credit limit and not authorized person raise exception - if credit_limit > 0 and flt(tot_outstanding) > credit_limit and not self.get_authorized_user(): - msgprint("Total Outstanding amount (%s) for %s can not be greater than credit limit (%s). To change your credit limit settings, please update the %s" \ - % (fmt_money(tot_outstanding), account, fmt_money(credit_limit), credit_limit_from), raise_exception=1) + if credit_limit > 0 and flt(tot_outstanding) > credit_limit \ + and not self.get_authorized_user(): + msgprint("""Total Outstanding amount (%s) for %s can not be \ + greater than credit limit (%s). To change your credit limit settings, \ + please update the %s""" % (fmt_money(tot_outstanding), + account, fmt_money(credit_limit), credit_limit_from), raise_exception=1) def validate_trash(self): """checks gl entries and if child exists""" + if not self.doc.parent_account: + msgprint("Root account can not be deleted", raise_exception=1) + if self.check_gle_exists(): - msgprint("Account with existing transaction (Sales Invoice / Purchase Invoice / Journal Voucher) can not be trashed", raise_exception=1) + msgprint("""Account with existing transaction (Sales Invoice / Purchase Invoice / \ + Journal Voucher) can not be trashed""", raise_exception=1) if self.check_if_child_exists(): - msgprint("Child account exists for this account. You can not trash this account.", raise_exception=1) + msgprint("Child account exists for this account. You can not trash this account.", + raise_exception=1) - # On Trash def on_trash(self): self.validate_trash() - - # rebuild tree self.update_nsm_model() # delete all cancelled gl entry of this account - sql("delete from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'Yes'", self.doc.name) + sql("""delete from `tabGL Entry` where account = %s and + ifnull(is_cancelled, 'No') = 'Yes'""", self.doc.name) - # on rename def on_rename(self, new, old): company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr") parts = new.split(" - ") @@ -191,4 +198,4 @@ class DocType: sql("update `tabAccount` set account_name = '%s' where name = '%s'" % \ (account_name, old)) - return " - ".join(parts) + return " - ".join(parts) \ No newline at end of file diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index 8bed425ab6..e570b72814 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -204,11 +204,10 @@ class DocType: glc.add_cc(str(c)) - # On update - # --------------------------------------------------- def on_update(self): self.set_letter_head() - ac = sql("select name from tabAccount where account_name='Income' and company=%s", self.doc.name) + ac = sql("select name from tabAccount where company=%s and docstatus<2 limit 1", + self.doc.name) if not ac: self.create_default_accounts() self.set_default_groups() @@ -216,8 +215,7 @@ class DocType: if not cc: self.create_default_cost_center() - # - # --------------------------------------------------- + def on_trash(self): """ Trash accounts and cost centers for this company if no gl entry exists