← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 779474] Re: [6.1 trunk]:[account_voucher]: loading test/account_voucher.yml fails

 

owner of your openerp database is postgres?
please comment the line with your database owner in .pgpass and try to 
backup database from openerp.
your openerp server will ask for password.
if you supply password you will see if file is created with data or zero 
lenght.
if file has zero length, password is incorrect or the user does not have 
sufficient privileges.
thanks

On 27.05.2011 18:16, Bogdan Stanciu wrote:
> Thank you filsys,
>
> that makes sense, but by some mechanism I already have .pgpass in my ~
>
> it goes like this:
> localhost:5432:*:postgres:********(my pwd)
> postgres IS the the right user...
>
> so it seems that is not this.
>
> any other idea?
> b
>
> On 27. 05. 11 16:27, filsys wrote:
>> I don't know if this is the case, but, if you don't supply correct
>> password for postgres user (owner of database or superuser), then
>> pg_dump create a zero lenght file.
>> If this is the case, then create .pgpass file in your user home folder
>> where put
>> host:port:database:user:password
>>
>> 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/779474

Title:
  [6.1 trunk]:[account_voucher]: loading test/account_voucher.yml fails

Status in OpenERP Modules (addons):
  Invalid

Bug description:
  hi there,

  while installing a NEW db with latest revs, i get this traceback:

  [2011-05-08 14:41:57,437][bs_test_minimal] INFO:init:module account_voucher: loading test/account_voucher.yml
  [2011-05-08 14:41:57,665][bs_test_minimal] ERROR:db.cursor:bad query: insert into "account_move" (id,"name","company_id","journal_id","state","period_id","narration","date","ref","to_check",create_uid,create_date) values (8,E'BNK/2011/001',E'1',5,E'draft',6,E'Basic Pc',NULL,E'none',E'False',1,now())
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/sql_db.py", line 131, in execute
      res = self._obj.execute(query, params)
  IntegrityError: null value in column "date" violates not-null constraint

  [2011-05-08 14:41:57,666][bs_test_minimal] ERROR:tests.account_voucher:null value in column "date" violates not-null constraint
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 729, in process
      self._process_node(node)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 763, in _process_node
      self.process_workflow({node: []})
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 452, in process_workflow
      wf_service.trg_validate(uid, workflow.model, id, workflow.action, self.cr)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/wkf_service.py", line 80, in trg_validate
      res2 = instance.validate(cr, id, ident, signal)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/instance.py", line 48, in validate
      workitem.process(cr, witem, ident, signal, force_running, stack=stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 61, in process
      ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 174, in _split_test
      _join_test(cr, t[0], t[1], ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 182, in _join_test
      create(cr,[activity], inst_id, ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 41, in create
      process(cr, res, ident, stack=stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 53, in process
      result = _execute(cr, workitem, activity, ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 107, in _execute
      wkf_expr.execute(cr, ident, workitem, activity)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/wkf_expr.py", line 68, in execute
      return _eval_expr(cr, ident, workitem, activity['action'])
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/wkf_expr.py", line 58, in _eval_expr
      ret = eval(line, env, nocopy=True)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/safe_eval.py", line 284, in safe_eval
      return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/osv/orm.py", line 181, in <lambda>
      return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
    File "/home/openerp/addons/account_voucher/account_voucher.py", line 569, in proforma_voucher
      self.action_move_line_create(cr, uid, ids, context=context)
    File "/home/openerp/addons/account_voucher/account_voucher.py", line 669, in action_move_line_create
      move_id = move_pool.create(cr, uid, move)
    File "/home/openerp/addons/account/account.py", line 1288, in create
      result = super(account_move, self).create(cr, uid, vals, context)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/osv/orm.py", line 3652, in create
      cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/sql_db.py", line 78, in wrapper
      return f(self, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/sql_db.py", line 131, in execute
      res = self._obj.execute(query, params)
  IntegrityError: null value in column "date" violates not-null constraint

  [2011-05-08 14:41:57,735][bs_test_minimal] ERROR:test:Tests failed to execute in module account_voucher
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/addons/__init__.py", line 680, in load_test
      _load_data(cr, module_name, id_map, mode, 'test')
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/addons/__init__.py", line 703, in _load_data
      tools.convert_yaml_import(cr, module_name, file, id_map, mode, noupdate)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 794, in yaml_import
      yaml_interpreter.process(yaml_string)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 729, in process
      self._process_node(node)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 763, in _process_node
      self.process_workflow({node: []})
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/yaml_import.py", line 452, in process_workflow
      wf_service.trg_validate(uid, workflow.model, id, workflow.action, self.cr)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/wkf_service.py", line 80, in trg_validate
      res2 = instance.validate(cr, id, ident, signal)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/instance.py", line 48, in validate
      workitem.process(cr, witem, ident, signal, force_running, stack=stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 61, in process
      ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 174, in _split_test
      _join_test(cr, t[0], t[1], ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 182, in _join_test
      create(cr,[activity], inst_id, ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 41, in create
      process(cr, res, ident, stack=stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 53, in process
      result = _execute(cr, workitem, activity, ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/workitem.py", line 107, in _execute
      wkf_expr.execute(cr, ident, workitem, activity)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/wkf_expr.py", line 68, in execute
      return _eval_expr(cr, ident, workitem, activity['action'])
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/workflow/wkf_expr.py", line 58, in _eval_expr
      ret = eval(line, env, nocopy=True)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/tools/safe_eval.py", line 284, in safe_eval
      return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/osv/orm.py", line 181, in <lambda>
      return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
    File "/home/openerp/addons/account_voucher/account_voucher.py", line 569, in proforma_voucher
      self.action_move_line_create(cr, uid, ids, context=context)
    File "/home/openerp/addons/account_voucher/account_voucher.py", line 669, in action_move_line_create
      move_id = move_pool.create(cr, uid, move)
    File "/home/openerp/addons/account/account.py", line 1288, in create
      result = super(account_move, self).create(cr, uid, vals, context)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/osv/orm.py", line 3652, in create
      cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/sql_db.py", line 78, in wrapper
      return f(self, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/sql_db.py", line 131, in execute
      res = self._obj.execute(query, params)
  IntegrityError: null value in column "date" violates not-null constraint

  [2011-05-08 14:41:57,919][bs_test_minimal] INFO:i18n:module
  account_voucher: loading translation file (fr) for language fr_FR

  
  thank you!


Follow ups

References