Merge pull request #6790 from neilLasrado/hotfix

Hotfixes for demo
This commit is contained in:
Nabin Hait 2016-11-01 17:40:03 +05:30 committed by GitHub
commit 06fe0c7c9d
4 changed files with 10 additions and 6 deletions

View File

@ -63,7 +63,10 @@ def setup_item():
for i in items:
item = frappe.new_doc('Item')
item.update(i)
item.default_warehouse = frappe.get_all('Warehouse', filters={'warehouse_name': item.default_warehouse}, limit=1)[0].name
if item.default_warehouse:
warehouse = frappe.get_all('Warehouse', filters={'warehouse_name': item.default_warehouse}, limit=1)
if warehouse:
item.default_warehouse = warehouse[0].name
item.insert()
def setup_product_bundle():

View File

@ -41,9 +41,9 @@ def complete_setup(domain='Manufacturing'):
setup_complete({
"first_name": "Test",
"last_name": "User",
"email": "test_demo@erpnext.com",
"email": "demo@erpnext.com",
"company_tagline": 'Awesome Products and Services',
"password": "test",
"password": "demo",
"fy_start_date": "2015-01-01",
"fy_end_date": "2015-12-31",
"bank_account": "National Bank",

View File

@ -88,6 +88,7 @@ def submit_draft_stock_entries():
DuplicateEntryForProductionOrderError, OperationsNotCompleteError
# try posting older drafts (if exists)
frappe.db.commit()
for st in frappe.db.get_values("Stock Entry", {"docstatus":0}, "name"):
try:
ste = frappe.get_doc("Stock Entry", st[0])

View File

@ -8,7 +8,7 @@ from frappe.utils import flt, cint, nowdate
from frappe import throw, _
import frappe.defaults
from frappe.utils import getdate
from erpnext.controllers.buying_controller import BuyingController
from erpnext.accounts.utils import get_account_currency
from frappe.desk.notifications import clear_doctype_notifications
@ -59,7 +59,7 @@ class PurchaseReceipt(BuyingController):
pc_obj = frappe.get_doc('Purchase Common')
self.check_for_closed_status(pc_obj)
if self.posting_date > nowdate():
if getdate(self.posting_date) > getdate(nowdate()):
throw(_("Posting Date cannot be future date"))