'New Time Off' and 'Allocation Request' dialogs were not translated to the user's language
Steps to reproduce:
1. Install the Time Off app
2. Go to General Settings, add a language and switch to it
3. Open the Time Off app and click on the button 'New Time Off' (which is now translated to the language you chose)
4. The field names of the dialog that opens are not translated
Solution:
Add the user's language to the context of the dialogs
OPW-2715396
closesodoo/odoo#82246
X-original-commit: bb4c568fe6cc32e7a0a26960276999113b858144
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Rename javascript model `mail.thread_viewer` to `ThreadViewer` in order
to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81437
Related: odoo/enterprise#22911
Signed-off-by: Alexandre Kühn (aku) <aku@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 `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>
The number of leaves taken / available was no longer available
in mobile.
closesodoo/odoo#80513
Taskid: 2701070
X-original-commit: 3c68b1cad227235a915b4908b6d73aee030e54bc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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>
A user without Time Off rights is now allowed to cancel their own
validated time off when:
- It's not yet started;
- No work-entries has been generated for it yet.
The time off is archived and the days taken reallocated.
closesodoo/odoo#76722
Taskid: 2643713
Related: odoo/upgrade#2843
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
task- 2643692 required customizing the calendar view to display a calendar from the employee form via the Time Off smart button.
As the changes took place after the freeze of the saas-14.5 branch, it was not possible to split the time_off_calendar.js file into its different components to have them being re-used in time_off_calendar_employee.js file.
Subsequently, some code duplication exists between the two files and makes it hard to maintain.
This commit is for making the custom calendar components more modular and more maintainable.
task-2661142
closesodoo/odoo#77767
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>
Previously, the land page of Time Off was month view. When you select a leave from Month's view, you can edit/delete it directly.
Now, the land page is Year's view, and you can open the modal form of the leave, but it's not possible to delete it.
Add a delete button on the form view of the leave from the year's view of the dashboard
task-2638305
closesodoo/odoo#76080
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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
closesodoo/odoo#77376
X-original-commit: 7f92c830d3607167bd76bc43d992fbf720a3ef29
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The context was not propagated hence it was not showing the allocations
of the current companies.
closesodoo/odoo#76919
Taskid: 2652888
X-original-commit: 487621429a8e4a71be2b7054e485288130e474b6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
After this commit, in the Time Off dashboard, the user can see the validity
period of the available days in case if the related allocation
has a validity end.
If the time off has more than one allocation, we display the validity of the closest one.
task - 2636403
closesodoo/odoo#76257
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: From the dashboard, the user sees the number of left time offs,
but does not have an information regarding how it is calculated.
In this task, we add an information tag on the Time Off dashboard
next to each Time Off type that requires allocation.
When we hover over the tag, we see how is the number calculated.
For example, it could look the following way:
Allocated : 20 days
Approved: 5 days
Planned: 3 days
-----------------
Left: 12 days
task - 2643115
closesodoo/odoo#76682
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Hide transition mode if there is 0 or 1 level on accrual plan;
- Fix kanban card
- Reduce bottom padding on calendar view
- Log a message when an allocation linked to accrual runs for the first
time
closesodoo/odoo#75940
Taskid: 2636417
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
To improve readability of the year view dashboard of hr_holidays:
Currently the week number on the year view of hr_holidays are not aligned with the dates -> Align the week numbers with the dates
The week number are also of the same size than the dates -> Decrease the size of the week numbers
The empty weeks have a week number (https://tinyurl.com/yzkmwbm5) -> Don't add a week number if the week is empty
Summary of the changes:
In hr_holidays, on the year view dashboard:
- Align the week number with the days
- Size the week number to be smaller than the number of days
- Remove number when the week is not displayed
task-2637136
closesodoo/odoo#75927
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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
closesodoo/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>
* = 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>
*: hr_holidays, im_livechat, sms, snailmail, website_slides
Most messaging related components have common needs concerning
subscribing to model changes, and not needing to be rerendered unless
their props change. Previously, most components would call the hooks
"useModels" and "useShouldUpdateBasedOnProps" individually. Messaging
components also depend on one another quite a bit, requiring a lot of
explicit imports of other components. It would also be useful to be able
to have cyclic dependencies between component (eg Message renders a
component that allows to delete the message, and the delete component
renders the message in a confirmation dialog), but that doesn't work
with explicit imports (the odoo module system doesn't support cyclic
dependencies).
This commit adds a Component decorator that:
- Registers the component in an internal registry
- Makes all components in this registry available at render time to
components that have been registered in this way
- Calls the useModels and useShouldUpdateBasedOnProps hooks during
component initialization (setup)
enterprise PR: odoo/enterprise#20304closesodoo/odoo#74982
Signed-off-by: Sébastien Theys (seb) <seb@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>
* Without an explicit format string, moment() should be called with
ISO date(times).
* Correctly destroy all test locales (`zz` was not destroyed at all,
and `englishForTest` was double-destroyed instead of destroying
`frenchForTests`).
* Avoid creating a moment object from the value `false` in date(time)
fields.
* Disable the warning entirely in dates_tests, the contents are super
messy and weird.
* = 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>
currently, Across Odoo, there are bugfix folder in around 13 module,
New manifest system allows to add new files in stable so the bugfix files are no
longer required.
after this commit,
all the bugfix files are removed from all module.and all the code in those file
is maintained as per New manifest system.
Task : 2510653
closesodoo/odoo#69830
Related: odoo/enterprise#17936
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Remove 'refuse' leaves from the Calendar View.
Improve leave/leave.allocation popup form views.
Add Sequence handle to leave type list view.
Change the sorted key func. in _search override to
first order by sequence asc then sort ties by
remaining,taken desc.
closesodoo/odoo#62162
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* hr, hr_holidays, im_livechat, mail, snailmail, website,
website_livechat
This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.
`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
Purpose of the task is to improve mobile interface of the Time Off
and calendar view.
So in this commit, we have improved UI as below:
hr_holidays:
- Move the leave summary topbar from top to sidebar filter of
calendar for small screen
- Improve the kanban view of leave for mobile and added the
badge for state.
web:
- Improve the calendar year mobile view by spliting the month view
in 2 column.
TaskID: 2333778
Related PR: https://github.com/odoo/enterprise/pull/13454closesodoo/odoo#61474
Related: odoo/enterprise#13454
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* = hr_holidays, im_livechat, website_livechat
A huge amount of components where rendered for no reason, notably when typing a
new message (at every key press), which significantly slowed down the interface.
There were 2 causes to this number of renders:
- OWL rendering all children automatically, even if their props didn't change,
unless `shouldUpdate` is overridden, which is now done.
- `useStore` selectors being way too generous in what they observed
task-2399731
closesodoo/odoo#64958
X-original-commit: a0472425251d429a0828eff1675c84b3f24527d8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
A new calendar view has been added, the "year" view.
Some modifications should be done on this view, more specialy in "Time Off" application.
Problems were the fact that it was hard to see if a time off has been approved or not.
Another was the fact that week-ends & public holidays were not grey.
This commit change year calendar in Time Off module.
More specially, this commit:
- Change default calendar in personal dashboard to "year"
- Gray week-ends & public holiday (based on the worker's calendar)
- Hatch non-approved time off
- Removed a calendar view from My Time Off Requests
- Fix a "cancel" button that doesn't work
- Add a new view that is displayed when there is no filter to show on the filter view for calendars
Task id #2318645
Task id #2317525
The "viewer" should be the "parent" not the view itself. This distinction will
become important in a future commit to allow viewers to not display the view in
some situations.
Rename done as a standalone commit to ease diff readability.
Part of task-2310623
closesodoo/odoo#56751
X-original-commit: f9ee1cf5f904116e4d1d70a8eaf4ee1d58b18a3a
Related: odoo/enterprise#12764
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, calendar view's height was 89.5% of its container.
It was because of hr_holidays module which reduces the calendar's
height to add some elements on top of it.
This commit adds a class `o_timeoff_calendar` on calendar view's
controller to scope css rules only in the hr_holidays module and
set the height to a fixed value.
Task id: 2193921
closesodoo/odoo#54268
Related: odoo/enterprise#12183
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit the font-size for the days/hours left was too big. There is
also a useless scroll bar for the calendar. Adjusting the CSS to remove the scroll bar.
Task-2254820
closesodoo/odoo#52178
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.
From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:
- models, which are logical entities that depict the client-side state of
messaging as a whole.
- components, which are in charge of displaying information from models.
This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.
Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249
Task-1914207
This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.
closesodoo/odoo#39023
Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
Purpose
=======
The noun time off is uncountable. The plural form of time off is also time off.
closesodoo/odoo#51370
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>