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>
The zoom feature of Image Widget expects a field `image_` being present
in the view to check if a zoomable image is available or not.
Since #69819 the image field was replaced by an avatar one thus breaking
the zoom.
This commit also puts the Chat icon on kanban cards of
hr.employee.public in the bottom right.
closesodoo/odoo#75099
Taskid: 2622671
X-original-commit: ae8a4b51e801a06d9d7a13be3658d5b6828da7e9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
* = test_discuss_full
Overall less queries.
Changes:
- Batch `mail_partner_format`.
- Batch `user.employee_id` compute.
- Remove query for current leave state, use fields (and prefetch) instead.
- Move current leave state in partner format instead of channel info.
Part of task-2622462
closesodoo/odoo#73174
Related: odoo/enterprise#20186
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Improve the departure wizard form view aswell as the flow when using it.
Removes the confirmation dialog when archiving an employee to directly
display the departure wizard.
Also changes departure reason to an html field instead of pure text.
Task ID: 2575279
closesodoo/odoo#72367
Related: odoo/enterprise#19116
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
The aim of the current task is to adapt the design of this new widget to the
list and kanban views.
SPECIFICATION
Kanban
when there is only one record set in the m2m field, display it like a
many2one_avatar widget when there are two or three records set in the m2m
field, display the avatars next to each other when there are more than three
records set in the m2m field, display the first two avatars, then a grey circle
with +X in it (where X is the number of records beyond the first two), when
hovering the +X avatar, open a tooltip with the list of the remaining records
the display order of the records is the same as the order in the m2m field
the avatars behave like in the other avatar widgets (i.e. darkens on hover and
clicking on it opens the chat) except the +X avatar that does not darken or has
a cursor:pointer; on hover and is not clickable
List
same specs as for the kanban view, with the difference that the widget displays
up to five records instead of three when the widget is editable display it like
the current formview version of the many2many_avatar_user widget (i.e. tags
with avatars)
task-2563591
closesodoo/odoo#72166
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
In order to limit encoding decoding, the _render method returns a
unicode string in the markup safe object instead of a MarkupSafeBytes
closesodoo/odoo#68299
Related: odoo/upgrade#2454
Related: odoo/enterprise#17270
Signed-off-by: Antony Lesuisse (al) <al@openerp.com>
Previously all buttons would be displayed in a single row, this commit
changes it to two rows.
Also the bottom half of the button was unclickable due to an invisible
div, fixed with css.
Another button has been added to undo a manual presence state.
Task ID: 2584198
closesodoo/odoo#72976
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Purpose of the commit is to improve the ui of the project and task
So in this comit, project_id and tag_ids should be always visible
in fsm mode too. also re-sequence the task form view buttons and
added class for the proper xpath.
also move the common for for get_unusual_days on employee so it
can be reused.
Related enterprise PR: https://github.com/odoo/enterprise/pull/19134Closes: #72440
TaskID: 2502339
Define `data-hotkey` on most used action buttons.
For the modals, the following keys are dedicated for "special"
actions:
- Alt+G: add
- Alt+V: save
- Alt+Z: cancel
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When writing the new webclient, the notification service was rewritten,
and all of its uses in production code were changed to use the new
services, however, some tests were still reliant on the old notification
service.
This commit removes references to the legacy notification service so
that we can be one step closer to removing it from the code base.
Part of #72675
Purpose
=======
The "first contract date" is a usefull information for anybody who onboards
new colleagues. Issue: this information is not on the "public employee" and so,
visible only by hr officer (minimum).
With this task, we would like make this field public and visible by any internal
user in the system. In this way, we don't have to provide too many access rights
to any employees.
closesodoo/odoo#73552
Taskid: 2584098
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Moves a field from hr_holidays to hr (`total_employees` of hr.department)
to display it in the department list view.
Widen the department kanban view to display more information and allow
clicking on the department name in the kanban view to edit it.
Task ID: 2582448
Multiple improvement with job views:
- Add a sequence field for jobs
- Display 'Open Positions' on the website event if there is only 1 open
position
- Display whether the website is published on both the list and the
form views of hr.job
- Fix an issue introduced with 446d906f508880eb787debbec3c23cfd081bb045
where html field would be cut and html tags would be displayed
Minor change:
- Add an sql constraint on the estimated number of recruitment to be
positive
Task ID: 2581595
closesodoo/odoo#72769
Related: odoo/enterprise#19264
Related: odoo/upgrade#2585
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Current bounce message is not very user friendly. Purpose of this commit
is to improve it, by improving wording and overall phrasing used in it.
Form view is improved so that bounce message takes all available width in
form view.
Some tests are added, notably to detect pseudo-void content from editor.
Task ID-2532529
PR odoo/odoo#71793
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds a new model `hr.attendance.overtime`.
When an employee checks out, an overtime entry will be created when:
- the option is enabled on the company;
- the employee worked more or less than the number of hours they
were supposed to work that day.
TaskID: 1904850
Previously personal documents on employees were added with the belgian
contract salary module. This changes moves part of those fields to the
base hr module
Task ID: 2578139
closesodoo/odoo#72673
Related: odoo/enterprise#19219
Related: odoo/upgrade#2587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* = hr, hr_holidays, im_livechat, sms, snailmail, website_livechat,
website_slides
Exporting directly on the line of the class or variable definition is less lines
of code and less repetition (and risk or mistake).
Exporting with a name instead of default allows to catch typos more easily when
importing and ensures the same name is used for consistency (and ease of grep).
closesodoo/odoo#72597
Related: odoo/enterprise#19224
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, suppose we have a scenario like below
Task-A:
Activity-1:
name: Email ( Today )
Assigned to: User-1
Task-B:
Activity-1:
name: Email ( Today )
assigned to: User-2
Activity-2:
name: Call ( Due in 3 Days )
assigned to: User-1
When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.
However purpose of systray is to indicate activities current user has to
perform instead of global activities.
After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
('activity_ids.date_deadline','=', fields.Date.today()),
('activity_ids.user_id','=', 1)
]
And for that purpose we introduced a non-stored compute field with a search
method.
Task ID-2438822
COM PR odoo/odoo#72219
X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
It is currently escaped as it is not Markup-ed and not considered safe.
It means raw content is currently displayed in sent emails, which is not
really what we expect.
closesodoo/odoo#71911
X-original-commit: 62e6bc216aefe93c4cd1cca8e39f124a8a298386
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, in My Profile all the users have access to language settings
even when the user does not have the rights to activate/deactivate
languages. Also, the language setting list is not user friendly which
needs to be imporved.
so in this commit hide "More Languages" button in My Profile for users
that does not have the rights and the language settings list is
improved by adding seperate buttons to "activate", "disable" and "update" a
language.
PS: groups does not work on My profile so added the compute field based
on group.
closesodoo/odoo#69292
Taskid: 2466771
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) fleet.vehicle -> description
2) fleet.vehicle.log.contract -> notes
3) hr.job -> description
4) hr.contract -> note
5) hr.leave.allocation -> notes
6) hr.applicant -> description
7) lunch.product -> description
8) lunch.order -> product_description
9) lunch.product.report -> description
Task Id: 2499504
X-original-commit: afe52b050a7667f3f20696cd48cd922f635a941c