With regard to this test error:
(env) frappe@ubuntu:~/frappe-bench$ bench run-tests --doctype ‘Journal Entry’
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
“main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 406, in run_tests
ui_tests = ui_tests, doctype_list_path = doctype_list_path, failfast=failfast)
File “/home/frappe/frappe-bench/apps/frappe/frappe/test_runner.py”, line 66, in main
ret = run_tests_for_doctype(doctype, verbose, tests, force, profile)
File “/home/frappe/frappe-bench/apps/frappe/frappe/test_runner.py”, line 144, in run_tests_for_doctype
make_test_records(doctype, verbose=verbose, force=force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/test_runner.py”, line 258, in make_test_records
make_test_records_for_doctype(options, verbose, force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/test_runner.py”, line 306, in make_test_records_for_doctype
frappe.local.test_objects[doctype] += make_test_objects(doctype, test_module.test_records, verbose, force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/test_runner.py”, line 357, in make_test_objects
d.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 222, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 877, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 773, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1049, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1032, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 767, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py”, line 63, in validate
self.set_job_card_data()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py”, line 114, in set_job_card_data
if self.job_card and not self.work_order:
AttributeError: ‘StockEntry’ object has no attribute ‘job_card’
This Job Card model spec suggests tabJob Card should exist in the database, but there is no such table to be found!?
My question is must the tabJob Card be explicitly created and executed in SQL?