← Back to team overview

openerp-india team mailing list archive

[Bug 1300795] [NEW] Error raised when modifying a timesheet line

 

Public bug reported:

Hello,

in OpenERP v6.1 (rev 7315) there is a bug when we try to modify a task work:
File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/addons/project_timesheet/project_timesheet.py", line 222, in write
    return super(task,self).write(cr, uid, ids, vals, context)
  File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/addons/project/project.py", line 1051, in write
    result = super(task,self).write(cr, uid, ids, vals, context=context)
  File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/osv/orm.py", line 3963, in write
    result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
  File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/osv/fields.py", line 575, in set
    obj.write(cr, user, [act[1]], act[2], context=context)
  File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/addons/project_timesheet/project_timesheet.py", line 163, in write
    unit_amount=vals_line['unit_amount'], unit=False, journal_id=vals_line['journal_id'], context=context)
KeyError: 'journal_id'

I tested it on the runbot, here are the steps:
1/ Pick any task from the Project / Tasks menu and start it.
2/ Create a task work (timesheet) and put any information you want.
3/ Save.
4/ Modify for instance the time spent on the task work and try to save.

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

** Branch linked: lp:~taktik/openobject-addons/6.1-taktik-fix-project-
timesheet-write

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

Title:
  Error raised when modifying a timesheet line

Status in OpenERP Addons (modules):
  New

Bug description:
  Hello,

  in OpenERP v6.1 (rev 7315) there is a bug when we try to modify a task work:
  File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/addons/project_timesheet/project_timesheet.py", line 222, in write
      return super(task,self).write(cr, uid, ids, vals, context)
    File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/addons/project/project.py", line 1051, in write
      result = super(task,self).write(cr, uid, ids, vals, context=context)
    File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/osv/orm.py", line 3963, in write
      result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
    File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/osv/fields.py", line 575, in set
      obj.write(cr, user, [act[1]], act[2], context=context)
    File "/home/odoo/runbot/static/openerp-dev-6-1-31250/server/openerp/addons/project_timesheet/project_timesheet.py", line 163, in write
      unit_amount=vals_line['unit_amount'], unit=False, journal_id=vals_line['journal_id'], context=context)
  KeyError: 'journal_id'

  I tested it on the runbot, here are the steps:
  1/ Pick any task from the Project / Tasks menu and start it.
  2/ Create a task work (timesheet) and put any information you want.
  3/ Save.
  4/ Modify for instance the time spent on the task work and try to save.

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


Follow ups

References