diff --git a/patches/july_2013/__init__.py b/patches/july_2013/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/patches/july_2013/restore_tree_roots.py b/patches/july_2013/restore_tree_roots.py new file mode 100644 index 0000000000..ea3a9913ea --- /dev/null +++ b/patches/july_2013/restore_tree_roots.py @@ -0,0 +1,3 @@ +def execute(): + from startup.install import import_defaults + import_defaults() \ No newline at end of file diff --git a/startup/install.py b/startup/install.py index 89ab290d82..dfe03b2a3f 100644 --- a/startup/install.py +++ b/startup/install.py @@ -135,7 +135,7 @@ def import_defaults(): # supplier type {'doctype': 'Supplier Type', 'name': 'Default Supplier Type', 'supplier_type': 'Default Supplier Type'}, - + # warehouse type {'doctype': 'Warehouse Type', 'name': 'Default Warehouse Type', 'warehouse_type': 'Default Warehouse Type'}, {'doctype': 'Warehouse Type', 'name': 'Fixed Asset', 'warehouse_type': 'Fixed Asset'}, @@ -170,6 +170,6 @@ def import_defaults(): ] for r in records: - bean = webnotes.bean(r) - bean.insert() - \ No newline at end of file + if not webnotes.conn.exists(r['doctype'], r['name']): + bean = webnotes.bean(r) + bean.insert() \ No newline at end of file