← Back to team overview

openerp-india team mailing list archive

[Bug 1103937] [NEW] Workflow crashes on unsaved subviews

 

Public bug reported:

In order to reproduce:

Create 2 models linked using a one2many. Make it so that you can add
child objects from the parent.

Associate a workflow with the child model

Go into your view

Open a parent object

Create a child object

Save the child object (but not the parent)

Re-open the child object

Try to transition from one workflow state to another

Backtrace:

2013-01-24 10:38:57,512 7423 ERROR None openerp.sql_db: bad query: select id from wkf_instance where res_id='one2many_v_id_960' and res_type='openacademy.session' and state='active'
Traceback (most recent call last):
  File "/home/openerp/server/7/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "one2many_v_id_960"
LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...
                                                 ^

2013-01-24 10:38:57,513 7423 ERROR None openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/home/openerp/server/7/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/server/7/openerp/osv/osv.py", line 202, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, signal, *args)
  File "/home/openerp/server/7/openerp/osv/osv.py", line 195, in exec_workflow_cr
    return object._workflow_signal(cr, uid, [res_id], signal)[res_id]
  File "/home/openerp/server/7/openerp/osv/orm.py", line 3928, in _workflow_signal
    result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr)
  File "/home/openerp/server/7/openerp/workflow/wkf_service.py", line 117, in trg_validate
    cr.execute('select id from wkf_instance where res_id=%s and res_type=%s and state=%s', (res_id, res_type, 'active'))
  File "/home/openerp/server/7/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/home/openerp/server/7/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "one2many_v_id_960"
LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...
                                                 ^

2013-01-24 10:38:57,514 7423 ERROR None openerp.netsvc: invalid input syntax for integer: "one2many_v_id_960"
LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...
                                                 ^
Traceback (most recent call last):
  File "/home/openerp/server/7/openerp/netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openerp/server/7/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/server/7/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/server/7/openerp/osv/osv.py", line 202, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, signal, *args)
  File "/home/openerp/server/7/openerp/osv/osv.py", line 195, in exec_workflow_cr
    return object._workflow_signal(cr, uid, [res_id], signal)[res_id]
  File "/home/openerp/server/7/openerp/osv/orm.py", line 3928, in _workflow_signal
    result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr)
  File "/home/openerp/server/7/openerp/workflow/wkf_service.py", line 117, in trg_validate
    cr.execute('select id from wkf_instance where res_id=%s and res_type=%s and state=%s', (res_id, res_type, 'active'))
  File "/home/openerp/server/7/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/home/openerp/server/7/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "one2many_v_id_960"
LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1103937

Title:
  Workflow crashes on unsaved subviews

Status in OpenERP Server:
  New

Bug description:
  In order to reproduce:

  Create 2 models linked using a one2many. Make it so that you can add
  child objects from the parent.

  Associate a workflow with the child model

  Go into your view

  Open a parent object

  Create a child object

  Save the child object (but not the parent)

  Re-open the child object

  Try to transition from one workflow state to another

  Backtrace:

  2013-01-24 10:38:57,512 7423 ERROR None openerp.sql_db: bad query: select id from wkf_instance where res_id='one2many_v_id_960' and res_type='openacademy.session' and state='active'
  Traceback (most recent call last):
    File "/home/openerp/server/7/openerp/sql_db.py", line 227, in execute
      res = self._obj.execute(query, params)
  DataError: invalid input syntax for integer: "one2many_v_id_960"
  LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...
                                                   ^

  2013-01-24 10:38:57,513 7423 ERROR None openerp.osv.osv: Uncaught exception
  Traceback (most recent call last):
    File "/home/openerp/server/7/openerp/osv/osv.py", line 123, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/openerp/server/7/openerp/osv/osv.py", line 202, in exec_workflow
      res = self.exec_workflow_cr(cr, uid, obj, signal, *args)
    File "/home/openerp/server/7/openerp/osv/osv.py", line 195, in exec_workflow_cr
      return object._workflow_signal(cr, uid, [res_id], signal)[res_id]
    File "/home/openerp/server/7/openerp/osv/orm.py", line 3928, in _workflow_signal
      result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr)
    File "/home/openerp/server/7/openerp/workflow/wkf_service.py", line 117, in trg_validate
      cr.execute('select id from wkf_instance where res_id=%s and res_type=%s and state=%s', (res_id, res_type, 'active'))
    File "/home/openerp/server/7/openerp/sql_db.py", line 162, in wrapper
      return f(self, *args, **kwargs)
    File "/home/openerp/server/7/openerp/sql_db.py", line 227, in execute
      res = self._obj.execute(query, params)
  DataError: invalid input syntax for integer: "one2many_v_id_960"
  LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...
                                                   ^

  2013-01-24 10:38:57,514 7423 ERROR None openerp.netsvc: invalid input syntax for integer: "one2many_v_id_960"
  LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...
                                                   ^
  Traceback (most recent call last):
    File "/home/openerp/server/7/openerp/netsvc.py", line 289, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/openerp/server/7/openerp/service/web_services.py", line 614, in dispatch
      res = fn(db, uid, *params)
    File "/home/openerp/server/7/openerp/osv/osv.py", line 123, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/openerp/server/7/openerp/osv/osv.py", line 202, in exec_workflow
      res = self.exec_workflow_cr(cr, uid, obj, signal, *args)
    File "/home/openerp/server/7/openerp/osv/osv.py", line 195, in exec_workflow_cr
      return object._workflow_signal(cr, uid, [res_id], signal)[res_id]
    File "/home/openerp/server/7/openerp/osv/orm.py", line 3928, in _workflow_signal
      result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr)
    File "/home/openerp/server/7/openerp/workflow/wkf_service.py", line 117, in trg_validate
      cr.execute('select id from wkf_instance where res_id=%s and res_type=%s and state=%s', (res_id, res_type, 'active'))
    File "/home/openerp/server/7/openerp/sql_db.py", line 162, in wrapper
      return f(self, *args, **kwargs)
    File "/home/openerp/server/7/openerp/sql_db.py", line 227, in execute
      res = self._obj.execute(query, params)
  DataError: invalid input syntax for integer: "one2many_v_id_960"
  LINE 1: select id from wkf_instance where res_id='one2many_v_id_960'...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1103937/+subscriptions


Follow ups

References