def execute():
	webnotes.conn.sql("""delete from `tabDocPerm` where parent='Custom Script'""")
	webnotes.conn.commit()
	
	from webnotes.model.sync import sync
	sync("core", "custom_script", force=1)
		
	webnotes.conn.begin()
Пример #2
0
def execute():
	import webnotes
	webnotes.conn.sql("""update `tabPurchase Order Item` t1, `tabPurchase Order` t2
		set t1.project_name = t2.project_name where t1.parent = t2.name
		and ifnull(t1.project_name, '') = ''""")
	webnotes.conn.sql("""update `tabPurchase Invoice Item` t1, `tabPurchase Invoice` t2
		set t1.project_name = t2.project_name where t1.parent = t2.name
		and ifnull(t1.project_name, '') = ''""")
	webnotes.conn.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
		set t1.project_name = t2.project_name where t1.parent = t2.name
		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.conn.begin()
Пример #3
0
def execute():
    import webnotes
    webnotes.conn.sql(
        """update `tabPurchase Order Item` t1, `tabPurchase Order` t2
		set t1.project_name = t2.project_name where t1.parent = t2.name
		and ifnull(t1.project_name, '') = ''""")
    webnotes.conn.sql(
        """update `tabPurchase Invoice Item` t1, `tabPurchase Invoice` t2
		set t1.project_name = t2.project_name where t1.parent = t2.name
		and ifnull(t1.project_name, '') = ''""")
    webnotes.conn.sql(
        """update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
		set t1.project_name = t2.project_name where t1.parent = t2.name
		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.conn.begin()
Пример #4
0
def execute():
    webnotes.conn.sql("""delete from tabDocPerm where parent='Appraisal'""")
    from webnotes.model.sync import sync
    sync("hr", "appraisal", force=True)
Пример #5
0
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')
	
	from webnotes.modules import reload_doc
	reload_doc('buying', 'DocType Mapper', 'Material Request-Supplier Quotation')
	reload_doc('buying', 'DocType Mapper', 'Supplier Quotation-Purchase Order')
	
Пример #6
0
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')

    from webnotes.modules import reload_doc
    reload_doc('buying', 'DocType Mapper',
               'Purchase Request-Supplier Quotation')
    reload_doc('buying', 'DocType Mapper', 'Supplier Quotation-Purchase Order')
def execute():
	webnotes.conn.sql("""delete from tabDocPerm where parent='Appraisal'""")
	from webnotes.model.sync import sync
	sync("hr", "appraisal", force=True)
Пример #8
0
def execute():
	import webnotes
	from webnotes.model.sync import sync
	sync('accounts', 'sales_invoice')
	
	webnotes.conn.sql("update `tabSales Invoice` set recurring_type = 'Monthly' where ifnull(convert_into_recurring_invoice, 0) = 1")