No notifications should be received whilst in Kiosk Mode.
closesodoo/odoo#81694
Taskid: 2704624
X-original-commit: 202a5a075b90a564d37c68d2f21f9c1edd8a7caf
Signed-off-by: Kevin Baptiste <kba@odoo.com>
A wrong company was used in the Kiosk mode, preventing users to check in
/ out.
closesodoo/odoo#80035
Taskid: 2691031
X-original-commit: ed3003c9d8ce11a8f59966d28371883df5eb9c36
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Since the Time Off B2B, the deduct extra hours didn't work anymore due
to an invalid domain.
This commit fixes the traceback but also the behaviour as the domain did
not make any sense anymore.
Also changes the default order for overtime records.
TaskId-2658077
X-original-commit: 13c57cdb3b797e56a164e5049b9f9d799ad127c9
Part-of: odoo/odoo#79498
Avoids the ambiguity of the department_id column in
hr_attendance_report.py
While upgrading to Odoo 15.0, if the database contains
a module that adds the column department_id to
the table hr_attendance_overtime, the following error occurs:
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/service/server.py", line 1246, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/15.0/odoo/modules/loading.py", line 472, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/odoo/src/odoo/15.0/odoo/modules/loading.py", line 365, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/odoo/src/odoo/15.0/odoo/modules/loading.py", line 199, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name}, new_install)
File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 425, in init_models
model.init()
File "/home/odoo/src/odoo/15.0/addons/hr_attendance/report/hr_attendance_report.py", line 50, in init
""" % (self._table))
File "<decorator-gen-3>", line 2, in execute
File "/home/odoo/src/odoo/15.0/odoo/sql_db.py", line 89, in check
return f(self, *args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/sql_db.py", line 310, in execute
res = self._obj.execute(query, params)
psycopg2.errors.AmbiguousColumn: column reference "department_id" is ambiguous
LINE 6: department_id,
^
``
upg-42212
closesodoo/odoo#79141
X-original-commit: 3622b1bb2e678394a3b21f213b62c90009e75dd9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Improves on the display when closing an attendance to display today's
overtime aswell as the total overtime the employee has.
Also small cleanup, remove unused variable.
TaskId-2655689
closesodoo/odoo#77841
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The context was missing from multiple RPC calls in the attendance's
kiosk modes resulting in the wrong employee being fetched for the
attendnace creation, all RPC calls related to attendances are now given
the context explicitely.
TaskId-2660772
closesodoo/odoo#77750
X-original-commit: 26c5e25481d93e5f9db6c4becefc4f17d3974eaf
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
When computing the overtime hours we use localized datetimes in order as
much as possible but we were localizing UTC datetimes to the wrong
timezones without converting them first which caused issues with company
thresholds.
Task ID: 2607436
closesodoo/odoo#74241
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Previously the default time off type computed when pressing the deduct
extra hours button would not always be valid, this commits aims to
change that behaviour.
The form would also not recognize the fact that we are in a overtime
deductible context when the time off type was not bound to a company.
Task ID: 2607436
`attendance_state`, `hours_today` and `last_attendnace_id` are required
to open up the attendance app, but were not available to the public user
since commit b429fce0e6
Task ID: 2607436
Fixes minor problems encountered while doing task : 2607436.
A traceback when disabling the setting and the checks weren't disabled
if the option was completely disabled.
Task ID: 2607436
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>
Fixes an underterministic error during the holidays_attendance test.
Also speeds up both holidays_attendance and hr_attendance_overtime
significantly.
Task ID: 2599846
closesodoo/odoo#73570
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.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
This commit adapts the community codebase to the rewriting of the
/web application in owl.
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.
Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient
Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
Social Marketing app is 25 menu away from Email Marketing, etc.
So, all menus should be reordered.
- This commit will reorder the menus of the app switcher in order to reduce
the distance between correlated applications,
and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.
PR: #69984
TASK ID: 2513082
Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
- Go to Attendances > Manager > Attendances
- Remove Check in value of an hr.attendance record A
- Set Check out to A
Bug:
A traceback was raised
opw:2513143
closesodoo/odoo#70088
X-original-commit: c462782f66d720266e7e8e7f616fc26c23f009c8
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
The 'addMockEnvironment' test utils allows to patch a lot of stuff,
including the session, for the sake of a test. However, it assumes
that it is only called once inside a test (or at least, that its
cleanUp function is always called before it is called again).
In this hr_attendance test, it isn't the case. 2 client actions are
instantiated, and addMockEnvironment is called for each of them,
in particular to patch the session.
The first call stores the current session (the real one), to restore
it in its cleanup (1). The second call stores the current session
(the mocked one, produced by the first call), to restore it in its
cleanup (2). The cleanup functions are called in order, so (1)
before (2), meaning that at the end, we end up with the session
being the mocked one of the first call to addMockEnvironment.
The very short term solution is to ensure, in this test, that the
cleanup functions are called in the correct order. For the long
term, we are working on a robust mechanism to correctly clean up
everything after a test.
Issue spotted in the assets revamp task, which mixed a bit the
order of the tests.
closesodoo/odoo#67891
X-original-commit: bb43c74dd10c76b8a80d5749106b86432b13909e
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Users with the rights 'Manual Attendance' get (read-only) access to their
own attendances.
closesodoo/odoo#66934
Taskid: 2438863
Related: odoo/upgrade#2216
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The work location of an employee was previously a fields.Char. That was
changed to a Many2one field to a the new model called work.location.
That had some consequences in other modules that had to be slightly
adjusted. The modules impacted were hr, hr_appraisal, hr_payroll.
Task id: 2335646
closesodoo/odoo#63192
Related: odoo/enterprise#15235
Related: odoo/upgrade#2020
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps:
- As admin, go to Settings > Users & Companies > Users
- Edit Mark Demo (demo)
- In Human Resources > Attendances, select Manual Attendance or blank
- As demo, go to My Profile
- Click the smart button showing the hours worked for the last month
- Remove all filters
Bug:
The demo user, who hasn't the rights to see the other employees
attendances, can see them.
Explanation:
Every user must have the right to read attendances in order to see their
own attendances. Not giving the users the read rights in the security
record rule prevents the record rule from being applied when reading
attendances. This makes the read access rights the only rule and allows
everyone to see the attendances of the others.
This commit also fixes the default selected employee when going to the
attendances tree view on these paths:
- User
- Employee
- User > Employee
In fact, sometime, `active_id` is the ÌD of the user and not of the
employee. This leads to incorrect results since another employee's
attendances are shown.
Finally, this commit prevents users from creating attendances from other
apps since only attendance officers and above can have access to the
creation form within the Attendances app.
opw:2440117
closesodoo/odoo#65334
X-original-commit: b3247c81200200590d669b76a58d06e6adf66d69
Signed-off-by: backspac <backspac@users.noreply.github.com>
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Currently, when we open kiosk mode in attendance then the barcode
image is broken in community due to wrong img path.
So in this commit, Fix the barcode image as path to display
barcode image properly.
closesodoo/odoo#56868
Taskid: 2327526
X-original-commit: 4bfe8136f7cec853c1339c6d27754b8f1bc1c72d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, when you create a employee when hr_aattance is installed
then it will create traceback due to falder timiezone
so in this commit, Fix the issue and if timezone is not set on
employee then pass the 'UTC'
TaskID: 2283753
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
The purpose of this task is to improve the UI of the 'Apps', by
improving the clarity of the kanban, sequencing the apps and
simplifying the app categories in the searchpanel
So in this commit, Added the new sequences for ir.module.module
and ir.module.category records.
TaskID: 2240257
Related Enterprise: https://github.com/odoo/enterprise/pull/12413Closes: #55907
`float_time` widget is supprted in pivot since dbaa345cec27d1a99556af6305e22e17e9760bb6
closesodoo/odoo#51367
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this Commit, Datetime on warning was not formatted based on User's lang.
With this commit, we use `format_datetime` to correctly format Datetime.
X-original-commit: b1bc2ba4a986bf7bce242496f822f9891937c9cf
Make the employee presence icons more descriptive.
Allow to quickly filter the Presence Reports based on the user status.
closesodoo/odoo#54527
Taskid: 2246447
Related: odoo/upgrade#1488
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, there are two Kiosk mode menu in the attendance app when
we open the app we can see Two kiosk mode menu one in main menu add
second is a sub-menu of the manager menu.
purpose of this task to remove the Kiosk mode menu which is a submenu
of manager because attedance manager will always have employee officer
right which will enable the kiosk menu of employee on attendance.
closes odoo/odoo#54412
Taskid: 2296263
Closes: #54412
Related: odoo/upgrade#1475
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
After #56a8c9e4311d24c33b7ad08b8230e4be345a85b8 we check access rights in function fields_view_get,
so a user with only 'Kiosk Attendance' right can't see public
employee profile.
After this commit:
In attendance application, we always show public employee profile
as it not usefull to show more information in this application.
closesodoo/odoo#55341
Taskid: 2298803
X-original-commit: 1fbb8f1ebcb805317b93e0b4ea363aaec8e3e36e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The time to display the check in/check out time was hardcoded to
HH:mm:ss while other locales may use different formats.
Use the appropriate time utils to retrieve the right format that uses
the time format from the res.lang record.
Fixesodoo/odoo#50527closesodoo/odoo#54079
X-original-commit: 47707e1b099195487fd3d3e0ae012e4aed5a9bc5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>