Merge lp:~camptocamp/hr-timesheet/full-fill-timesheet-account-type-vre into lp:~hr-core-editors/hr-timesheet/7.0

Proposed by Vincent Renaville@camptocamp
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: 59
Merged at revision: 60
Proposed branch: lp:~camptocamp/hr-timesheet/full-fill-timesheet-account-type-vre
Merge into: lp:~hr-core-editors/hr-timesheet/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
hr_timesheet_fulfill/wizard/timesheet_fulfill.py (+1/-1)
To merge this branch: bzr merge lp:~camptocamp/hr-timesheet/full-fill-timesheet-account-type-vre
Reviewer Review Type Date Requested Status
Stéphane Bidoul (Acsone) (community) code review Approve
Yannick Vaucher @ Camptocamp code review, no tests Approve
Pedro Manuel Baeza code review Approve
Joël Grand-Guillaume @ camptocamp code review, no tests Pending
Review via email: mp+196123@code.launchpad.net

This proposal supersedes a proposal from 2013-11-07.

Description of the change

change type from normal to contract to match project linked analytic account instead of standard analytic account

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : Posted in a previous version of this proposal

Hi,

Thanks for the contribs, I see a conflict here, can you check please ?

Regards,

review: Needs Fixing (code review, no tests)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote : Posted in a previous version of this proposal

You might want to resubmit with only rev 58

rev 49 to 57 are certainly not meant to be in this MP

review: Needs Resubmitting
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

It was proposed on the 6.1 instead of 7.0, sorry for that.

Vincent

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Vincent,

Thanks for the MP.

I wonder if this domain can be removed to allow any type of analytical accounts to be selected, because some users can use a custom analytic tree (by departments, for example) that doesn't match project concept.

Regards.

review: Needs Information
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello Pedro,

Thanks for your review,

I have missed this point of view, I can add the normal type of account in domain.
but I need this domain to prevent the user to select an account of type view

so the domain will be

('type', 'in', ['contract','normal'])

What do you think about that ?

Vincent

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Why don't you make

('type', '<>', 'view')?

Regards.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

As Pedro suggested, ('type', '<>', 'view') would be more generic and seems to fits the requirements you described.

review: Needs Fixing (code review, no tests)
59. By Vincent Renaville@camptocamp

[FIX] change type test to be more generic

Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

Sorry for the delay .... and thanks for the review !

I agree with Pedro, so I change the type test.

Vincent

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks!

review: Approve (code review)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Thanks for the change!

review: Approve (code review, no tests)
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

!= instead of <> to be consistent with the following lines?

Otherwise LGTM.

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet_fulfill/wizard/timesheet_fulfill.py'
2--- hr_timesheet_fulfill/wizard/timesheet_fulfill.py 2013-05-02 13:51:52 +0000
3+++ hr_timesheet_fulfill/wizard/timesheet_fulfill.py 2014-01-10 15:19:31 +0000
4@@ -43,7 +43,7 @@
5 'nb_hours': fields.float('Hours per Day', digits=(2, 2), required=True),
6 'analytic_account_id': fields.many2one('account.analytic.account',
7 'Analytic Account', required=True,
8- domain="[('type', '=', 'normal'),"
9+ domain="[('type', '<>', 'view'),"
10 "('state', '!=', 'pending'),"
11 "('state', '!=', 'close')]"),
12 'task_id':fields.many2one('project.task', 'Task', required=False)

Subscribers

People subscribed via source and target branches