← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 672655] [NEW] [6.0][HIGH] Regression scheduling the cost of employee project work to analytic account

 

Public bug reported:

Hi,

I'm testing to add project works for an employee, from project_task_work
view or timesheet view. It always creates new account.analytic.line but,
these lines always have set amount to 0.0, but my employee product is
set to 30€. I took a look to source and I see many regressions from
"3817 revid:vir@xxxxxxxxxxx-20101020045040-j4y2zre12tos1e9x" revision in
on_change_unit_amount() event.

If company_id exists, it always returns amount = 0.0, another bug is
that, it computes amount with "amount = amount_unit*unit or 1.0" but
from project_timesheet module unit = False, then, if it hasn't
company_id it always returns 1.0. The correct will be  "amount =
amount_unit*quantity". Another bug is in project_timesheet module
because when this module calls to on_change_unit_amount() it doesn't
pass journal_id and if journal_id = False this method returns {}.

I attach a patch

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


** Tags: pexego

-- 
[6.0][HIGH] Regression scheduling the cost of employee project work to analytic account
https://bugs.launchpad.net/bugs/672655
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: New

Bug description:
Hi,

I'm testing to add project works for an employee, from project_task_work view or timesheet view. It always creates new account.analytic.line but, these lines always have set amount to 0.0, but my employee product is set to 30€. I took a look to source and I see many regressions from "3817 revid:vir@xxxxxxxxxxx-20101020045040-j4y2zre12tos1e9x" revision in on_change_unit_amount() event.

If company_id exists, it always returns amount = 0.0, another bug is that, it computes amount with "amount = amount_unit*unit or 1.0" but from project_timesheet module unit = False, then, if it hasn't company_id it always returns 1.0. The correct will be  "amount = amount_unit*quantity". Another bug is in project_timesheet module because when this module calls to on_change_unit_amount() it doesn't pass journal_id and if journal_id = False this method returns {}.

I attach a patch





Follow ups

References