diff --git a/erpnext/demo/setup/setup_data.py b/erpnext/demo/setup/setup_data.py index f25bbc337a..278c398c2a 100644 --- a/erpnext/demo/setup/setup_data.py +++ b/erpnext/demo/setup/setup_data.py @@ -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", diff --git a/erpnext/demo/user/stock.py b/erpnext/demo/user/stock.py index ac380f2e47..ea23853fea 100644 --- a/erpnext/demo/user/stock.py +++ b/erpnext/demo/user/stock.py @@ -85,9 +85,10 @@ def make_stock_reconciliation(): def submit_draft_stock_entries(): from erpnext.stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, \ - DuplicateEntryForProductionOrderError, OperationsNotCompleteError + 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]) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 6d6ae9719a..86fb88b9c7 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -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"))