← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 794634] Re: [6.0] Clicking on "my timesheet" always creates a duplicate timesheet for period

 

Hello Stephane,

I have checked your issue But I think the current behavior is right and
no need to improve it.

Currently we can not allow to override the time-sheet so you can faced
the constraint error "error: Error occurred while validating the
field(s) date_from,date_to: You can not have 2 timesheets that overlaps
!" which is the behavior.

When you open the "My Timesheet" menu it will open the current time
sheet and when you create a new time-sheet then you must change the
period of the time-sheet. When you create new time-sheet it is in "new"
state and when you save the time-sheet it will goes in to "Draft" state
ans you will see the "Confirm " button which is proper.

When you open the "My Timesheet" menu it will open the current time
sheet so first it will search the "Draft" state's time-sheet which is in
current period that's why no need to remove the (state','=','draft').

For your comment#2 when you open the "My timesheet "menu first it search
the current period 's timesheet  which is in "Draft" state and if it is
not found then it will create a new time-sheet which is in "new" state
and when you save the timesheet it goes in to the "Draft" state and you
can see the "Confirm" button.

So this is the current flow not a bug.

That's why I am closing this bug hope my specification help for you.

Thanks

** Changed in: openobject-addons
       Status: New => Invalid

** Converted to question:
   https://answers.launchpad.net/openobject-addons/+question/160829

-- 
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/794634

Title:
  [6.0] Clicking on "my timesheet" always creates a duplicate timesheet
  for period

Status in OpenERP Modules (addons):
  Invalid

Bug description:
  Hi,

  When clicking on My Timesheet menu entry, a new timesheet is created,
  even if a timesheet already exists for the current week.

  How to reproduce:
  - openerp 6.0 series with demo data
  - login with fbs/fbs
  - go to Human Resources / Time Tracking / My Timesheet
  - save the new timesheet
  - go to Human Resources / Time Tracking / My Timesheet agin
  - save the timesheet
  - error: Error occurred while validating the field(s) date_from,date_to: You can not have 2 timesheets that overlaps !
  Please use the menu 'My Current Timesheet' to avoid this problem.

  IMO, this is due to a fact that the query for existing timesheet
  filters on (state='draft'). This filter on state should be removed.

  Proposed patch attached.

  Best regards,

  -sbi

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


References