From e9baaa68e7d10d6075e77c78d74afa9baafc6306 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 26 Feb 2014 12:35:33 +0530 Subject: [PATCH] Changed frappe.conn to frappe.db --- .../SalesInvoice/SalesInvoice.html | 2 +- erpnext/accounts/doctype/account/account.py | 48 +++++----- .../accounts_settings/accounts_settings.py | 6 +- .../bank_reconciliation.py | 4 +- erpnext/accounts/doctype/c_form/c_form.py | 14 +-- .../doctype/cost_center/cost_center.py | 10 +-- .../doctype/fiscal_year/fiscal_year.py | 6 +- erpnext/accounts/doctype/gl_entry/gl_entry.py | 26 +++--- .../journal_voucher/journal_voucher.py | 48 +++++----- .../journal_voucher/test_journal_voucher.py | 30 +++---- .../doctype/mis_control/mis_control.py | 8 +- .../payment_to_invoice_matching_tool.py | 12 +-- .../period_closing_voucher.py | 12 +-- .../test_period_closing_voucher.py | 4 +- .../doctype/pos_setting/pos_setting.py | 6 +- .../purchase_invoice/purchase_invoice.py | 24 ++--- .../purchase_invoice/test_purchase_invoice.py | 12 +-- erpnext/accounts/doctype/sales_invoice/pos.py | 8 +- .../doctype/sales_invoice/sales_invoice.py | 76 ++++++++-------- .../sales_invoice/test_sales_invoice.py | 70 +++++++-------- .../sales_taxes_and_charges_master.py | 2 +- erpnext/accounts/general_ledger.py | 6 +- .../page/accounts_browser/accounts_browser.py | 6 +- erpnext/accounts/party.py | 24 ++--- .../accounts_payable/accounts_payable.py | 14 +-- .../accounts_receivable.py | 8 +- .../bank_clearance_summary.py | 2 +- .../bank_reconciliation_statement.py | 4 +- .../budget_variance_report.py | 6 +- .../customer_account_head.py | 4 +- .../report/general_ledger/general_ledger.py | 6 +- .../report/gross_profit/gross_profit.py | 8 +- .../item_wise_purchase_register.py | 6 +- .../item_wise_sales_register.py | 4 +- .../payment_period_based_on_invoice_date.py | 8 +- .../purchase_register/purchase_register.py | 14 +-- .../report/sales_register/sales_register.py | 16 ++-- .../supplier_account_head.py | 4 +- erpnext/accounts/utils.py | 54 ++++++------ .../buying_settings/buying_settings.py | 2 +- .../purchase_common/purchase_common.py | 20 ++--- .../doctype/purchase_order/purchase_order.py | 16 ++-- .../purchase_order/test_purchase_order.py | 10 +-- .../quality_inspection/quality_inspection.py | 8 +- erpnext/buying/doctype/supplier/supplier.py | 30 +++---- .../supplier_quotation/supplier_quotation.py | 4 +- erpnext/controllers/accounts_controller.py | 24 ++--- erpnext/controllers/buying_controller.py | 12 +-- erpnext/controllers/queries.py | 22 ++--- erpnext/controllers/selling_controller.py | 24 ++--- erpnext/controllers/status_updater.py | 24 ++--- erpnext/controllers/stock_controller.py | 14 +-- erpnext/controllers/trends.py | 10 +-- erpnext/home/__init__.py | 4 +- erpnext/home/doctype/feed/feed.py | 6 +- erpnext/home/page/activity/activity.py | 2 +- erpnext/hr/doctype/appraisal/appraisal.py | 10 +-- erpnext/hr/doctype/attendance/attendance.py | 10 +-- erpnext/hr/doctype/employee/employee.py | 20 ++--- .../hr/doctype/holiday_list/holiday_list.py | 4 +- erpnext/hr/doctype/hr_settings/hr_settings.py | 6 +- .../job_applicant/get_job_applications.py | 4 +- .../hr/doctype/job_applicant/job_applicant.py | 2 +- .../leave_allocation/leave_allocation.py | 18 ++-- .../leave_application/leave_application.py | 36 ++++---- .../test_leave_application.py | 32 +++---- .../leave_block_list/leave_block_list.py | 14 +-- .../leave_block_list/test_leave_block_list.py | 6 +- .../leave_control_panel.py | 4 +- .../doctype/salary_manager/salary_manager.py | 16 ++-- .../salary_manager/test_salary_manager.py | 22 ++--- erpnext/hr/doctype/salary_slip/salary_slip.py | 24 ++--- .../doctype/salary_slip/test_salary_slip.py | 8 +- .../salary_structure/salary_structure.py | 8 +- .../upload_attendance/upload_attendance.py | 10 +-- .../employee_birthday/employee_birthday.py | 2 +- .../employee_leave_balance.py | 8 +- .../monthly_attendance_sheet.py | 4 +- .../monthly_salary_register.py | 10 +-- erpnext/hr/utils.py | 4 +- erpnext/manufacturing/doctype/bom/bom.py | 40 ++++----- .../bom_replace_tool/bom_replace_tool.py | 6 +- .../production_order/production_order.py | 28 +++--- .../production_order/test_production_order.py | 10 +-- .../production_planning_tool.py | 22 ++--- .../doctype/workstation/workstation.py | 8 +- erpnext/patches.txt | 2 +- erpnext/patches/4_0/fields_to_be_renamed.py | 6 +- .../4_0/map_charge_to_taxes_and_charges.py | 6 +- .../move_warehouse_user_to_restrictions.py | 2 +- erpnext/patches/4_0/new_permissions.py | 6 +- ...to_sales_person_in_maintenance_schedule.py | 4 +- erpnext/patches/4_0/update_user_properties.py | 22 ++--- erpnext/projects/doctype/project/project.py | 6 +- erpnext/projects/doctype/task/task.py | 8 +- erpnext/projects/doctype/time_log/time_log.py | 4 +- .../time_log_batch/test_time_log_batch.py | 6 +- .../daily_time_log_summary.py | 6 +- .../project_wise_stock_tracking.py | 10 +-- erpnext/projects/utils.py | 4 +- erpnext/selling/doctype/customer/customer.py | 46 +++++----- .../selling/doctype/customer/test_customer.py | 4 +- .../installation_note/installation_note.py | 24 ++--- erpnext/selling/doctype/lead/get_leads.py | 6 +- erpnext/selling/doctype/lead/lead.py | 16 ++-- .../doctype/opportunity/opportunity.py | 16 ++-- .../selling/doctype/quotation/quotation.py | 16 ++-- .../selling/doctype/sales_bom/sales_bom.py | 6 +- .../doctype/sales_order/sales_order.py | 42 ++++----- .../doctype/sales_order/test_sales_order.py | 16 ++-- .../selling_settings/selling_settings.py | 2 +- .../selling/doctype/sms_center/sms_center.py | 8 +- .../page/sales_browser/sales_browser.py | 2 +- .../selling/page/sales_funnel/sales_funnel.py | 10 +-- .../available_stock_for_packing_items.py | 6 +- .../customer_acquisition_and_loyalty.py | 2 +- .../customers_not_buying_since_long_time.py | 4 +- ..._person_target_variance_item_group_wise.py | 8 +- .../sales_person_wise_transaction_summary.py | 4 +- ...rritory_target_variance_item_group_wise.py | 8 +- .../authorization_control.py | 30 +++---- .../authorization_rule/authorization_rule.py | 8 +- .../doctype/backup_manager/backup_dropbox.py | 22 ++--- .../backup_manager/backup_googledrive.py | 22 ++--- .../doctype/backup_manager/backup_manager.py | 8 +- erpnext/setup/doctype/company/company.py | 52 +++++------ erpnext/setup/doctype/currency/currency.py | 2 +- .../doctype/customer_group/customer_group.py | 8 +- .../doctype/email_digest/email_digest.py | 20 ++--- .../global_defaults/global_defaults.py | 10 +-- .../setup/doctype/item_group/item_group.py | 2 +- .../doctype/item_group/test_item_group.py | 28 +++--- .../doctype/naming_series/naming_series.py | 24 ++--- .../notification_control.py | 4 +- .../doctype/sales_partner/sales_partner.py | 2 +- .../doctype/sales_person/sales_person.py | 4 +- erpnext/setup/install.py | 10 +-- .../setup/page/setup_wizard/setup_wizard.py | 30 +++---- erpnext/setup/utils.py | 12 +-- erpnext/startup/__init__.py | 2 +- erpnext/startup/boot.py | 14 +-- erpnext/startup/event_handlers.py | 4 +- erpnext/stock/doctype/bin/bin.py | 4 +- .../doctype/delivery_note/delivery_note.py | 30 +++---- .../delivery_note/test_delivery_note.py | 26 +++--- erpnext/stock/doctype/item/item.py | 64 +++++++------- .../stock/doctype/item_price/item_price.py | 10 +-- .../landed_cost_wizard/landed_cost_wizard.py | 8 +- .../material_request/material_request.py | 26 +++--- .../material_request/test_material_request.py | 14 +-- .../stock/doctype/packed_item/packed_item.py | 8 +- .../doctype/packing_slip/packing_slip.py | 12 +-- .../stock/doctype/price_list/price_list.py | 6 +- .../purchase_receipt/purchase_receipt.py | 22 ++--- .../purchase_receipt/test_purchase_receipt.py | 20 ++--- erpnext/stock/doctype/serial_no/serial_no.py | 28 +++--- .../stock/doctype/stock_entry/stock_entry.py | 48 +++++----- .../doctype/stock_entry/test_stock_entry.py | 88 +++++++++---------- .../doctype/stock_ledger/stock_ledger.py | 4 +- .../stock_ledger_entry/stock_ledger_entry.py | 22 ++--- .../stock_reconciliation.py | 10 +-- .../test_stock_reconciliation.py | 22 ++--- .../doctype/stock_settings/stock_settings.py | 2 +- .../stock_uom_replace_utility.py | 18 ++-- erpnext/stock/doctype/warehouse/warehouse.py | 40 ++++----- erpnext/stock/get_item_details.py | 28 +++--- .../batch_wise_balance_history.py | 4 +- .../stock/report/item_prices/item_prices.py | 10 +-- .../itemwise_recommended_reorder_level.py | 10 +-- .../stock/report/stock_ageing/stock_ageing.py | 2 +- .../stock/report/stock_ledger/stock_ledger.py | 4 +- .../stock_projected_qty.py | 2 +- .../supplier_wise_sales_analytics.py | 6 +- .../warehouse_wise_stock_balance.py | 4 +- erpnext/stock/stock_ledger.py | 16 ++-- erpnext/stock/utils.py | 32 +++---- .../doctype/customer_issue/customer_issue.py | 8 +- .../maintenance_schedule.py | 26 +++--- .../maintenance_visit/maintenance_visit.py | 14 +-- .../support/doctype/newsletter/newsletter.py | 24 ++--- .../doctype/newsletter/test_newsletter.py | 6 +- .../support_ticket/get_support_mails.py | 4 +- .../doctype/support_ticket/support_ticket.py | 16 ++-- erpnext/utilities/cleanup_data.py | 28 +++--- erpnext/utilities/doctype/address/address.py | 6 +- erpnext/utilities/doctype/contact/contact.py | 14 +-- erpnext/utilities/doctype/note/note.py | 2 +- .../doctype/rename_tool/rename_tool.py | 4 +- .../doctype/sms_control/sms_control.py | 8 +- erpnext/utilities/repost_stock.py | 20 ++--- erpnext/utilities/transaction_base.py | 14 +-- 191 files changed, 1375 insertions(+), 1375 deletions(-) diff --git a/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.html b/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.html index 874d84ceb7..d4a49ef503 100644 --- a/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.html +++ b/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.html @@ -1,5 +1,5 @@ {%- if doc.letter_head -%} - {{ frappe.conn.get_value("Letter Head", doc.letter_head, "content") }} + {{ frappe.db.get_value("Letter Head", doc.letter_head, "content") }} {%- endif -%}