Commit Graph
1654 Commits
Author SHA1 Message Date
Louis (wil) 3f6f949fa5 [I18N] export sources
closes odoo/odoo#140002

Related: odoo/enterprise#49687
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-27 08:36:16 +00:00
Yannick Tivisse 7ebafb1eb7 [IMP] base: Remove manager rights to user demo
closes odoo/odoo#139731

Related: odoo/enterprise#49562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-25 20:56:11 +00:00
Aaron Bohy e5161c86fe [IMP] hr_attendance: do not slow down webclient for attendance item
The attendance systray item needs data to determine whether or not
it should be displayed, and what to display. Before this commit, it
fetched it in the standard way, in onWillStart, and returned the
fetch promise.

However, for a systray item, it's better not to wait for the
promise, such that the webclient doesn't wait for it to be mounted.
In the case of this item, it is simply not displayed until data is
fetched, and when it is displayed, it's the right most item so it
doesn't produce any flickering.

This allows to save several ms on specific screens (e.g. home menu).

Part-of: odoo/odoo#139477
2023-10-24 13:55:26 +00:00
Xavier Morel 9ebbfdac73 [FIX] *: incorrect translations markings
Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).

Also

- removes translation markers entirely when there's nothing to
  translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
  (DRY is generally a bad idea when translations are involved, even
  more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
  strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
  to fill-paragraph): `\` escapes only the newline, if the
  continuation string is indented this results in a bunch of spaces
  ending in the string to translate, which is pretty garbage for the
  translator, using implicit concatenation works much better

Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.

Not in scope:

Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders

- Provides more context / data to the translator to make sense of the
  sentence.
- Allows reordering the translated terms, which can be necessary
  depending on the sentence and language.

closes odoo/odoo#139314

Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-23 16:45:09 +00:00
jugj-odoo 3dc595e21d [FIX] hr_attendance : Remove pin code in demo data
We're removing the default pin code on demo data to not restrict access
to other apps that depend on it such as the new shop floor app

closes odoo/odoo#139304

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-10-20 18:06:37 +00:00
Jurgen (jugj) bf67f1e20e [IMP] hr_(holidays)_attendance : Revamp Attendance V17
Part-of: odoo/odoo#135439
2023-10-19 14:47:18 +00:00
Brieuc-brd 538fdab99b [IMP] *: fine-tune app icons
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.

To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.

task-3072562

X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
2023-10-16 09:21:17 +00:00
Aaron Bohy daf05d48ac [IMP] *: views: deprecate active_* keys from evalContext
This commit aims to simplify the evaluation context used to
evaluate expressions used in views (invisible, required, readonly,
domain and context attributes). For now, the evaluation context is
typically the current record (there's a key for each field in the
view). In addition to that, there're static keys (that may conflict
with field names): uid, allowed_company_ids, current_company_id,
active_id, active_ids and active_model.

The motivation of this commit is at some point to get rid of the
3 active_* keys, because they are misleading and basically useless.

The notion of active_* exists, but it is something else: when you
are in a form view (let's say the form of a partner) and you open
its opportunities (by clicking on the stat button), the list view
of opportunies shows up and in the context, there're 3 keys
active_*, referring to the record from which we came. One can
easily access those information with context.get("active_*"), in
python or in view archs.

However, almost all `active_id` found in archs were actually used
to refer to the id of the current record. Indeed, for now, in the
evaluation context of a record, the value of the `active_id` key is
always the id of the record. So this commit adapts them to
directly use `id` instead. There was no use of active_ids, and
a single use of active_model which was removed (active_model is
the res_model of the view, so it isn't really necessary).

This commit doesn't drop the support of those keys, it deprecates
them. They will be removed for v18. A warning will be displayed if
they are used.

closes odoo/odoo#136665

Related: odoo/enterprise#47917
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-10-10 00:54:04 +00:00
Jorge Pinna Puissant ef424a9dc2 [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/odoo#137517

Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:53 +00:00
Ivan Rasputin 1711e91257 [IMP] core: test exporting of translation files
Static qweb files are not tested for syntax errors.
This commits adds a hacky way to do this job: we test exporting of translation files.

Inspired by the following PRs, that were made as a response for errors caught by sentry

* https://github.com/odoo/enterprise/pull/43975
* https://github.com/odoo/odoo/pull/128221

closes odoo/odoo#128445

Related: odoo/enterprise#44074
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-15 09:22:04 +00:00
FrancoisGe c0b6322e25 [IMP] web: add alwaysApply in useDebounce
The purpose of this commit is to add the alwaysApply option to useDebounced.
This option is used to force execution of the callBack if the debounced
function has been called and is still not resolved when the component is destroyed.

closes odoo/odoo#134096

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-04 17:10:09 +00:00
Elisabeth Dickinson bd755e6ac6 [FIX] fleet, hr_*: fix many2one_avatar_user occurrences
*: attendance, expense, holidays

In commit d832fcf, the
`many2one_avatar_user` widget has been added in various places,
sometimes repeating the avatar where it isn't needed.

Some occurrences come next to the avatar's name which is called via a
`t-esc`, but the option `display_avatar_name` is available and has been
used instead.

task-3470340
part of task-3326263

closes odoo/odoo#133150

X-original-commit: 0b268a9e3c31d5b57bb9f60ea93153289d02ddf9
Related: odoo/enterprise#46286
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-08-30 09:25:10 +00:00
Prakash Prajapati 3c75588e2d [FIX] hr_attendance: open proper view in attendance report
Steps:
- Installed hr_attendance app
- Open attendance app and go to report menu
- Click on any cell

Issue-
When we click on the graph or pivot cell of the attendance report, the
attendance report tree opens instead of the attendance tree.

Why issue occurred?
In this commit the openView function has moved from (Graph/Pivot) Controller to
Renderer and in hr_attendance openView is in Controller so the issue has arisen.
Commit-https://github.com/odoo/odoo/commit/c8ca9da7bcee2c122a9d6cf8cda89f02823ba42d#diff-4e5bfd019e8d595efdf999a6b56fcb45a3127bb8bd7bb960161710bcfcd83687

task-3420173

closes odoo/odoo#132805

X-original-commit: 14504c0f4576ae76b095d3ea5f00f72c077f532f
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Prakash Prajapati (ppr) <ppr@odoo.com>
2023-08-23 14:43:55 +02:00
niyasraphy fe593090cc [FIX] hr_attendance: error in log on exporting translation
before this commit, on exporting the translation of
hr_attendance module shows warning in the log

* XML declaration allowed only at the start of the document
* Opening and ending tag mismatch: t line 4 and templates

after this commit, no warning/error will be shown
in log

closes odoo/odoo#132530

X-original-commit: def572bc161540dc223e78805a8152b7418f5a28
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-21 19:57:36 +02:00
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :

<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>

task-3292454

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Arnold Moyaux 863cfc5ff1 [IMP] hr_attendance: remove pin for admin
Shop floor app is base on employee. When hr_attendance is install,
it will lock the app until the user unlock it with the pin. For
demo purpose it's blocking the flow and it's not intuitive

closes odoo/odoo#131707

X-original-commit: b4ec72d0079ae43ace40dbc9ec0fd1b686e125a4
Related: odoo/enterprise#45699
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-14 13:41:56 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Louis Wicket (wil) f1722c7334 [IMP] *: unify sprintf and gettext
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.

closes odoo/odoo#123932

Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-10 18:14:04 +02:00
Ahmed Mohamed 3ffba6ba1f [FIX] hr_attendance: fix attendance report query
closes odoo/odoo#131289

X-original-commit: 7a55fb51ba68c5d8fc01ef5a70968bee389ffe9b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-09 11:51:56 +02:00
Melanie Peyrat (MEPE)anddasz b3be3af61c [ADD] hr_homeworking: add homeworking
Users and employees can now define their usual worklocation
for a day of the week aswell as define unusual ones from the
calendar app. The worklocation is then displayed in the calendar
in two different ways: when only one person is selected, there
is a circle with an icon in it, and a ray that extends to the right
if the person is at the same location for multiple days. If there
are multiple persons selected there is no ray, instead the circles
are grouped by location type and colored accordingly to the filters
in the left panel.

closes odoo/odoo#129585

Task: 3060685
X-original-commit: c74ac3f698d4ea4c9b7a5e060fba4cf77cc9a6d7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Co-authored-by: dasz <dasz@odoo.com>
2023-07-25 21:22:46 +02:00
mano-odoo 3df4eaff92 [FIX] *: minor settings spacing issues
The purpose of this commit is to review the responsiveness and spacing
of some settings that were visually broken.

The nested checkboxes were growing too much on smaller screens
making the content overflow.

This commit adapts these checkboxes settings to make them more readable
and consistent.

It also review the input that overflow similarly to nested checkboxes
such as the count of extra hours in attendances settings.

In 16.2 some SCSS was added to control field widget spacing on mobile,
however it was breaking the layout for the `.o_boolean_fields`.

Task-3113372

closes odoo/odoo#126347

X-original-commit: 80aa03e86bd47e6349a5fa69397857fdf6a8cc0b
Related: odoo/enterprise#43142
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-07-17 19:26:03 +02:00
Thomas Lefebvre (thle) e937d480d0 [FIX] hr_attendance: correct timezone in report
Steps to reproduce:
-------------------
- with timezone "Europe/Brussels" (UTC +02:00);
- create an attendance that starts at 1:00 AM;
- go to pivot view in Reporting tab.

Issue:
------
Attendance appears to be a day early.

Cause:
------
When converting a date to UTC for database storage,
it's possible that the date may change
(due to a large offset or hours close to 00:00).
Therefore, when we use `CAST(check_in as DATE)`,
we will keep the date that has potentially changed.

Solution:
---------
Use postgresql's `at time zone <timezone_name>`
statement to convert the recorded attendance
to UTC in the employee's timezone.

Note:
-----
On an employee's form view, the "Working Hours" field
(`resource_calendar_id`) is required.
The `resource_calendar_id` field is a Many to One
to the `resource.calendar` model.
The `resource.calendar` model contains
the `tz` field, which is required.

As a result, it will always be possible to find
an employee's timezone via his calendar resource.

Hypothesis:
-----------
Attendances are created using the browser's timezone.
It is normal to think that the employee's
calendar timezone is the same as his browser timezone.

opw-3370874

closes odoo/odoo#127989

X-original-commit: 8ac7e19ce94685438ab16f052c6550e86e692a75
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-07-10 21:25:51 +02:00
prye-odoo 7694f012cd [FIX] *: handle unlink/create access for reporting views
*: account,event_sale,fleet,hr_attendance,hr_contract,hr_timesheet,
im_livechat,point_of_sale,project

When the user tries to delete a record(s) from the reporting views,  this
traceback will be generated.

Steps to produce (Example only):

- Settings > Technical > Actions > Window Actions
- Search for the Work Entries Analysis. Open it and add a 'tree' as view_mode
in that action.
- Payroll > Reporting > Work Entries Analysis menu and select the tree view.
- Select one or more records and try to delete these records.

Error: A traceback appears: "cannot delete from view "hr_work_entry_report"

Handled the unlink access by using their model access of the reporting models.
similarly, this issue resolves in other reporting models.

Sentry-3975590063

closes odoo/odoo#125697

X-original-commit: 209d8c76ce9bb1d6cc7084d55b5623e939af8fbc
Related: odoo/enterprise#42825
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-07-03 21:55:48 +02:00
Rémy Voet (ryv) c5cb357d90 [IMP] *: add dependencies to display_name field
The previous commit introduced an optimization to reduce the number of
queries and fields fetched when we call `name_search`. But it works much
better when the dependencies of `display_name` contain field names used
in the calculation (on the same record/model).

Then, to improve the performance and the cache coherency, add `depends`
and `depends_context` depending on the custom `_compute_display_name`.
Add only the first level of dependencies (never traverse relational
field) because only these have a positive impact on the previous
optimization and the cost is very low (see `modified`).
About `depends_context`, we don't include `lang` because (when `_` is
used by example) it is unlikely to get the same display_name in the same
request with two different lang.

closes odoo/odoo#122085

Related: odoo/documentation#4639
Related: odoo/enterprise#42599
Related: odoo/upgrade#4780
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-06-28 17:41:19 +02:00
Rémy Voet (ryv) 3c62ca1eb9 [REM] core: remove name_get API
Rationale
=========

Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).

To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)

Changes
=======

- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).

Part-of: odoo/odoo#122085
2023-06-28 17:41:19 +02:00
althaf shaik 2fdefd0f21 [FIX] hr_attendance: restrict to compute worked hours without employee
This traceback raises when user not selected 'Employee' and only selecting
'Check In' and 'Check Out', while creating a new attendance.

To reproduce the issue:

1) Install hr_attendance
2) Open Attendance and create a new record
3) Give values to only 'Check In' and 'Check Out'

Error:  "AttributeError: 'bool' object has no attribute 'upper'" appears.

On '_compute_worked_hours' method calendar variable is getting value from
employee_id and that calendar timezone is used to get timezone.

https://github.com/odoo/odoo/blob/937d207028ab9bc1d3d332dc6dfe25f0de045026/addons/hr_attendance/models/hr_attendance.py#L50-L60

Therefore in the above use case, when triggering the compute method,
because of 'calendar' is depending on 'employee_id' and when
employee is not selected, it will leads to the above traceback.

Sentry-4274226351

closes odoo/odoo#126465

X-original-commit: 31491e40d2505c03d76e6c802435ad1dafa71c52
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-27 09:29:30 +02:00
Wolfgang Taferner 080c2fc574 [IMP] hr_*_attendance: leave in terms of working time not respected
As the leave is deducted from the needed time to work
in case for example Home Office which is configured as
working time (other) is handled like a real leave (absence)
which will lead to an extensive overtime instead the difference
to the work entry defining the work time.

A domain clearing out this missing link and variation
cleans up this misalignment and therefore overtime will
be computed correctly.

closes odoo/odoo#126373

X-original-commit: 02a679d6ab7db49c8338471e5fc85c1141f8e877
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
2023-06-26 21:10:37 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
dasz c68e4606f8 [IMP] hr,hr_presence,hr_attendance,hr_holidays: move presence computation to employee_base
Employee presence is not a sensitive data and should be available for all db users
this commit moves the computations from attendance, holidays and hr_presence to the
employee_base model, which is how it was originaly made in the hr module. This way
the presence marker does not depend on the user's hr rights

closes odoo/odoo#118437

Task: 3267790
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 15:53:54 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
Thomas Lefebvre (thle) bc2d796dbc [FIX] hr_attendance: prevent the edition of employee_id
Issue:
A user has write access rights to modify his own attendances.
However, he can modify the `employee_id` field.
This can cause attendances to be moved to other employees.

opw-3280850

closes odoo/odoo#120632

X-original-commit: 1c25a9b964e9e2acf9d431897e83cf72ecdca1cb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-05 14:55:00 +02:00
dasz 1b8b35e216 [FIX] hr_attendance: account for lunch break in overtime calculation
Remove lunch hours from work intervals so that overtime is not calculated when it's not due
tests adapted to take into account lunch period

task 3217799

closes odoo/odoo#120455

X-original-commit: 97c052432a25a1461de23fd8ab0c73ffe9b084ff
Related: odoo/enterprise#40677
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-04 08:56:12 +02:00
Marc Durepos c999f1ec14 [FIX] hr_attendance: prevent error caused by pre-fetching non-public employee fields
Fixes a situation where users who are part of the Attendances Officer (or Manager) group but
  without access to private employee data would see the following error when trying to book time
  off.

  `ValueError: Invalid field 'last_check_in' on model 'hr.employee.public'`

  Other instances of the same ValueError were observed by managers trying to approve employee leave
  and employee expenses.

  As per hr/models/hr_employee.py:22-26 fields not available on hr.employee.public should have
  groups='hr.group_hr_user' and this was not the case in hr_attendance.

closes odoo/odoo#120324

X-original-commit: ff4e7d6a414097d000e62825cf43425ea14bd77e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-03 08:38:13 +02:00
Victor Feyens f4ea6d3226 [FIX] *: strict api for main orm methods
Enforce strict types for returned values for
* create
* write
* unlink
* default_get

to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.

closes odoo/odoo#116809

Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-25 15:20:43 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Denis Ledoux 1480f2fad5 [FIX] *: session.modified has been renamed is_dirty
Since odoo/odoo@04e972660b
The session `modified` flag has been renamed `is_dirty`.

However, it has not been renamed correctly in these
three different places.

The goal to set `modified` at this three places
is to force the session to be saved,
for instance because a mutable (a list or a dict)
contained in the session was modified,
but not the dict of the session itself,
therefore `modified` is not flagged automatically.

As the flag `modified` has not been renamed to `is_dirty`,
a key/value `modified: True` was actually assigned to the
session dict, and saved in file. The behavior
to save the session in these three places was kept,
as one key/value of the session has been changed,
but by the way to assign a new value in the session file,
which is not ideal.

It's better to assign the correct flag to avoid
setting a new key/value in the session for no reason.

closes odoo/odoo#118719

X-original-commit: b6f4a27f2d95d5bc5510f4da50132ab66d8c86aa
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-04-17 11:47:15 +02:00
Kevin Baptiste 749a73ecff [FIX] hr_attendance: allow kiosk to use My Attendances
The Check In / Check Out menu would show that the user is not linked
to an employee because it was trying to read on `hr.employee` and not
`hr.employee.public`.

opw-3268217

closes odoo/odoo#118498

X-original-commit: 233a185362f2bc3243187f1f0b740ee5b154f039
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-13 17:57:58 +02:00
dasz d832fcf0ce [IMP] hr_*: standardise UI displaying of employees accross all hr apps by using the widget avatar_user
Appraisal: done, fix  chat widget issue
Employee: done, removed unused view
Attendance: done
Expense: done
Time Off: done
Fleet: done
Payroll: done
Referall: done
Lunch: done

task-313272

closes odoo/odoo#111817

Related: odoo/enterprise#36663
Related: odoo/upgrade#4310
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-13 15:25:46 +02:00
FrancoisGe 0ada8e8edb [FIX] hr_attendance: empty lines at the beginning of an xml file
Having one or more blank lines at the beginning of an xml file can
cause problems when parsing the xml.

closes odoo/odoo#116624

X-original-commit: aa400dbec834e7229f0f8d22298db995a490379b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-27 09:40:01 +02:00
Kevin Baptiste 7fbfb36285 [FIX] hr_attendance: show employee's picture
The pictures of the employees were no longer showing in the kiosk mode
as it tried to read on `hr.employee` instead of the `hr.employee.public`
model.

closes odoo/odoo#115950

X-original-commit: 3794bfed7d474f470f6e401d697d8c36ad620820
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-21 09:36:15 +01:00
Martin Trigaux 1be5eae8ef [I18N] *: remove nl_BE files
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.

closes odoo/odoo#115845

X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-20 16:51:30 +01:00
sofiagvaladze 630f13fb1d [IMP] *: manage smartbuttons on employee form view
*: hr_attendance,hr_skills_slides,hr_timesheet,hr_work_entry

Don't show smartbuttons that lead to a view without records

task - 3134772

closes odoo/odoo#113105

Related: odoo/enterprise#37274
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-20 11:20:38 +01:00
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00