Merge branch 'develop' of https://github.com/frappe/erpnext into sla_fix

This commit is contained in:
Himanshu Warekar 2019-05-21 22:42:10 +05:30
commit ff1a8b3070
6 changed files with 20 additions and 9 deletions

View File

@ -1,5 +1,5 @@
<div align="center">
<img src="https://raw.githubusercontent.com/frappe/erpnext/develop/erpnext/public/images/erp-icon.svg" height="128">
<img src="https://raw.githubusercontent.com/frappe/erpnext/develop/erpnext/public/images/erpnext-logo.png" height="128">
<h2>ERPNext</h2>
<p align="center">
<p>ERP made simple</p>

View File

@ -80,6 +80,7 @@ class StockController(AccountsController):
"cost_center": item_row.cost_center,
"remarks": self.get("remarks") or "Accounting Entry for Stock",
"debit": flt(sle.stock_value_difference, 2),
"is_opening": item_row.get("is_opening"),
}, warehouse_account[sle.warehouse]["account_currency"]))
# to target warehouse / expense account
@ -89,7 +90,8 @@ class StockController(AccountsController):
"cost_center": item_row.cost_center,
"remarks": self.get("remarks") or "Accounting Entry for Stock",
"credit": flt(sle.stock_value_difference, 2),
"project": item_row.get("project") or self.get("project")
"project": item_row.get("project") or self.get("project"),
"is_opening": item_row.get("is_opening")
}))
elif sle.warehouse not in warehouse_with_no_account:
warehouse_with_no_account.append(sle.warehouse)
@ -123,8 +125,17 @@ class StockController(AccountsController):
def get_voucher_details(self, default_expense_account, default_cost_center, sle_map):
if self.doctype == "Stock Reconciliation":
return [frappe._dict({ "name": voucher_detail_no, "expense_account": default_expense_account,
"cost_center": default_cost_center }) for voucher_detail_no, sle in sle_map.items()]
reconciliation_purpose = frappe.db.get_value(self.doctype, self.name, "purpose")
is_opening = "Yes" if reconciliation_purpose == "Opening Stock" else "No"
details = []
for voucher_detail_no, sle in sle_map.items():
details.append(frappe._dict({
"name": voucher_detail_no,
"expense_account": default_expense_account,
"cost_center": default_cost_center,
"is_opening": is_opening
}))
return details
else:
details = self.get("items")

View File

@ -110,7 +110,7 @@ class Lead(SellingController):
def set_lead_name(self):
if not self.lead_name:
# Check for leads being created through data import
if not self.company_name:
if not self.company_name and not self.flags.ignore_mandatory:
frappe.throw(_("A Lead requires either a person's name or an organization's name"))
self.lead_name = self.company_name

View File

@ -15,11 +15,11 @@ class TrainingFeedback(Document):
def on_submit(self):
training_event = frappe.get_doc("Training Event", self.training_event)
status = None
event_status = None
for e in training_event.employees:
if e.employee == self.employee:
status = 'Feedback Submitted'
event_status = 'Feedback Submitted'
break
if status:
frappe.db.set_value("Training Event", self.training_event, "status", status)
if event_status:
frappe.db.set_value("Training Event", self.training_event, "event_status", event_status)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB