openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16000
[Bug 1055469] Re: Modify the spend time of work task and then can not save the task!
*** This bug is a duplicate of bug 953006 ***
https://bugs.launchpad.net/bugs/953006
** This bug has been marked a duplicate of bug 953006
project_timesheet: impossible to edit a task work
--
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/1055469
Title:
Modify the spend time of work task and then can not save the task!
Status in OpenERP Addons (modules):
New
Bug description:
I create a task then add a work task and save the task.
Then I modify the spend time of work task, when save the task:
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 think you should modify like this, for 'journal_id' is not exist in the vals_line.
# Compute based on pricetype
amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, line_id.id,
prod_id=prod_id, company_id=False,
- unit_amount=vals_line['unit_amount'], unit=False, journal_id=vals_line['journal_id'], context=context)
-->
# Compute based on pricetype
amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, line_id.id,
prod_id=prod_id, company_id=False,
+ unit_amount=vals_line['unit_amount'], unit=False, journal_id=vals_line.get('journal_id', False), context=context)
The problem exists in openerp-6.1-20120910-233309
Best regards !
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1055469/+subscriptions
References