2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-10-18 11:53:50 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import webnotes
|
|
|
|
|
|
|
|
def execute():
|
2013-11-26 12:29:11 +00:00
|
|
|
selling_price_list = webnotes.conn.get_value("Selling Settings", None, "selling_price_list")
|
|
|
|
if selling_price_list and not webnotes.conn.exists("Price List", selling_price_list):
|
|
|
|
webnotes.conn.set_value("Selling Settings", None, "selling_price_list", None)
|
|
|
|
|
|
|
|
buying_price_list = webnotes.conn.get_value("Buying Settings", None, "buying_price_list")
|
|
|
|
if buying_price_list and not webnotes.conn.exists("Price List", buying_price_list):
|
|
|
|
webnotes.conn.set_value("Buying Settings", None, "buying_price_list", None)
|
|
|
|
|
2013-10-18 11:53:50 +00:00
|
|
|
# reset property setters for series
|
|
|
|
for name in ("Stock Settings", "Selling Settings", "Buying Settings", "HR Settings"):
|
2013-12-05 12:35:07 +00:00
|
|
|
webnotes.reload_doc(name.split()[0], 'DocType', name)
|
|
|
|
webnotes.bean(name, name).save()
|