mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
fixes
This commit is contained in:
@@ -121,6 +121,10 @@ class AccountsController(TransactionBase):
|
|||||||
args.update(item.as_dict())
|
args.update(item.as_dict())
|
||||||
if not args.get("transaction_date"):
|
if not args.get("transaction_date"):
|
||||||
args["transaction_date"] = args.get("posting_date")
|
args["transaction_date"] = args.get("posting_date")
|
||||||
|
|
||||||
|
if self.get("is_subcontracted"):
|
||||||
|
args["is_subcontracted"] = self.is_subcontracted
|
||||||
|
|
||||||
ret = get_item_details(args)
|
ret = get_item_details(args)
|
||||||
|
|
||||||
for fieldname, value in ret.items():
|
for fieldname, value in ret.items():
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import frappe, json
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import cstr, flt, get_datetime, get_time, getdate
|
from frappe.utils import cstr, flt, get_datetime, get_time, getdate
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
from dateutil.parser import parse
|
|
||||||
|
|
||||||
class OverlapError(frappe.ValidationError): pass
|
class OverlapError(frappe.ValidationError): pass
|
||||||
class OverProductionLoggedError(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"""
|
"""If in overlap, set start as the end point of the overlapping time log"""
|
||||||
overlapping = self.get_overlap_for("workstation")
|
overlapping = self.get_overlap_for("workstation")
|
||||||
if overlapping:
|
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):
|
def get_time_log_summary(self):
|
||||||
"""Returns 'Actual Operating Time'. """
|
"""Returns 'Actual Operating Time'. """
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
padding-bottom: 100%;
|
padding-bottom: 100%;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
background-position: top center;
|
||||||
}
|
}
|
||||||
.pos-item-area {
|
.pos-item-area {
|
||||||
border: 1px solid #d1d8dd;
|
border: 1px solid #d1d8dd;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
padding-bottom: 100%;
|
padding-bottom: 100%;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
background-position: top center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pos-item-area {
|
.pos-item-area {
|
||||||
|
|||||||
@@ -75,9 +75,10 @@ def setup_account(args=None):
|
|||||||
|
|
||||||
login_as_first_user(args)
|
login_as_first_user(args)
|
||||||
|
|
||||||
frappe.clear_cache()
|
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
|
|
||||||
|
frappe.clear_cache()
|
||||||
|
|
||||||
except:
|
except:
|
||||||
if args:
|
if args:
|
||||||
traceback = frappe.get_traceback()
|
traceback = frappe.get_traceback()
|
||||||
|
|||||||
@@ -153,10 +153,16 @@ class StockEntry(StockController):
|
|||||||
frappe.throw(_("Atleast one warehouse is mandatory"))
|
frappe.throw(_("Atleast one warehouse is mandatory"))
|
||||||
|
|
||||||
if self.purpose in source_mandatory and not d.s_warehouse:
|
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:
|
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 self.purpose in ["Manufacture", "Repack"]:
|
||||||
if validate_for_manufacture_repack:
|
if validate_for_manufacture_repack:
|
||||||
|
|||||||
Reference in New Issue
Block a user