← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 700673] Re: [6.0 rc2] setup warning test in module mrp_repair: test/test_mrp_repair.yml failed

 

Hello Bogdan,

I have checked the issue again with latest code (Addons : 4216).But, I am not able to meet the problem.
Would you please update the code and check again.

Thanks.

-- 
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/700673

Title:
  [6.0 rc2] setup warning test in module mrp_repair: test/test_mrp_repair.yml failed

Status in OpenObject Addons Modules:
  Incomplete

Bug description:
  during the setup of a new db, the test module mrp_repair: loading test/test_mrp_repair.yml fails:

INFO:init:module mrp_repair: loading test/test_mrp_repair.yml
ERROR:tests.mrp_repair:string indices must be integers, not str
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 729, in process
    self._process_node(node)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 742, in _process_node
    self.process_record(node)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 322, in process_record
    self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/ir/ir_model.py", line 539, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 3646, in create
    self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 3755, in _store_set_values
    result = self._columns[f].get(cr, self, ids, f, 1, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/fields.py", line 785, in get
    res = self._fnct(obj, cr, user, ids, name, self._arg, context)
  File "/home/openerp/addons/mrp_repair/mrp_repair.py", line 73, in _amount_tax
    val += c['amount']
TypeError: string indices must be integers, not str

ERROR:test:Tests failed to execute in module mrp_repair
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/__init__.py", line 672, in load_test
    _load_data(cr, module_name, id_map, mode, 'test')
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/__init__.py", line 695, in _load_data
    tools.convert_yaml_import(cr, module_name, file, id_map, mode, noupdate)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 794, in yaml_import
    yaml_interpreter.process(yaml_string)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 729, in process
    self._process_node(node)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 742, in _process_node
    self.process_record(node)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/yaml_import.py", line 322, in process_record
    self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/ir/ir_model.py", line 539, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 3646, in create
    self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 3755, in _store_set_values
    result = self._columns[f].get(cr, self, ids, f, 1, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/fields.py", line 785, in get
    res = self._fnct(obj, cr, user, ids, name, self._arg, context)
  File "/home/openerp/addons/mrp_repair/mrp_repair.py", line 73, in _amount_tax
    val += c['amount']
TypeError: string indices must be integers, not str





Follow ups

References