Commit Graph
167265 Commits
Author SHA1 Message Date
Bruno Boi 003609b8d2 [IMP] web: soften the UI active element takeover
**Good to know first**
The UI active element takership system is
directly bound to the focus trap mechanism.

**Before this commit**
If an element become the UI active element but has no
tabable elements in its tree, we force its tabindex
to the -1 value to make it programmatically focusable.
That way we ensure the focus is effectively trapped.

**After this commit**
The tabindex is no more forced at all.
Instead, if we detect that there are no tabable elements
inside the UI active element candidate, it simply does not
become the UI active element.
In other words, this commit kind of weakens the focus trap.
But this is perfectly fine for our use cases, i.e.:
- dialogs always have at least one focusable button (close, ok...)
- the website wysiwyg-adapter has a ton of focusable elements

**Why ?**
We need this change to permit other UI pieces to make use of
the active element takeover mechanism, i.e. popovers.

Part-of: odoo/odoo#140885
2023-11-04 16:38:53 +00:00
Bruno Boi bf2866a27c [FIX] web: trapfocus if first/last tabable changes
**Before this commit**
If a UI active element taker has its first or last
tabable element rendered conditionnaly, the focus trap mechanism will
not work properly.

**After this commit**
It works as intended.

Part-of: odoo/odoo#140885
2023-11-04 16:38:53 +00:00
Romain Estievenart eb399b5251 [FIX] website: Missing border-0 on AutoCompleteWithPages container
There is a visual "glitch" in the website builder, there is a 2px white
bar (2x1px border) at the bottom of the screen in edit mode.

Steps to reproduce:

* Enter edit mode on a page
* Drag & drop a few snippets to have a scrollbar
  => The bottom white bar appears

closes odoo/odoo#140979

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-11-04 12:21:46 +00:00
Romain Estievenart 969e83c2b3 [FIX] website: AutoCompleteWithPages doesn't work correctly on Safari.
Since we remove jQuery UI[1], the owl component `AutoCompleteWithPages`
doesn't work correctly on Safari.

When we clicked on the `AutoCompleteWithPages` input the code in the
`AutoComplete` component `onFocus` make a selection on the input of the
`AutoComplete` component and not on the `AutoCompleteWithPages` input
this make a unwanted effect such as blur the clicked input and focus
the other input. This commit fixes that.

Steps to reproduce:

* With Safari, open the `Website` app
* Click on `Site` > `Edit Menu` > `Add Menu Item`
* You can't type in the url field and if you spam click on its.
  Sometimes, it produces a browser crashes

Links

[1]: https://github.com/odoo/odoo/commit/99f5ae32d3ee4a3dcc75e31ad0a88f42d6ce3589

Part-of: odoo/odoo#140979
2023-11-04 12:21:46 +00:00
Rahul Prajapati 45488b9277 [FIX] im_livechat: rating messages in livechat sessions demo data
Before this commit:

Message type of rating messages for Livechat Session in demo data was not set,
which led it to set default type `email`.
Which would lead to display the `Show/hide original email` button.

After this commit:

Set `message_type` as `notification`.

task-3502745

closes odoo/odoo#140975

X-original-commit: 1b33e019ba7cf9b1dc272a0fedc1b8534b9e8867
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-04 11:17:00 +00:00
Romeo Fragomeli f8005bddc7 [FIX] web: fix back/clear buttons in modal for small screen
This commit forces the color of all buttons in the header to have a
better-look consistency.

Steps to reproduce:
* Open Odoo on small screen
* Go to Sale
* Create a new SO
* Click on customer field to open the Kanban view => BUG
  the clear button is not visible (enterprise)

closes odoo/odoo#141040

Forward-port-of: #50123
X-original-commit: aa748820d06ddd84465c404ce158e882307dbda6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-11-04 09:05:40 +00:00
Kartik Chavda 05aa12bd4e [FIX] sale_timesheet: fix threshold ratio for unit
Before this commit service threshold value for 'unit'
unit of measure display (1 unit = 8.00 hours) but since
https://github.com/odoo/odoo/pull/99785 PR we take 1
unit equals to 1 hours not 8 hours.

This commit display (1 unit = 1.00 hour) to dispay proper
value according to calculation.

task-3282848

closes odoo/odoo#141039

X-original-commit: d27209ef9bc4f57a8f7401e5271915763df5eeb1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-04 09:05:38 +00:00
Brieuc-brd 3a76a9326e [FIX] website: adapt offcanvas menu height on mobile
Prior to this commit, on mobile, we couldn't see the entire offcanvas
menu because the browser's UI was hidding part of it.

To fix that, this commit adapts the height of the offcanvas menu using
`dvh` unit.

task-3582657

closes odoo/odoo#141032

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-04 09:05:37 +00:00
Chong Wang (cwg) 7b55483e23 [FIX] core: fix typo for ormcache
fix typo in #119813 for ormcache

closes odoo/odoo#141008

X-original-commit: a242da98b533f5d6c11c68f9d973a26a47f17074
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Chong Wang (cwg) <cwg@odoo.com>
2023-11-04 09:05:36 +00:00
Maximilien (malb) 44c5c0ea35 [IMP] account_reports: composite reports
The goal of this pr is to add a tooltip to the use_sections field.

closes odoo/odoo#140973

Task: 3569038
Related: odoo/enterprise#50142
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-11-04 06:43:21 +00:00
aliya 474af642e7 [FIX] base_import: pass resIds to exit
When we're exiting the import view, we need to have ids of the imported records
to confirm that the import was successful and to filter on import records if
needed.
This commit adds an optional resIds parameter.

task-3549609

closes odoo/odoo#140969

X-original-commit: bb968c5e197e37c0391209420655a777821aa3f1
Related: odoo/enterprise#50141
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-11-04 06:43:20 +00:00
Mathieu Duckerts-Antoine d30729c6cb [FIX] web: condtion tree: keep expressions
Before this fix, a condition of the form (field_name, "in", expr) would
be "stringified" in such a way that expr would be wrapped in a list, e.g.
we would get by expressionFromTree the expression
field_name in [expr]
Here we prefer to keep expr as it is since we have no information on its
type at evaluation. That is we transform the above condition into
field_name in expr

closes odoo/odoo#140966

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-11-04 06:43:19 +00:00
Mathieu Duckerts-Antoine 04753f4d42 [REF] web: use evaluateBooleanExpr in a test
Part-of: odoo/odoo#140966
2023-11-04 06:43:19 +00:00
jugj-odoo 604662bc48 [FIX] hr_skills: Fix CV alignement
task-3582107

closes odoo/odoo#140962

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 06:43:18 +00:00
Walid 9548218445 [FIX] purchase: wrong list price UoM
Steps to reproduce:
- Install Sale and Purchase and enable UoM
- Change 'Acoustic bloc screen' purchase UoM to dozen
- Create a PO for that product
- Access the product page from PO line
- Wrong Sales price

Bug:
the jsonrpc to read product data needlesslt sends the UoM in the context
which leads to the sales price being updated by _compute_product_lst_price

Fix:
remove UoM from procut context as it is not necessary

opw-3434574

closes odoo/odoo#140957

X-original-commit: fe04d61a886fa7b461ebf9bda2d7479fb69281cd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-04 06:43:17 +00:00
Bruno Boi 252b8f0b90 [FIX] web: fix overlaping overlays
**Before this commit**
Open some popover then a dialog.
The popover appears in front on the dialog.

Examples:
- Calendar > Click an event (popover opens) > Open command palette
- Open a facet domain editor dialog in any app, then open any model
  field selector popover and open the command palette

**After this commit**
Each first-level child of the overlay container
starts with the same z-index and with a value
that is greater than the higher value we can find
in the bootstrap z-index master list.
This solves the aforementioned overlaping issues.

closes odoo/odoo#140953

X-original-commit: 9682cfa174fb39ec9d9874951ea9ee2884058d96
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-11-04 06:43:16 +00:00
Xavier Bol (xbo) a7d5a4b130 [FIX] web_hierarchy: detect cyclic before altering the parent field
Before this commit, the user could drag the first employee displayed
in the gantt and drop him on one of his subordinate. By doing that,
the manager of that employee will be his subordinate and a cyclic
will occur and no record will appear when the org chart will be
reloaded because no employee will have no manager set.

This commit fixes the issue by improving the cyclic detection when
the user uses the drag and drop feature. That is, the action will be
blocking when the system detects the user tries to drag and drop a manager
to one of his subordinates.

closes odoo/odoo#140951

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 06:43:15 +00:00
Xavier Bol (xbo) d25a81d814 [FIX] web_hierarchy,hr_org_chart: move specific changes in hr_org_chart
Before this commit, some recent changes altered the generic view for
Org Chart view of `hr.employee` model. The problem is those changes
also altered the other hierarchy view used in others models.

This commit moves the recent specific changes to hierarchy view
of `hr.employee` model to be sure to alter only the org chart view
of that model.

Part-of: odoo/odoo#140951
2023-11-04 06:43:15 +00:00
MerlinGuillaume 62f49331ba [FIX] project: add name field in project list view for order
When we add a many2many field related to Project, an error is thrown
when we add 2 or more projects

Steps to reproduce:
1. Install CRM, Project and Studio
2. Go to CRM and open any quotation
3. Trigger Studio
4. Add a many2many field related to the Project model
5. Close Studio
6. On the CRM form, click on Add a line and select 2 projects, the 2
   projects must have the same sequence (new projects will have a
   sequence of 10)
7. An error is thrown

Problem:
The "name" field used in the order of the list view for project was not
present in the view so there was an error when trying to sort the list
by this field

opw-3526101

closes odoo/odoo#140950

X-original-commit: 334e6fc41725fe0bd7e6bae8e2153c6abedc71cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-11-04 06:43:14 +00:00
vlst 2b6b003a4a [IMP] point_of_sale: add tax letter
In this commit we adjust the pos module such that, in the
corresponding enterprise commit, we can more easily add the
tax letters corresponding to each orderline in the receipt.

closes odoo/odoo#140974

Related: odoo/enterprise#50134
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-11-04 06:43:13 +00:00
Lucas Lefèvre (lul) c503d1895d [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/3184728ea [REL] 17.0.2
https://github.com/odoo/o-spreadsheet/commit/74e28e1c9 [FIX] evaluation: fix incorrect invalidation

closes odoo/odoo#140935

Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
2023-11-04 06:43:11 +00:00
Gauthier Wala (gawa) 100a8c0f8f [FIX] account: activate studio when seeing invoices
To reproduce:
- Install studio and account.
- Invoicing/Accounting, menu Customer > Invoices
- Activate kanban view
- Put filter "My Invoices"
- Enter studio mode

=> There is a traceback in the logs, even if not shown in the view.

When entering studio in kanban, a card with default values is created.
The problem was that the journal wasn't computed, and so, broke
the onchange_partner_id function
It was because move_type, while being in the default, wasn't in the view,
and so wasn't in the values given by the js.

closes odoo/odoo#140927

X-original-commit: 629176269614467c637543b11fc556a63ee70c5b
Signed-off-by: William André (wan) <wan@odoo.com>
2023-11-04 06:43:10 +00:00
roen-odoo 7ee59307ff [FIX] pos_restaurant: make sure tip amount is formatted correctly
Current behavior:
When the user language uses a different decimal separator than the
"." (dot), the tip amount is not formatted correctly and the amount is
incorrect. e.g. 1.5 is interpreted as 15.0

Steps to reproduce:
- Change the current language decimal separator to "," (comma) and
  thousand separator to "." (dot)
- Open restaurant (make sure tip after payment is enabled)
- Add a product to the order
- Pay by bank
- Click on tip 20%
- The tip amount is incorrect (too high)

opw-3525033

closes odoo/odoo#140926

X-original-commit: f0cd80fbb55e0f234800c6be4696ff8e1533978b
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-04 06:43:09 +00:00
Manushi Shah (mash) 62eeabaa43 [FIX] hr_timesheet: prevent name overflow in portal view
Steps:
- Open Settings > Users
- Change the name of the user by typing it multiple times
- Go to the portal view of the website
- Among the Documents select Task > select a task where our user is set as an
employee

Issue:
- When that particular task is chosen, under the Timesheets, the name is found
repeatedly in the table.

Cause:
- The text is not truncated due to which the name overflows.

Fix:
- adding a class 'o_portal_my_doc_table' in the table which helps to truncate
the text

closes odoo/odoo#140922

Task: 3383519
X-original-commit: b7952e2cf649584906ddab57386b711e06de9ba2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-04 06:43:08 +00:00
Lina (liew) 3eba3484f3 [IMP] iap: redirect to view my services
Description of the issue/feature this PR addresses:
The "View My Services" button of the widget should open
the IAP accounts tree view, just as the main "View My Services"
button of the general settings.

Current behavior before PR:
View my services widget redirected to iap website

Desired behavior after PR is merged:
Updated the widget to redirect to tree view of services

task-3580190

closes odoo/odoo#140904

Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-11-04 06:43:06 +00:00
Xavier Morel 2143ae7a9f [IMP] core: skip on marking tour as failed if it's already failed
If the web client gets into a bad state and piles on errors (or
exceptions) this leads to a mess with hundreds of kilobytes of
warnings being logged as we try to set an already failed tour to
failed (and also take screenshots), as in
http://runbot142.odoo.com/runbot/static/build/53098209-master/logs/test_only.txt

Also update `has_failure` to directly depend on an exception being
set, as that should be a more reliable indicator. And much like the
case of an error log skip trying to set the tour to failed in
`_set_exception` if it's already failed. Although in that case do log
the traceback as an `error`.

closes odoo/odoo#140879

X-original-commit: 96c501036a6dcb216e82e0dfa42b59a9b917d742
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-11-04 05:35:42 +00:00
Maximilien (malb) 3bc350a0e0 [IMP] account: swap date and invoice_date
We currently have two date fields, "date" and "invoice_date". Before this pr,
the "date" column was before the "invoice_date" field. We think it's more
logical to have "invoice_date" before the other, since it's the legal date.

What has been done:
- Swap in the tree view the two columns
- Swap in the search view the two columns

closes odoo/odoo#140878

Related: odoo/enterprise#50107
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-11-04 05:35:40 +00:00
David Monnom (moda) 1da277f692 [FIX] pos_self_order: decode url when generating image qr code
decode url when generating image qr code

closes odoo/odoo#140870

Related: odoo/enterprise#50102
Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-11-04 05:35:38 +00:00
David Monnom (moda) cf699b7f64 [IMP] pos_restaurant: add compo demo data
Add a combo menu in demo data

Part-of: odoo/odoo#140870
2023-11-04 05:35:38 +00:00
David Monnom (moda) e3e9ca1933 [IMP] pos_self_order: improve self with large-test feedback
- Add loading when rpc in progress.
- Auto focus input search when button clicked

Part-of: odoo/odoo#140870
2023-11-04 05:35:38 +00:00
Ritika Rathore 2b2d0e8b7e [FIX] web: fix color alignment in the kanban view
Steps:
- Install Field Service
- Open the Field Service module
- Click on the configuration
- Go to the Worksheet Template
- Now go to the kanban view
- In view, Click on dropdown menu of any card

Issue:
- In kanban view, when we are viewing in dropdown menu colors are not correctly
 centered.

Fix:
- Added in kanban color picker mb-0 & ms-2 for margin space from bottom & left.

Task-3508241

closes odoo/odoo#140807

X-original-commit: 97e90710f5f2e300131df442bba833a5e7ece29e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-04 04:29:35 +00:00
Julien Carion (juca) 04a67936d5 [FIX] web: add shortcut to cog menu
This commit adds the "alt+u" shortcut to open the cog menu in order
to match with the behavior of the actions menu.

task-3560446

closes odoo/odoo#140798

X-original-commit: fbf245cb81453e1fedbfd4649a8284546da44ffb
Related: odoo/enterprise#50074
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-04 04:29:34 +00:00
Sébastien Theys 221b11e7ac [FIX] mail: lazy load message out of focus sound
There is no reason to load this sound until it should be played.

closes odoo/odoo#140900

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-04 03:25:48 +00:00
Loukas Wets (lowe) df53cf7fd0 [FIX] pos, pos_restaurant: patched order setup signature
Prior to this commit, the patched setup functions of Order did not match
the original signature.

closes odoo/odoo#140893

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-11-04 03:25:46 +00:00
Joseph Caburnay 03f104d184 [FIX] point_of_sale: category selector images
We now only show the category images when:
- there is at least one loaded category with image,
- height of the products widget is at least 720px,
- and, ui is not small (note pos override on ui_service).

closes odoo/odoo#140891

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-11-04 03:25:45 +00:00
Joseph Caburnay b91aea2351 [FIX] point_of_sale: proper style for button to open input
Part-of: odoo/odoo#140891
2023-11-04 03:25:45 +00:00
Joseph Caburnay 5b587b2223 [FIX] point_of_sale: reserve space for category caret
Part-of: odoo/odoo#140891
2023-11-04 03:25:45 +00:00
Dossogne Bertrand 4edba45a51 [FIX] hr_holidays: fix accrual leaves display
Before this commit, leaves linked to accrual allocations
taken in the future would still be takin into account in the display,
resulting in a warning if the leave excessed the amount that the
employee currently had allocated.
This leave removes any future leave to be taken into account if
the leave type has any accrual allocation set for the employee.

closes odoo/odoo#140888

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 03:25:44 +00:00
Dossogne Bertrand 0a9e83dfd8 [FIX] hr_holidays: fix accrual plan level type compute
Before this commit, the `added_value_type` field wasn't properly computed
in the `hr.accrual.plan.level` model resulting in some issues upon
the creation of a second level.

closes odoo/odoo#140887

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 03:25:43 +00:00
Dossogne Bertrand 22e4d3f715 [FIX] hr_holidays: fix various bugs
This commits fixes 3 issues:
- Traceback on the creation of a new leave:
If the french holidays l10n is installed, creating a new leave
was impossible due to an override of a method was not adapted to
a change on the base method `_get_duration`

- Impossibility to create a leave for more than 1 employee:
the validity check was only done for the employee set in employee_id,
which was resulting in a traceback if the leave was created for
more than one employee.

- Wrong error message:
Before this commit, the error message given to the employee if
the leave isn't possible to create was directed to an employee creating
is own leave. As this is not the only way to create a leave, the message
has been adapted to reflect every situation.

closes odoo/odoo#140886

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 03:25:42 +00:00
Tiffany Chang (tic) ef75711fb2 [FIX] mrp: clean bom overview report
Does 2 things:
- ensure that the "free_qty" doesn't display a negative value (=>
  consistent with MO overview + avoids neg "Ready to Produce" values)
- ensure that showOptions.availabilities is always a Boolean and never
  "undefined" (=> avoid traceback when opening overview while in debug
  mode)

closes odoo/odoo#140767

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-11-04 00:38:33 +00:00
Tiffany Chang (tic) 79ab83e732 [FIX] mrp: correctly calculate producible_qty Ready in MO Overview
Previous to this commit, the qty reserved was only considering the
currently reserved quantities in the MO, not the ones calculated and
displayed in the MO Overview (i.e. including the quantities reserved in
the picking during 2 step mrp). This would lead to showing reserved
quantities but a "Not Ready" status, which is confusing and
inconsistent.

Now we pass the calculated component quantities to the method that
calculates this state and ensure the calculation is consistent.

Steps to reproduce:
- enable 2 or 3 step mrp
- create an MO with a component that is in stock at the stock loc
- confirm MO and open "Overview"

Also change "Quantity" back to "Reserved" in the pdf version of the MO
Overview. This was a mistake change since this column name already
exists and "Reserved" will be hopefully less confusing for users.

Part-of: odoo/odoo#140767
2023-11-04 00:38:33 +00:00
Julien Carion (juca) 924a797a3b [FIX] web: domain field: foldable invalid domain
This commit fixes an issue with the domain field where a traceback would
be launched when an invalid domain is received. It also changes how
invalid domains are displayed in foldable domain fields so that only the
content of the domain selector component is displayed in this case.

closes odoo/odoo#140719

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-04 00:38:32 +00:00
Julien Carion (juca) 058117c333 [FIX] web: domain field: validate domain when edited in debug
This commit changes the behavior of the domain field such that it
performs a quick validation of the domain after it has been edited in
the debug input. This solves an issue where the isValid state was not
properly updated after debug input edition.

Part-of: odoo/odoo#140719
2023-11-04 00:38:32 +00:00
Rémi Rahir (rar) d11845e322 [IMP] spreadsheet: Improve ODOO.PIVOT.TABLE hook value
In order to identify an ODOO.PIVOT.TABLE formula cell, we set the
display name of the pivot as the evaluated value of the cell containing
the formula.

closes odoo/odoo#140674

Task: 3580153
Related: odoo/enterprise#50003
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-04 00:38:29 +00:00
snd 7c45aca3be [FIX] stock: remove old lines when generating serials
When generating serial numbers or importing them, the old lines are still present
and the quantity done gets raised by the quantity of the added lines. This forces
the user to manually remove each old line one by one.

This ensures that old lines are removed by the amount of newly created lines.

closes odoo/odoo#140618

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-04 00:38:26 +00:00
Abderraouf Ghrissi (abgh) e9225d52af [FIX] project_timesheet_holidays: generate timesheets from leaves
Description of the bug:
timesheets are not being generated when validating time off

Steps to reproduce:
- activate Time Off setting
- timeoff type form: choose a project and a task
- create and validate a leave request with the type modified in
previous step
- no timesheets added

Source:
in task 3279188, leave validation function was replaced from
_timesheet_create_lines to _validate_leave_request, this one
checks if the company of the selected project of the leave type is
equal to the company of the type or env.company.
if not, we don't generate timesheets even if the project/task are set.

Solution:
leave type form:
- generate timesheets have a True default value
- in the absence of a company, we display the 'generate timesheets'
(in debug mode) and hide the project/task fields.
=> when the company is removed, project/task will be removed thanks
to the compute method, you can only change them manually if the company
is set.

When generating timesheets from leave validation, we refer to the project/task
set in the company of the employee if no company is set in the leave type.

task-3576751

closes odoo/odoo#140383

X-original-commit: eccefab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-04 00:38:26 +00:00
xO-Tx 9cd1b671f4 [IMP] website, web_editor: integrate new text highlights designs
task-3285817

closes odoo/odoo#140372

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-04 00:38:25 +00:00
Leonardo Pavan Rocha 8ad097d363 [FIX] hr_homeworking: fix locale week name in set_employee_location
After the rework of hr_homeworking, a traceback started occurring if the odoo
server was running in an environment with a different locale. Since
`.strftime("%A")` is a localized method, it wouldn't return the week name in
english. This would cause a traceback because we would try to access fields
that don't exist (e.g. jeudi_location_id). This commit changes the approach to
get the weekday number and uses an array to access the correct field name.

task-3570053

closes odoo/odoo#139736

Related: odoo/enterprise#49570
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-04 00:38:21 +00:00
Leonardo Pavan Rocha ff2e27afde [FIX] hr_homeworking: don't show work location if not location set
In homeworking, we currently show the work location as false if a location is
not set. This commit fixes this issue by checking if the location is set before
rendering.

task-3570053

Part-of: odoo/odoo#139736
2023-11-04 00:38:21 +00:00