fixes
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 6ba2be8..c622478 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -121,6 +121,10 @@
args.update(item.as_dict())
if not args.get("transaction_date"):
args["transaction_date"] = args.get("posting_date")
+
+ if self.get("is_subcontracted"):
+ args["is_subcontracted"] = self.is_subcontracted
+
ret = get_item_details(args)
for fieldname, value in ret.items():
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index 3117467..98cfcc5 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -6,7 +6,6 @@
from frappe import _
from frappe.utils import cstr, flt, get_datetime, get_time, getdate
from dateutil.relativedelta import relativedelta
-from dateutil.parser import parse
class OverlapError(frappe.ValidationError): pass
class OverProductionLoggedError(frappe.ValidationError): pass
@@ -176,7 +175,7 @@
"""If in overlap, set start as the end point of the overlapping time log"""
overlapping = self.get_overlap_for("workstation")
if overlapping:
- self.from_time = parse(overlapping.to_time) + relativedelta(minutes=10)
+ self.from_time = get_datetime(overlapping.to_time) + relativedelta(minutes=10)
def get_time_log_summary(self):
"""Returns 'Actual Operating Time'. """
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index 7259580..b5f2a2d 100644
--- a/erpnext/public/css/erpnext.css
+++ b/erpnext/public/css/erpnext.css
@@ -39,6 +39,7 @@
padding-bottom: 100%;
background-size: cover;
border: 1px solid transparent;
+ background-position: top center;
}
.pos-item-area {
border: 1px solid #d1d8dd;
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index dde04a4..830902a 100644
--- a/erpnext/public/less/erpnext.less
+++ b/erpnext/public/less/erpnext.less
@@ -49,6 +49,7 @@
padding-bottom: 100%;
background-size: cover;
border: 1px solid transparent;
+ background-position: top center;
}
.pos-item-area {
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py
index b07e372..51920cc 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.py
@@ -75,9 +75,10 @@
login_as_first_user(args)
- frappe.clear_cache()
frappe.db.commit()
+ frappe.clear_cache()
+
except:
if args:
traceback = frappe.get_traceback()
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 823d21e..e936582 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -153,10 +153,16 @@
frappe.throw(_("Atleast one warehouse is mandatory"))
if self.purpose in source_mandatory and not d.s_warehouse:
- frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
+ if self.from_warehouse:
+ d.s_warehouse = self.from_warehouse
+ else:
+ frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
if self.purpose in target_mandatory and not d.t_warehouse:
- frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
+ if self.to_warehouse:
+ d.t_warehouse = self.to_warehouse
+ else:
+ frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
if self.purpose in ["Manufacture", "Repack"]:
if validate_for_manufacture_repack: