[fixed] merge-conflicts

This commit is contained in:
Saurabh 2017-11-08 15:08:38 +05:30
commit b97f08e0ac
5 changed files with 21 additions and 7 deletions

View File

@ -4,7 +4,7 @@ import inspect
import frappe
from erpnext.hooks import regional_overrides
__version__ = '9.2.6'
__version__ = '9.2.7'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -458,3 +458,4 @@ erpnext.patches.v9_0.set_uoms_in_variant_field
erpnext.patches.v9_0.copy_old_fees_field_data
execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
erpnext.patches.v9_0.set_pos_profile_name
erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings

View File

@ -5,7 +5,8 @@ from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype('Fees')
frappe.reload_doc("schools", "doctype", "fees")
if "total_amount" not in frappe.db.get_table_columns("Fees"):
return

View File

@ -0,0 +1,7 @@
import frappe
def execute():
default_warehouse = frappe.db.get_value("Stock Settings", None, "default_warehouse")
if default_warehouse:
if not frappe.db.get_value("Warehouse", {"name": default_warehouse}):
frappe.db.set_value("Stock Settings", None, "default_warehouse", "")

View File

@ -8,12 +8,17 @@ def execute():
doctype = 'POS Profile'
frappe.reload_doctype(doctype)
for pos in frappe.get_all(doctype):
for pos in frappe.get_all(doctype, filters={'disabled': 0}):
doc = frappe.get_doc(doctype, pos.name)
if not doc.user: continue
if not doc.user and doc.pos_profile_name: continue
doc.pos_profile_name = doc.user + ' - ' + doc.company
doc.save()
try:
doc.pos_profile_name = doc.user + ' - ' + doc.company
doc.flags.ignore_validate = True
doc.flags.ignore_mandatory = True
doc.save()
frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True)
frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True)
except frappe.LinkValidationError:
frappe.db.set_value("POS Profile", doc.name, 'disabled', 1)