'bench run-tests' to make local instance like demo.erpnext.com?

To followup, the Wind Power LLC demo code seems to work on this version

frappe@ubuntu:~/frappe-bench$ bench version
erpnext 10.1.38
frappe 10.1.36

with these two code changes:

  1. To prevent this frappe.exceptions.ValidationError: Row #1: Asset Chair 1 is already Fully Depreciated

Apply this change so those assets have instead status ‘Submitted’ (note that this hack may well violate asset depreciation - you have been warned :slight_smile:

status = "Submitted"
                    if self.journal_entry_for_scrap:
                            status = "Scrapped"
                    elif flt(self.value_after_depreciation) < flt(self.expected_value_after_useful_life):
                            status = "Fully Depreciated"
                    elif flt(self.value_after_depreciation):
                            if flt(self.value_after_depreciation) < flt(self.gross_purchase_amount):
                                    status = 'Partially Depreciated'
  1. Change this exception to a notice instead

https://github.com/frappe/erpnext/blob/develop/erpnext/hr/doctype/payroll_entry/payroll_entry.py#L466

def create_log(ss_list):
    if not ss_list:
            frappe.msgprint("There's no employee for the given criteria. Check that Salary Slips have not already been created.")
    return ss_list

You then run a ‘simulate’ cycle with this:

frappe@ubuntu:~/frappe-bench$ bench --site site1.local execute erpnext.demo.demo.simulate

whereupon this is displayed for eg
Simulating 2018-04-16: Day 6

and this exception below occurs, to end that simulate cycle. To continue, rerun the ‘simulate’ that will advance the simulation date:

File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 457, in validate_schedule_date
frappe.throw(_(“Row #{0}: Reqd by Date cannot be before Transaction Date”).format(d.idx))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.ValidationError: Row #1: Reqd by Date cannot be before Transaction Date

For a taste of the dataset here are some screenshots