Commit Graph
193 Commits
Author SHA1 Message Date
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Xavier BOL (xbo) 2ca28bca34 [FIX] project_timesheet_holidays: take all leaves in given interval
Before this commit, we search the leaves in the same interval of the
public leaves.

This commit searches all leaves containing the public leave in their
interval to get all leaves and not create a timesheet for this public
leave for an employee is already off.

task-2665899

closes #79034

X-original-commit: ca6c164075d83e6bace2451888f8a2365b769e1a
Part-of: odoo/odoo#79291
2021-11-02 16:59:56 +00:00
Philippe Wauthy e09667b60f [FIX] project_timesheet_holidays: fix traceback when approving a time off with several employees
Description of the issue/feature this PR addresses:
A traceback appears when a time off is at the second approval stage and approved with several employees assigned to the time off.
https://www.awesomescreenshot.com/video/5408638

Current behavior before PR:
When validating a time off that is in the second approval stage with several employees assigned to, a traceback appears

Desired behavior after PR is merged:
No traceback appears when validating a time off that is in the second approval stage with several employees assigned to

task-2657656

closes odoo/odoo#77625

X-original-commit: aaa7c5bf10089eb8953f46cccb2e93aa3a20fa35
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-01 15:26:59 +00:00
Philippe Wauthy 6367ff2b33 [FIX] hr_holidays: Improve general UX (Back2basics)
General fixes for usability

- Time off type configuration visual : https://tinyurl.com/yj2z6okp
- When you create an allocation, the end date should have a place holder "no limit". If there is no end date recorded, that value should be displayed on loading.
- In Overview, remove filter "people i manage"
- In Approvals / time off : change filters : https://i.imgur.com/uDNjZv8.png
- In Approvals / approvals : change filters like in point 5 (remove people I manage replace with my team)
- In Reporting / By Employee : filters : https://tinyurl.com/yg3u3rkf
- In Reporting / By Type : filters : https://tinyurl.com/yhbpgz5m
- Remove Allocations smartbutton from Employee App
- When you click on TimeOff Smartbutton from Employee App, you should be redirect to this screen : https://tinyurl.com/ygwxzx5b
- When an allocation is created, the validity is added to the name of the allocation like "Allocation X (validity Date --> Date) and hide the validity field in "My allocations".
- Users will have the information of the validity from the name of the allocation

task-2643692

closes odoo/odoo#77376

X-original-commit: 7f92c830d3607167bd76bc43d992fbf720a3ef29
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-29 08:33:26 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Nidhi Patel dbe22a3c06 [IMP] {hr,sale}_timesheet: improve setting in the timesheet module
The purpose of this task is to improve the setting of the timesheet module.

In this commit, we improve the following:
 - Rename the label, description and align the field with the name and
   description of the feature
 - Add an 'OK' button in the 'download our app' modal
 - Render the frequency field properly in the employee/manager reminders
   setting on mobile view
 - In configure your services link: change the name of the action to "Services"
 - Display the following options in the community, with the usual 'Enterprise'
   tag:  Round Timesheet, Employee/Manager reminder, Invoicing Policy

closes odoo/odoo#74967

Task-id: 2531338
Related: odoo/enterprise#20182
Related: odoo/upgrade#2771
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-03 15:45:14 +00:00
254d6a71e8 [IMP] hr_holidays: Improve Accruals, dashboards and general UX (Back2basics)
Purpose
=======

Time Off : New Dashboard, Accruals feature, Public holidays, New time off type configuration view.

- Review of Dashboard
- Accrual feature : Currently, when you create an allocation, it's possible to create an
  Accrual, but there is no appraisal Plan. An Appraisal plan is use to define steps of accruals
  for each employee.
  In Belgium, we use accrual Allocation for European Leaves, or compensatory hours, it's a
  simple use case.  But in USA, it's possible to change the calculation mode each year.
  Also, in USA, it's possible to deal your accrual plan when you arrive on the company. It's a
  HR Officer task to create the right Accrual allocation for each new employee.
- Public Holidays :
  Improvement of global time off feature located on Working hours calendar. Now, Time off
  application have to manage Public Holidays.
- Review of Time Off type configuration

COM PR: https://github.com/odoo/odoo/pull/72511
ENT PR: https://github.com/odoo/enterprise/pull/19157
UPG PR: https://github.com/odoo/upgrade/pull/2791
TaskID:2475413

closes odoo/odoo#72511

Related: odoo/enterprise#19157
Related: odoo/upgrade#2791
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: William Braeckman <wbr@odoo.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2021-09-02 12:57:03 +00:00
jdoutrelouxandLaurent Stukkens 96ff372034 [IMP] project_timesheet_holidays : generate timesheet entries for global time off
Generate timesheet entries for each employee when a  global time off is created
if module_project_timesheet_holidays is true.

This only impacts the employees with the corresponding resource calendar
The entries are linked to the project and task set in the settings.

The number of hours timesheeted corresponds to the timeframe during which both the global time off
and the working hours of the employee overlap (same behavior as for regular time off).

If the global time off is modified or deleted, the timesheet entry is adapted accordingly.

Task-2352428
Closes #67021

Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
2021-08-31 19:54:18 +00:00
William Braeckman 1285726ff9 [FIX] project_timesheet_holidays: prevent multi-company issue in time
off.

When validating a time off with a company-less time off type, if the
time off type is configured to create timesheet entries in a project, a
multi-company security rule could be triggered by accessing the project.
We now check that the company of the task is valid in the current
context (it would make no sense to have an employee work on a task from
another company anyway) before creating the timesheets.

Closes odoo/odoo#75308

Task ID: 2628148

closes odoo/odoo#75579

X-original-commit: 29662626f7d67480926fbb12986ca644d213151c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-08-25 12:19:18 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Barad Mahendra 27538bca03 [IMP] project,hr(_timesheet)_holidays: usability improvement for project
Purpose of the commit is to improve the usability and onboarding
of the project app.

So in this commit, done the below changes:
 - Rename column "Kanban state" in list view screens
 - Hide column "analytic account" when not needed
 - Do not show "Internal" project

PS: Moved leave_timesheet_project_id into hr_timesheet and rename
it as internal_project_id and we used it in the domain in the
kanban/action to the kanban in order not to have it in the result.

closes odoo/odoo#68857

Taskid: 2451722
Related: odoo/upgrade#2479
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 05:18:14 +00:00
Urvi Soni abe4856f4c [FIX] hr,sale,project(_timesheet)_holidays: improve the user/validation errors
Purpose of the commit is, User/validation errors are sometimes not
correct in English and/or quite obscure and don't help the user
understand/solve the issue. so some copywriting should help make
the experience better.

So in this commit, re-word the several validation and usererror message
and als make the timesheet_task_id field required when the
timesheet_project_id field is set,

closes odoo/odoo#70796

Taskid: 2513067
Related: odoo/enterprise#18386
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-03 06:52:21 +00:00
Francois (fge) 568fe91341 [FIX] project: fix various bugs
Restore Project Kanban view for mobile.
Added a name for the default stage of the tasks in the Internal project
Removal of redundancy for the creation of the Internal project and its tasks
Fix task_reccurrence for the type 'after'. (too much task created or bad task created)

Task-2326258

closes odoo/odoo#64607

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-15 12:20:54 +00:00
Adrian Torres 679185f3e8 [IMP] *: replace all raises inside unlink by api.ondelete
With this commit, all instances of errors being raised inside
`BaseModel.unlink` overrides are moved into methods decorated with
`api.ondelete` which is safer.
2020-12-04 09:16:16 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Tom Kairis bdf29635fb [IMP] hr_timesheet: Improve general UX (back2basics)
Change of several labels to increase consistency.
Adapt the size of certain images so that they are rendered without
modifying their quality.
Display the employee's profile image in the grid view to improve
the visual.
Add the kanban view to the All Timesheets menu.
Modify the Time Off configurations so that the projects displayed are
those of a company and that the tasks are adapted according to
the chosen project and vice versa.
Make the hr_timesheet and timesheet_grid module icon the same
for better consistency.

closes odoo/odoo#51808

Taskid: 2239802
Related: odoo/enterprise#10745
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-26 11:15:22 +00:00
Yannick Tivisse 721dda2361 [IMP] project_timesheet_holidays: Improve error message
closes odoo/odoo#45818

Related: odoo/enterprise#8602
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-23 09:20:32 +00:00
Rémy Baranx (bar) cd4e854e41 [IMP] project_timesheet_holidays : convert onchange to stored-editable computed fields.
The 'timesheet_generate' and 'timesheet_task_id' fields have been set as
stored-editable computed fields.

The condition to compute the timesheet_generat field has changed to be
coherent with the _check_timesheet_generate constraint.

Keep the timesheet_generate field without its default value (True) to avoid
raising a ValidationError through the _check_timesheet_generate constraint
before the timesheet_generate field has been computed.
2020-06-23 08:57:08 +00:00
jbm-odoo e7dda3fab0 [IMP] project_timesheet: Add internal project by default to ease onboarding
taskId: 2217930
2020-06-15 15:50:19 +02:00
Victor Feyens 88f3d9c076 [FIX] project: company creation
* Wrong environment for project & task creation
On company creation, a leave project and task are created, but with the
wrong environment, potentially leading to inconsistent values in a
multi-company environment.

* Company creation in batch
Also fix the create override decorator to specify the create override
supports batch creation of companies.

closes odoo/odoo#51264

X-original-commit: e6bd644851819692eeddadaa50950efd0f83f6d9
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-14 13:27:08 +00:00
Kevin BaptisteandYannick Tivisse 2ac06038dd [IMP] project, industry_fsm: Improve subtasks and configuration UX
Purpose
=======

In Project, the configuration has to be done twice: in the settings of the
app and on each project.

During the onboarding, the user won't understand that a feature has to be
enabled at both places and will think that the system just doesn't work.

If the user enabled a feature, he most likely intends on using it for most
of his projects. Therefore, having to do a double configuration for each
new project is annoying.

By the way, sub-tasks is the only global feature (it can't be enabled or
disabled by project), so we are breaking it down by project to remain
consistent with the rest.

Specification
=============

1/ Enable subtasks per project
Before this commit, sub-tasks were a global feature (i.e. once enabled
they were enabled for all projects). This commit gives the ability to
enable/disable sub-tasks per project.

2/ Make project_id on planning required

3/ Change default rating status on new projects

4/ Default value for allow_subtasks

5/ Enable timesheets on existing projects

6/ Hide Total Hours if subtasks are disabled

7/ Create project in the company context.
Otherwise some records generation could use a default company which is not
the company for which we want to create a project.

8/ Default value for allow_forecast, is_fsm

9/ Change reference to timesheet product

10/ Fix tracback on industry_fsm_report.
Before this commit, there was a traceback when enabling "Worksheets"
(industry_fsm_report) after "Time and Material" (industry_fsm_sale).

11/ Convert some onchange method into computed editable stored fields

closes odoo/odoo#41218

Taskid: 2146474
Related: odoo/enterprise#6998
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-31 15:35:54 +00:00
Nicolas Martinelli 785a426479 [FIX] project_timesheet_holidays: create company
- Install project_timesheet_holidays
- Create a company with any user (except the SUPERUSER)

An AccessError is risen.

This is because the new project is created in the new company, but the
user is not in this company. The record rule `project_comp_rule`
prevents the constraint to be evaluated.

`sudo` seems the only solution here...

opw-2146153

closes odoo/odoo#41144

X-original-commit: a7d24cabafe1a9c71f9dbdb7cf3f129006250951
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-29 14:29:58 +00:00
Victor Feyens 48b887618c [IMP] * : replace with_context(allowed_cids=[c]) by with_company(c). 2019-11-18 12:25:05 +00:00
Parth Choksi 6b67174063 [IMP] hr_timesheet: records creation in batches
*: hr_timesheet
   project_timesheet_holidays
   account

Creation of analytic lines will be done in batches instead of creating single
record by iteration. This optimization is done in order to speed up the creation.

task-1971460

closes odoo/odoo#34481

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-06 10:24:25 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Alexey Pelykh 089755c1fa [REF] project_timesheet_holidays: provide hooks
This commit provides some hook to extend values when a leaves
generates timesheets. It also use dates directly, rather than
converting them to string.

Closes #30867
Closes #30872
2019-10-07 15:32:10 +00:00
fw-bot ee8147996d [FIX] project_timesheet_holidays: holiday name shouldn't be exposed
closes odoo/odoo#37976

X-original-commit: 2a7fa7e58f5ac504b260f3caed9113936991b54f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-04 11:29:22 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Christophe Simonis 64e43808b7 [MERGE] forward port branch saas-12.5 up to 58a83d1222 2019-09-20 17:34:45 +02:00
Julien Castiaux 4f03a5f136 [FIX] *: remove old deprecated modules/functions
PEP-594 is deprecating a bunch of modules. As part of the cleanup, we
are also dealing with long deprecated modules, functions and aliases.

* `assert_` -> `assertTrue`
* `assertEquals` -> `assertEqual`
* `assertNotEquals` -> `assertNotEqual`
* `assertAlmostEquals` -> `assertAlmostEqual`
* `assertRaisesRegexp` -> `assertRaisesRegex`
* `assertRegexpMatches` -> `assertRegex`
* `base64.encodestring` -> `base64.encodebytes`
* `base64.decodestring` -> `base64.decodebytes`
* `inspect.getargspec` -> `inspect.signature`
* `inspect.formatargspec` -> `inspect.signature`
* `logging.warn` -> `logging.warning`

closes odoo/odoo#36863

Task: 2003936
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-17 11:36:42 +00:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00
Prakash Prajapati c058562d73 [IMP] various: Add multi company domains on views
When the many2xxx field relates to a model where company_id is required, set
this  domain [('company_id','=',company_id.id)]

When the company_id field of the related model is not required, set this domain
['|',('company_id','=',company_id.id),('company_id','=',False)]

When setting the domain on a field which is in the treeview of a xxx2many field
evaluate against the company_id of the 'parent'.

Some constraints have been added on sereval models. Take a look at the complete
specification for more details.

TaskID: 2024446
Closes: #35266

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:17:28 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
Christophe Simonis b2872e9bab [MERGE] forward port branch saas-12.3 up to 499d3efa7c 2019-08-13 10:08:12 +02:00
jem-odoo 5d64a5114e [FIX] project_timesheet_holidays: multi company issues
Partial backport of ef1afb7b69

Task-1999686
Closes #35520

closes odoo/odoo#35526

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-07 09:18:47 +00:00
RomainLibert 39a0162b80 [IMP] hr_holidays: Improve general UX (back2basics)
TaskID: 2048892

closes odoo/odoo#35541

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 13:35:17 +00:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Martin Trigaux e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Odoo Translation Bot 72339a5301 [I18N] Update translation terms from Transifex 2019-07-21 01:18:28 +02:00
Odoo Translation Bot 56f74a63be [I18N] Update translation terms from Transifex 2019-07-28 06:08:27 +02:00
Christophe Simonis cf51b5f25d [MERGE] forward port branch saas-12.3 up to 793933a128 2019-06-25 14:23:48 +02:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00