The "My department" filter in the "Time Off" overview menu is changed to also include the leaves of employees from child departments (all the way to the bottom of the hierarchy).
task-2699541
closesodoo/odoo#81597
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Add a populate script to automatically create lots of
employees/jobs/tags/work locations/departments.
closesodoo/odoo#82259
Taskid: 2728608
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When setting users on the appointment type as staff, we want to consider
their resource_calendar_id (work schedules) only if they correspond to the
current company and are linked to employees, not the ones linked to the users
directly. In order to display those work hours correctly, we use a new related
field on the employee_id in res_users model as it will return the employee of
the user in the current company, if any.
Therefore, we add the new field employee_resource_calendar_id directly in
hr module (in res.users model) to reduce diff and centralize the fields as
close as possible to the employee_id definition.
--- Links ---
Task-2499566
closesodoo/odoo#82234
Related: odoo/enterprise#17934
Related: odoo/upgrade#2578
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Adds a new non stored field to make it easier to query all employees
from the active user's department and it's children department(s).
The result is guaranteed to always contain the active user's employee.
task-2700231
closesodoo/odoo#81472
Related: odoo/enterprise#22724
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Current behavior:
When a user doesn't have any HR access right he cannot access his own profile
Steps to reproduce:
-Go to the demo user settings
-Remove all the right in the HR section
-Log into demo account
-Try to access My Profile
opw-2712593
closesodoo/odoo#81674
X-original-commit: ee932eab329043a3ddf82bb39dff458f4eb7f7ad
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
The tags management on an employee was limited to HR Administrator,
which didn't make sense as an HR Officer could manage the tags just not
assign them to an employee.
closesodoo/odoo#81654
Taskid: 2715498
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit users were not able to edit their settings if they
had a linked employee for a company that was not currently active for
them.
This is due to the fact that since the employee_ids field is considered
`safe` to read/write by your own user the fields were loaded in sudo and
thus bypassed the security rules that were meant to prevent that issue.
The security rule is now enforced as a domain on the `employee_ids`.
TaskId-2715341
closesodoo/odoo#81612
X-original-commit: b5b105eabd90419a5856e8279e277743c5915fc9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before this commit, the computed field _compute_is_system make a write which
one is a bad practice and trigger a lot of others calls on res.user model.
opw-2716468
closesodoo/odoo#81555
X-original-commit: f85a67935c5dfa660e94f9bed8e8058c8df256cc
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Rename javascript model mail.user to User in order to distinguish
javascript models from python models.
Task-2701674
closesodoo/odoo#81471
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.partner` to `Partner` in order to
distinguish javascript models from python models.
Part of task-2701674.
* = hr, hr_holidays, im_livechat, website_livechat
closesodoo/odoo#81406
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model 'hr.employee' to 'Employee' in order to
distinguish javascript model from python model.
Part of task-2701674.
closesodoo/odoo#80561
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.thread` to `Thread` in order to
distinguish javascript models from python models.
Part of task-2701674.
* = hr, hr_holidays, im_livechat, website_livechat
closesodoo/odoo#81433
Related: odoo/enterprise#22910
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.messaging` to `Messaging` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81386
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In a multi-company environment, it is not possible to update information (language, email,...) from My Profile.
The security rule only allows to change information if the right company is selected or if the user has no company.
Since a user assigned to several companies will have several records in hr_employee referring the same user_id, the security rule is now updated to allow updating information from the My Profile page if the hr_employee.user_id refers to the current user_id.
task-2678411
closesodoo/odoo#80637
X-original-commit: 3e9393c71ccf1b00c051155afd68b3a0cfff05cd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit adds methods to easily obtain calendar validity per resource
for a given search period and get the work intervals per resource,
taking into account the validity of their calendars.
In hr, the create and departure date of an employee are taken into
account to compute the calendars validity.
In hr_contract, it looks for every contract of human resources with
employee of type student or employee existing in the search period and
consider the specific calendar of the contract as valid during the
contract-lifetime.
PR: #77362
task-2646630
Purpose of the commit is to do the generic improvement for the
project:
So in this commit, done the following changes:
- duplicating a project, copy all milestone of project and
set is_reached and deadline field as 'False'.
- chanage the order of the state button in sale order form view.
- pass mail body as default description value in message_new
method of project task.
task-2652943
closesodoo/odoo#77065
Related: odoo/enterprise#21199
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
* = calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot, sms,
snailmail, website_livechat
This commit will change the declaration of the models with the aim of
getting closer to a plain JSON-object. It allows us to eliminate a wide
portion of boilerplate code, making the declaration shorter, more
declarative, and less redundant, but mainly, it prepares the ground for
further changes.
Task-2695223
closesodoo/odoo#79259
Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose of this commit to improve generic UX for the project app.
So, In this commit done following changes:
- add 'subtask_effective_hours' and 'total_hours_spent' fields in the page of
subtask in task form view.
- change invisible attrs to column_invisible attrs for block_by page in task
form view.
- add 'task in progress' subtype for project.task and move 'stage changed'
subtype above 'task blocked'.
- remove the 'is_close' field and all its references from project.task.type.
- unarchive all of its tasks when the user unarchives the task stage.
- sort projects on 'is_favorite'.
- internal users following the project automatically follow its updates and
their notification preferences propagated accordingly.
- duplicating a task will duplicate all of its subtasks.
- move parent task field in extra info page of task form view.
- change the label of 'edit' to 'view' in the burger menu of project kanban view.
- user can delete task without sale_order validation error.
- add constraints for 'seller_ids' field.
- add remaining_hours_so field in task tree view.
- add unusual_days in task calendar view.
- add 'no content helper' in action of burndown chart.
task-2536044
closesodoo/odoo#74018
Related: odoo/enterprise#19880
Related: odoo/upgrade#2801
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Kartik Chavda <kcv@odoo.com>
Currently on the HR employee form, clicking on the department displays the default form of the department.
Instead, it should display the kanban view of the employees who are part of the department
task-2678198
closesodoo/odoo#79339
Signed-off-by: Kevin Baptiste <kba@odoo.com>
- Reset skill levels on skill/skill type change
- Improve form view
- Add a sequence on hr.skill
closesodoo/odoo#73305
Taskid: 2575351
Signed-off-by: Kevin Baptiste <kba@odoo.com>
In task 2404630 the avatar feature was created and no tests were written due to
the iminent freeze. This PR implements tests for the avatar feature, such as
avatar generation and placeholder logic.
task-2578233
closesodoo/odoo#79688
X-original-commit: 400b3fd93266f88832446c8f7422f6e14b958115
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
To avoid mixing both plan and planning in hr plan options it was decided
to reword menus to plan instead of planning.
TaskId-2664863
Part-of: odoo/odoo#78148
It was possible to assign a user that was not part of the same company
as the employee's for an activity which is misleading.
Make hr.plan and hr.plan.activity.type company dependent.
closesodoo/odoo#77524
Related: odoo/upgrade#2879
Taskid: 2658773
Signed-off-by: Kevin Baptiste <kba@odoo.com>
It was not possible to rename an employee with an existing image
profile, as it was trying to assign the size of the avatar (coming from
the webclient) as the avatar itself.
closesodoo/odoo#78299
Taskid: 2660773
X-original-commit: 425ddb217664ba3fdae9e8c1527317fee0fe9368
Signed-off-by: Kevin Baptiste <kba@odoo.com>
* = hr, hr_holidays, sms, snailmail, website_livechat
Message model incorrectly contained data related to a specific component (only
one) even though there can be multiple message components per message model.
This cascaded to adapting related component/models to the same principle.
closesodoo/odoo#76718closesodoo/odoo#77779
Related: odoo/enterprise#20964
Related: odoo/enterprise#21426
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
How to reproduce the problem:
- Install the Employees app
- Create a new user and create an employee form for this user
- Log in with this user, then log out
- On the user's Employees form, the employee still appears as connected
Cause of the problem : as soon as a user logs in,
the system saves the date of his last connection. That value was wrongly
used in the process of computing the user's status.
Now, if the user is offline, he is shown as "Not Available" or "Away"
(grey or orange).
opw-2623386
closesodoo/odoo#77545
X-original-commit: e2991ff6121fee790ef6ead1354cec250428835c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
`tz` field is technical field related to `resource_id`, which is required field on that model.
However it is possible to try to write a void value, which leads to an issue as it is technically required.
With this commit we make the tz field required at write.
closesodoo/odoo#77372
X-original-commit: 7cda3632b1f50ea757d25369e8a1261d8aeab16d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Activate the new opt-in option for the collaboration
on some html fields.
closesodoo/odoo#77160
X-original-commit: 504bbafc1d6183e7e8e0a326d1e90eddce6410d7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Since the merge of 0573aca the override was no longer working.
closesodoo/odoo#77097
Taskid: 2651838
X-original-commit: 947194644a09f186899f2b2526cf0b0675af7304
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Refactor the Environments object into a Transaction object, which is
bound to one cursor, and is no longer shared among several cursors.
The following methods/properties have been changed:
- Environment.envs no longer works (because of the design change);
- Environment.manage() is deprecated (no longer useful);
- Environment.reset() is now an instance method;
- env.clear_upon_failure() is deprecated in favor of cr.savepoint().
closesodoo/odoo#75598
Related: odoo/enterprise#20451
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Xavier Dollé <xdo@odoo.com>
* = crm_livechat, hr, hr_holidays, im_livechat, mail_bot, purchase, sms,
snailmail, survey, test_discuss_full, test_mail, web_editor, website,
website_livechat
- Create new model `mail.guest` for guests.
- Rewrite some RPCs to target routes rather than model methods so that
guests are able to use them.
- Patch JS and python models to support guests.
- Create a stand-alone page and boot the channel in it.
task-2494829
closesodoo/odoo#75496
Related: odoo/enterprise#20417
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The personal documents tab on the employee form view is removed in favor
of the chatter + documents app to hold and manage documents.
The fields are kept because the salary configurator needs fields to bind
to be able to still request documents. This might change in the future.
Closesodoo/odoo#75506
Task ID: 2628750
Related: odoo/enterprise#20420
Related: odoo/upgrade#2769
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Adds the employee tags as an optional field in the employee list view
as well as in the search view.
Closes: odoo/odoo#75480
Task ID: 2630604
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
`result` might be a Markup object (eg during tests) or a bytes-like object.
Step to reproduce: click on "Send by Mail" on a SO -> Traceback
Step to reproduce (2):
- Install website_sale
- Add something to the cart
- Go through checkout and click on Pay Now
- Crash, 500 error page, as this step is trying to generate the SO PDF to send
by mail to the customer, which tries to encode a bytes-like object.
```
AttributeError: 'bytes' object has no attribute 'encode'
```
But if you do that flow during a test, eg
```
./odoo-bin -d mydb --test-tags=.test_02_admin_checkout
```
You have a Markup object, thus you had to encode it.
Now, even during test, we return a bytes-like object.
Related to #68299
Community: https://github.com/odoo/odoo/pull/75377
Enterprise: https://github.com/odoo/enterprise/pull/20449
Part-of: odoo/odoo#75377
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.
Before this commit, a project user could not access the Activity Type
menu.
Convert it to a selection field with the selection values being
computed in sudo.
closesodoo/odoo#74981
Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When loading calendar views, the client tries to load 'unusual' days,
linked to the employee of the current user. But it does not check that
the current user is linked to an employee for that company.
Closesodoo/odoo#75305
Task ID: 2628736
Signed-off-by: Kevin Baptiste <kba@odoo.com>