c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #30473
[Bug 722472] Re: error in loading test file using --test-file argument
This bug will affect until these lines of code remain in the 'openerp-
server' file.
if config["test_file"]:
logger.info('loading test file %s', config["test_file"])
openerp.tools.convert_yaml_import(cr, 'base', file(config["test_file"]), {}, 'test', True)
cr.rollback()
The 'convert_yaml_import' function accepts 'module' argument. For now it
always is 'base'. I suggest to extend command with 'test-module' option.
--
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/722472
Title:
error in loading test file using --test-file argument
Status in OpenERP Server:
Fix Released
Bug description:
when I am trying to load a test case file using --test-file argument
into a database it is giving the error regarding the model.
for example i am trying following.
./openerp-server.py --addons-path=../../addons/ --test-
file=../../addons/account/test/account_customer_invoice.yml -d
new_trunk_database
which leads me to error like..
Traceback (most recent call last):
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 729, in process
self._process_node(node)
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 744, in _process_node
self.process_python(node)
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 414, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File "../../addons/account/test/account_customer_invoice.yml", line 1, in <module>
-
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 178, in get_id
_, id = self.pool.get('ir.model.data').get_object_reference(self.cr, self.uid, module, checked_xml_id)
File "/home/erp/workspace_6/server/bin/tools/misc.py", line 823, in cached_result
result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
File "/home/erp/workspace_6/server/bin/addons/base/ir/ir_model.py", line 609, in get_object_reference
data_id = self._get_id(cr, uid, module, xml_id)
File "/home/erp/workspace_6/server/bin/tools/misc.py", line 823, in cached_result
result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
File "/home/erp/workspace_6/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base.account_invoice_customer0
Traceback (most recent call last):
File "./openerp-server.py", line 126, in <module>
tools.convert_yaml_import(cr, 'base', file(tools.config["test_file"]), {}, 'test', True)
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 794, in yaml_import
yaml_interpreter.process(yaml_string)
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 729, in process
self._process_node(node)
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 744, in _process_node
self.process_python(node)
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 414, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File "../../addons/account/test/account_customer_invoice.yml", line 1, in <module>
-
File "/home/erp/workspace_6/server/bin/tools/yaml_import.py", line 178, in get_id
_, id = self.pool.get('ir.model.data').get_object_reference(self.cr, self.uid, module, checked_xml_id)
File "/home/erp/workspace_6/server/bin/tools/misc.py", line 823, in cached_result
result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
File "/home/erp/workspace_6/server/bin/addons/base/ir/ir_model.py", line 609, in get_object_reference
data_id = self._get_id(cr, uid, module, xml_id)
File "/home/erp/workspace_6/server/bin/tools/misc.py", line 823, in cached_result
result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
File "/home/erp/workspace_6/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base.account_invoice_customer0
Regards,
Parthiv
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/722472/+subscriptions
References