fixes
This commit is contained in:
parent
c1199c0d27
commit
2b2b639492
@ -121,6 +121,10 @@ class AccountsController(TransactionBase):
|
||||
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():
|
||||
|
@ -6,7 +6,6 @@ import frappe, json
|
||||
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 @@ class TimeLog(Document):
|
||||
"""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'. """
|
||||
|
@ -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;
|
||||
|
@ -49,6 +49,7 @@
|
||||
padding-bottom: 100%;
|
||||
background-size: cover;
|
||||
border: 1px solid transparent;
|
||||
background-position: top center;
|
||||
}
|
||||
|
||||
.pos-item-area {
|
||||
|
@ -75,9 +75,10 @@ def setup_account(args=None):
|
||||
|
||||
login_as_first_user(args)
|
||||
|
||||
frappe.clear_cache()
|
||||
frappe.db.commit()
|
||||
|
||||
frappe.clear_cache()
|
||||
|
||||
except:
|
||||
if args:
|
||||
traceback = frappe.get_traceback()
|
||||
|
@ -153,10 +153,16 @@ class StockEntry(StockController):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user