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

This commit is contained in:
Nabin Hait 2013-05-17 12:49:36 +05:30
commit 8f78bec5b8
24 changed files with 35 additions and 100 deletions

View File

@ -9,10 +9,9 @@ def execute():
for doctype in webnotes.conn.sql_list("""select parent from tabDocField where
fieldname='file_list'"""):
update_file_list(doctype, singles)
webnotes.conn.sql("""delete from tabDocField where fieldname='file_list'
and parent=%s""", doctype)
# the other scenario is handled in p07_update_file_data_2
if doctype in singles:
update_file_list(doctype, singles)
# export_to_files([["DocType", doctype]])

View File

@ -13,6 +13,4 @@ def execute():
webnotes.conn.sql("""delete from `tabCustom Field` where fieldname='file_list'
and parent=%s""", doctype)
webnotes.conn.sql("""delete from `tabDocField` where fieldname='file_list'
and parent=%s""", doctype)

View File

@ -31,5 +31,4 @@ def execute():
webnotes.conn.commit()
webnotes.conn.begin()
import webnotes.model.sync
webnotes.model.sync.sync('core', 'profile')
webnotes.reload_doc('core', 'doctype', 'profile')

View File

@ -1,5 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
from webnotes.model.bean import Bean
Bean("Website Settings", "Website Settings").save()

View File

@ -1,4 +0,0 @@
from __future__ import unicode_literals
def execute():
from webnotes.modules import reload_doc
reload_doc("buying", "report", "supplier_quotations")

View File

@ -23,3 +23,7 @@ def execute():
os.system("rm -rf app/hr/doctype/holiday_block_list_allow")
os.system("rm -rf app/hr/doctype/holiday_block_list_date")
for dt in ("Purchase Request", "Purchase Request Item"):
if webnotes.conn.exists("DocType", dt):
webnotes.delete_doc("DocType", dt)

View File

@ -6,7 +6,6 @@ def execute():
where parent in ('Address', 'Contact')""")
webnotes.conn.commit()
import webnotes.model.sync
webnotes.model.sync.sync('utilities', 'address')
webnotes.model.sync.sync('utilities', 'contact')
webnotes.reload_doc('utilities', 'doctype', 'address')
webnotes.reload_doc('utilities', 'doctype', 'contact')
webnotes.conn.begin()

View File

@ -1,12 +0,0 @@
from __future__ import unicode_literals
def execute():
"""allocate read write permission to guest for doctype 'Blog'"""
import webnotes
webnotes.conn.sql("""delete from `tabDocPerm` where parent = 'Blog'""")
webnotes.conn.commit()
import webnotes.model.sync
webnotes.model.sync.sync('website', 'blog', 1)
webnotes.conn.begin()

View File

@ -12,8 +12,6 @@ def execute():
and ifnull(t1.project_name, '') = ''""")
webnotes.conn.commit()
from webnotes.model.sync import sync
sync("buying", "purchase_order")
sync("buying", "purchase_request")
sync("accounts", "purchase_invoice")
webnotes.reload_doc("buying", "doctype", "purchase_order")
webnotes.reload_doc("accounts", "doctype", "purchase_invoice")
webnotes.conn.begin()

View File

@ -1,13 +1,12 @@
from __future__ import unicode_literals
import webnotes
def execute():
"""sync supplier quotatoin and create supplier quotation mappers"""
from webnotes.model.sync import sync
sync('buying', 'supplier_quotation')
sync('buying', 'supplier_quotation_item')
sync('buying', 'purchase_request')
sync('buying', 'purchase_request_item')
sync('buying', 'purchase_order')
sync('buying', 'purchase_order_item')
webnotes.reload_doc('buying', 'doctype', 'supplier_quotation')
webnotes.reload_doc('buying', 'doctype', 'supplier_quotation_item')
webnotes.reload_doc('buying', 'doctype', 'purchase_order')
webnotes.reload_doc('buying', 'doctype', 'purchase_order_item')
from webnotes.modules import reload_doc
reload_doc('buying', 'DocType Mapper', 'Material Request-Supplier Quotation')

View File

@ -1,14 +1,11 @@
from __future__ import unicode_literals
def execute():
import webnotes
import webnotes.model.sync
# sync doctypes required for the patch
webnotes.model.sync.sync('website', 'web_cache')
webnotes.model.sync.sync('website', 'web_page')
webnotes.model.sync.sync('website', 'blog')
webnotes.model.sync.sync('website', 'website_settings')
webnotes.model.sync.sync('stock', 'item')
webnotes.reload_doc('website', 'doctype', 'web_page')
webnotes.reload_doc('website', 'doctype', 'website_settings')
webnotes.reload_doc('stock', 'doctype', 'item')
cleanup()

View File

@ -2,11 +2,9 @@ from __future__ import unicode_literals
def execute():
import webnotes
# perform sync
import webnotes.model.sync
webnotes.model.sync.sync('buying', 'purchase_order_item')
webnotes.model.sync.sync('accounts', 'purchase_invoice_item')
webnotes.model.sync.sync('stock', 'purchase_receipt_item')
webnotes.reload_doc('buying', 'doctype', 'purchase_order_item')
webnotes.reload_doc('accounts', 'doctype', 'purchase_invoice_item')
webnotes.reload_doc('stock', 'doctype', 'purchase_receipt_item')
webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Order Item` t2 set t1.uom = t2.uom where ifnull(t1.po_detail, '') != '' and t1.po_detail = t2.name")
webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Receipt Item` t2 set t1.uom = t2.uom where ifnull(t1.pr_detail, '') != '' and t1.pr_detail = t2.name")

View File

@ -8,8 +8,7 @@ def execute():
webnotes.conn.commit()
import webnotes.model.sync
webnotes.model.sync.sync('core', 'search_criteria')
webnotes.model.sync.sync('core', 'report')
webnotes.reload_doc('core', 'doctype', 'search_criteria')
webnotes.reload_doc('core', 'doctype', 'report')
webnotes.conn.begin()

View File

@ -1,7 +1,6 @@
from __future__ import unicode_literals
def execute():
import webnotes
from webnotes.model.sync import sync
sync('accounts', 'sales_invoice')
webnotes.reload_doc('accounts', 'doctype', 'sales_invoice')
webnotes.conn.sql("update `tabSales Invoice` set recurring_type = 'Monthly' where ifnull(convert_into_recurring_invoice, 0) = 1")

View File

@ -4,9 +4,8 @@ def execute():
import webnotes
import webnotes.utils
import webnotes.model.sync
webnotes.conn.commit()
webnotes.model.sync.sync('setup', 'email_settings')
webnotes.reload_doc('setup', 'doctype', 'email_settings')
webnotes.conn.begin()
sync_support_mails = webnotes.utils.cint(webnotes.conn.get_value('Email Settings',

View File

@ -12,8 +12,7 @@ def execute():
clean_docfield_properties()
def change_property_setter_fieldnames():
import webnotes.model.sync
webnotes.model.sync.sync('core', 'property_setter')
webnotes.reload_doc('core', 'doctype', 'property_setter')
docfield_list = webnotes.conn.sql("""\
SELECT name, fieldname FROM `tabDocField`""", as_list=1)
custom_field_list = webnotes.conn.sql("""\

View File

@ -94,8 +94,7 @@ from webnotes.model.code import get_obj
from webnotes.model.doc import Document
def execute():
import webnotes.model.sync
webnotes.model.sync.sync('core', 'custom_field')
webnotes.reload_doc('core', 'doctype', 'custom_field')
for f in field_list:
res = webnotes.conn.sql("""SELECT name FROM `tabCustom Field`
WHERE dt=%s AND fieldname=%s""", (f[0], f[1]))

View File

@ -25,5 +25,4 @@ def execute():
webnotes.conn.commit()
webnotes.conn.begin()
import webnotes.model.sync
webnotes.model.sync.sync('setup', 'notification_control')
webnotes.reload_doc('setup', 'doctype', 'notification_control')

View File

@ -27,5 +27,4 @@ def execute():
doc.save()
webnotes.conn.commit()
webnotes.conn.begin()
import webnotes.model.sync
webnotes.model.sync.sync('core', 'custom_script')
webnotes.reload_doc('core', 'doctype', 'custom_script')

View File

@ -19,5 +19,4 @@ def execute():
doc.save()
webnotes.conn.commit()
webnotes.conn.begin()
import webnotes.model.sync
webnotes.model.sync.sync('core', 'profile')
webnotes.reload_doc('core', 'doctype', 'profile')

View File

@ -1,8 +1,7 @@
from __future__ import unicode_literals
def execute():
import webnotes
import webnotes.model.sync
webnotes.model.sync.sync('support', 'communication')
webnotes.reload_doc('support', 'doctype', 'communication')
webnotes.conn.commit()
webnotes.conn.begin()

View File

@ -27,5 +27,4 @@ def execute():
doc.save()
webnotes.conn.commit()
webnotes.conn.begin()
import webnotes.model.sync
webnotes.model.sync.sync('core', 'print_format')
webnotes.reload_doc('core', 'doctype', 'print_format')

View File

@ -74,15 +74,12 @@ patch_list = [
"patches.july_2012.auth_table",
"patches.july_2012.remove_event_role_owner_match",
"patches.july_2012.deprecate_bulk_rename",
"patches.july_2012.blog_guest_permission",
"patches.july_2012.bin_permission",
"patches.july_2012.project_patch_repeat",
"patches.july_2012.repost_stock_due_to_wrong_packing_list",
"patches.july_2012.supplier_quotation",
"patches.august_2012.report_supplier_quotations",
"patches.august_2012.task_allocated_to_assigned",
"patches.august_2012.change_profile_permission",
"patches.august_2012.changed_blog_date_format",
"patches.august_2012.repost_billed_amt",
"patches.august_2012.remove_cash_flow_statement",
"patches.september_2012.stock_report_permissions_for_accounts",
@ -93,7 +90,6 @@ patch_list = [
"patches.september_2012.plot_patch",
"patches.september_2012.event_permission",
"patches.september_2012.repost_stock",
"patches.september_2012.reload_gross_profit",
"patches.september_2012.rebuild_trees",
"patches.september_2012.deprecate_account_balance",
"patches.september_2012.profile_delete_permission",

View File

@ -1,21 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
def execute():
# reload gross profit report
from webnotes.modules import reload_doc
reload_doc('selling', 'search_criteria', 'gross_profit')