← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 707870] Re: v6 ImportError: cannot import name test_reports

 

I believe I have find the problem.
yesterday I found on google a mailing-list which said to add "" for the command lines in files.yml to interpret the command (I remember not if it's just for windows, and I didn't retrieve the mail :(  )
I  tested with product/test/product_report.yml :
"from tools import test_reports"
"test_reports.try_report_action(cr, uid, 'action_product_price_list',wiz_data=data_dict, context=ctx, our_module='product')"
and no error in the log.
I have again the same error for test/hr_timesheet_invoice_report.yml
test/hr_timesheet_invoice_report.yml
I will try for this latest and for importerrot time also.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/707870

Title:
  v6 ImportError: cannot import name test_reports

Status in OpenERP Server:
  New

Bug description:
  hi,
  windows vista 
  v6
  server rev : 3320
  addons rev : 4354

  when I create a database using configurator, checking all applications, in server's log I have this error :
  ImportError: cannot import name test_reports

  [2011-01-26 09:43:02,822][admin] INFO:init:module product: loading product_demo.xml
  [2011-01-26 09:43:13,479][admin] INFO:init:module product: loading test/product_report.yml
  [2011-01-26 09:43:13,509][admin] ERROR:tests.product:cannot import name test_reports
  Traceback (most recent call last):
    File "tools\yaml_import.pyo", line 729, in process
    File "tools\yaml_import.pyo", line 744, in _process_node
    File "tools\yaml_import.pyo", line 414, in process_python
    File "C:\Program Files\OpenERP 6.0\Server\addons\product\test\product_report.yml", line 9, in <module>
  ImportError: cannot import name test_reports
  [2011-01-26 09:43:13,509][admin] ERROR:test:Tests failed to execute in module product
  Traceback (most recent call last):
    File "addons\__init__.pyo", line 670, in load_test
    File "addons\__init__.pyo", line 693, in _load_data
    File "tools\yaml_import.pyo", line 794, in yaml_import
    File "tools\yaml_import.pyo", line 729, in process
    File "tools\yaml_import.pyo", line 744, in _process_node
    File "tools\yaml_import.pyo", line 414, in process_python
    File "C:\Program Files\OpenERP 6.0\Server\addons\product\test\product_report.yml", line 9, in <module>
  ImportError: cannot import name test_reports

  if I had in server/bin/tools/safe_eval/__init__.py 
  import test_reports
  the error disappear

  bye





References