Commit Graph
155785 Commits
Author SHA1 Message Date
Kevin Baptiste 7017150d7d [FIX] hr_expense: correctly align fields
The fields were not correctly aligned.

task-3040395

closes odoo/odoo#104195

X-original-commit: f5cec113222db06f427f17a0170d45e2022b5b39
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-27 10:37:37 +02:00
Philippe Wauthy 6b4f2711d5 [FIX] hr(_holidays)(_attendance): display the presence bubble
The presence bubble on the employee form is hidden while it is shown on the kanban view of the employees.
This commit fixes the presence bubble to have a consistent behaviour between the employees kanban view and the employee form.

task-2945615

closes odoo/odoo#103884

X-original-commit: f26f2356ecfcc293bbc6c844882b40a58c21062f
Related: odoo/upgrade#3985
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-10-27 10:37:34 +02:00
Sergey Shebanin d00cfd62b8 [FIX] form control panel: display long breadcrumbs correctly
UI improvements for form control panel to correctly display long breadcrumbs.
It touches both desktop and mobile views.
Before this commit Action menu, Pager and Create button shifted by long breadcrumbs outside the screen.

closes odoo/odoo#104208

X-original-commit: f2b71d51aa409eae435f31d433dac4290c2b80ab
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-10-27 09:39:38 +02:00
Victor Piryns (pivi) 6778fb177c [FIX] product, sale, stock: remove deleted product from demo data
Current behaviour:
When installing Sales, then PoS, we get an error when loading the modules.

Expected behaviour:
No error should be present when installing PoS just after the Sales app.

Steps to reproduce:
(With demo data)
- Install Sales
- Install PoS
- Get Error

Reason for the problem:
When installing Sales, there is the Product dependency that creates a product variant,
named product_product_4d.
Then in the Sales demo data there is the addition of an "exclude_for"
record (basically an exclusivity rule for variant attributes, for ex: A AND B cannot be together).
In our case it happens to be the attributes which product_product_4d was based of. Therefor the ORM
deletes said record (from the database).
Then when installing PoS, it installs Stock as a dependency, which demo data references product_product_4d,
which is not present anymore in the database.

Fix:
Remove the creation of product_product_4d and all the records that reference it.

Affected versions:
- 14.0 (separate PR)
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master

opw-2999180

closes odoo/odoo#104184

X-original-commit: 3e49e533892f94eeb094a436fa34cbac3ed7ad6d
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-10-27 08:44:49 +02:00
Audric Onockx (auon) 5dd5fec563 [FIX] web: format float time correctly
Steps:
Go to timesheet (grid view).
Launch the timer.
Got to list view and check the new line.

Issue:
Few seconds before the minute, the seconds are negative.

Fix:
Convert hours decimals in milliseconds before calculating minutes and
seconds.

Also deleted the unnecessary condition for abs().
Also changes some `${...}` to String(...) to reduce noise.

closes odoo/odoo#104209

X-original-commit: 9d3e7ab4e903d2ada99693aa23e024d3ff84f5fb
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-10-27 07:15:47 +02:00
Paolo Gatti 2b80646ccb [FIX] l10n_it_edi: downpayment document type selection fix
TD02 is the only document type in l10n_it_edi that requires
the invoice to be a downpayment, but this doesn't mean that
downpayments are limited to it.
The condition has been adapted to allow downpayments to fall
under the other document types cases.

opw-3033403

closes odoo/odoo#104242

X-original-commit: 197dbf7a8d14b619d19ff5904eb07d53c1fd97d2
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-10-26 21:51:54 +02:00
FrancoisGe b305128323 [FIX] web: DateField dropdown disappears on scroll
Before this commit, the Datefield dropdown did not close when you
scrolled on the page.

How to reproduce:
- Go to a form view with a date field
- Click on the date field input (datepicker is opened)
- Scroll down the page

Before this commit:
 The datepicker is still open

After this commit:
 The datepicker is closed.

closes odoo/odoo#104160

X-original-commit: d93ed838fdf0a721426dc56e26b5a83b3af6a66f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-10-26 21:51:51 +02:00
Renaud Thiry 84b4af755d [FIX] mass_mailing: remove gold color in stats
Commit a170b7265e158323d3769f1631314f06c96a6e4b
applies the star color to all stars in the form view

The star in the stats bar should remain black.

task-3044832

closes odoo/odoo#104210

X-original-commit: b2f37a06546638fde69d392dfec3d76fc15ca0e3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-26 19:03:58 +02:00
niyasraphy f642bad7ef [FIX] data_recycle: alert in form is not aligned
closes odoo/odoo#104207

X-original-commit: ab83e52314d459532e75f26e219329410a174ad9
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-10-26 19:03:55 +02:00
xmo-odoo c9356b3582 [REM] core: SQL compiler helpers deprecated since 14.0
closes odoo/odoo#98138

Related: odoo/enterprise#33244
Related: odoo/documentation#2844
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-10-26 19:03:48 +02:00
xmo-odoo 6a343a32ef [REM] core: deprecated TestCase classes
Part-of: odoo/odoo#98138
2022-10-26 19:03:47 +02:00
xmo-odoo 84e6be4150 [REM] core: deprecated osv-memory-age-limit option
Part-of: odoo/odoo#98138
2022-10-26 19:03:47 +02:00
xmo-odoo 110770b7c1 [REM] core: openerp.addons alias and legacy ad_path
Part-of: odoo/odoo#98138
2022-10-26 19:03:47 +02:00
xmo-odoo e98b44998f [REM] base: legacy autovacuum API (power_on method)
Part-of: odoo/odoo#98138
2022-10-26 19:03:47 +02:00
xmo-odoo d200dcfb2c [REM] core: exceptions bits deprecated since 14.0
And formally deprecate the contents of `odoo.osv.osv` so we can
eventually finally remove it.

Part-of: odoo/odoo#98138
2022-10-26 19:03:46 +02:00
xmo-odoo e806427d23 [REM] web: deprecated dataset methods
Part-of: odoo/odoo#98138
2022-10-26 19:03:46 +02:00
Xavier Morel 18446f23f1 [REM] core: support for the deprecated <report> and <act_window> tags
Part-of: odoo/odoo#98138
2022-10-26 19:03:46 +02:00
Xavier Morel 6c6ca16626 [REM] core: deprecated Environment methods
Part-of: odoo/odoo#98138
2022-10-26 19:03:46 +02:00
Aurélien Warnon 0c56a58888 [FIX] survey: make the badge fields more visible
Currently, the fields associated to the badge on the survey form are not
visible following the changes with the "always edit" feature.

This commit simply adds a placeholder on the badge field to let the end user
know that there is something to fill in.

We also used that opportunity to sneak in a few additional placeholders.

Task-3028991

closes odoo/odoo#104182

X-original-commit: 2df6ce4708554d3dad59a9b9b15f03057c204c43
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-10-26 17:07:28 +02:00
Arthur Detroux (ard) 10f1c9b222 [FIX] website_blog: restore styles post BS5 migration
[1] migrated to Bootstrap 5 and in doing so, changed the way badges are
styled. Now to give correct styles to badges, utility classes must be
added.

This commit fixes that by adding .text-primary and .text-decoration-none
to the badge.

[1]: https://github.com/odoo/odoo/commit/1fcd098af5fa18e848c66bb83bdceb6ba0308512

task-3001319

closes odoo/odoo#104180

X-original-commit: b606df22ecd07e4acf87feadd1e6f20ed730f058
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2022-10-26 17:07:23 +02:00
Arthur Detroux (ard) 08c2251070 [FIX] website_blog: properly render the sidebar
Commit [1] introduced t-cache for values inside blogs. It also broke the
sidebar template by removing the call to nav_list.

This commit adapts the call to be lazy and follow the cache principles.

[1]: https://github.com/odoo/odoo/commit/b0a2a41d78292cb8b9e53788d40c6dc5915a466d

Fixes #103199, fixes #103888

task-3001319

X-original-commit: ae76b89fbbf947a79bdcdbcc200f65b2ddb457b0
Part-of: odoo/odoo#104180
2022-10-26 17:07:22 +02:00
Alexandre Kühn daac0cdd51 [IMP] mail: remaining move code to models (MessageComponent)
Task-3000365

closes odoo/odoo#104004

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-26 17:07:19 +02:00
Nicolas Martinelli 5c80ca4d1d [FIX] http: nodb fallback in case of connection error
When calling a `auth=none` route with a non-existing DB name, the server
redirects to `/web/database/selector`. Such a route can be called
without database, therefore it is expected to work if the database
doesn't exist as well.

Before the HTTP refactoring, the fallback was `_dispatch_nodb` [1]. We
roll back to the same behavior since there is no good reason to redirect
to `/web/database/selector`.

Commits 4b330f3173 and de4e67dcc529163 are reintroduced as well.

[1] https://github.com/odoo/odoo/blob/b3199e949ae70307e8181ba0d6237871d6d07af7/odoo/http.py#L1529

closes odoo/odoo#104174

X-original-commit: 1565e85890f1d14e067edd1c198c7199ab536307
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
2022-10-26 16:07:31 +02:00
Tom De Caluwé c18ce5d535 [FIX] mail: remove related mail activities on model removal
Unlinking a model during uninstallation can potentially fail when the query
removing any related mail activity types fails. This happens when such a record
is still referenced in the mail_activity table. Explicitly removing related
mail activities (as is done for the activity types and other related mail data)
resolves the issue.

Two tests are added, one that demonstrates the general flow and a regression
test triggering the behavior that caused a bug in the uninstall procedure of
the hr_holidays module.

closes odoo/odoo#104152

X-original-commit: b315f7f562fc84a09d99d6e7676567eb6f285402
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: De Caluwé Tom (tdc) <tdc@odoo.com>
2022-10-26 16:07:29 +02:00
Jorge Pinna Puissant 886f3de768 [IMP] web,*: force props validation for components
*: base_automation, lunch, mail, mrp, project, web_editor, website

This commit adds a warning if the props validation is not set for a
component.

The props validation is important to tell how a component should be
used, by looking at its code, it's a good documentation of the component.
It's also critical, to test if the component is correctly used, if all
the obligatory props are passed and that there are of the correct type.

For more information, see: https://github.com/odoo/owl/blob/master/doc/reference/props.md#props-validation

closes odoo/odoo#103723

Related: odoo/enterprise#33044
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-10-26 16:07:18 +02:00
William Henrotin 36158fe17a [FIX] mrp: force context in computes
Computed stored fields should not be depending on context. In this
particular case, compute_bom_id will make a 'search' on mrp_bom table
with sometimes 'active_test=False' in the context sometimes not.

This commit force the context to exclude archive records to ensure we do
not set an archived bom on a production order.
In a futur versionm it would be nive to have the ORM ignoring the
context in such case.

closes odoo/odoo#103055

Task: 2991906
X-original-commit: 6274f23a673fe073157d0f975adcb2b0c917b02f
Related: odoo/enterprise#32700
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-26 15:06:51 +02:00
William Henrotin b71d3fa1c1 [FIX] mrp: ui improvement
- set monetary widget to align foat field with other monetary fields
  - use default production order in the list view to have the same order
    everywhere.

Task: 2991906
X-original-commit: 38b82230b75f972a7da5d4c53ea1a4c7359cd913
Part-of: odoo/odoo#103055
2022-10-26 15:06:51 +02:00
Valentin Vallaeys (vava)andValentin Chevalier 693511076d [IMP] Payment: hide the URL payment link
Since the generated payment link is not editable, it is hidden behind
the wizard copy button.

To help the users understand the button, the text on the button can now
be edited in the xml with a `label` attribute.

task-2683480

closes odoo/odoo#100261

Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
2022-10-26 15:06:48 +02:00
gawa-odoo c3eb3021c1 [FIX] analytic: only show plans from the company
Before this fix, user could include accounts in the widget from another company than the object's one when in multi-company mode.
It could cause problems with validation too.

Now we take the company of the object when getting the plans (or the current company if no object's company).

t-3040926

closes odoo/odoo#104150

X-original-commit: 21d754ddafee653d9958443accda2de747caed53
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-10-26 14:05:59 +02:00
Bruno Boi a0f4957304 [FIX] web: moment.js to luxon's conversions
The web client exposes an utility function that converts the tokens
of a luxon's DateTime format into a moment.js format.
While this function is not false (still it is uncomplete), the strategy
of using it to convert a luxon's DateTime object into a moment.js moment
is not good.

The daterange field make use of this bad strategy.

Because of the differences between luxon and moment.js locale handling.
Luxon relies on the native JavaScript Intl API.
Moment has its own implementation of locale handling.

So having to pass through formatters/parsers may yield to unexpected
results. For instance, when a locale does not have the same way (in
moment.js and Intl) to express i.e. months and we try to convert a
luxon's DateTime into a moment by formatting the first and then
parsing into the second, the second will be invalid. This is the same
the other way around.

This was in fact encountered with some locales, i.e.
- syrian arabic (ar-SY)
- albanian shqip (sq-AL)

This commit brings an alternative strategy by providing other utility
functions to directly convert a moment into a luxon's DateTime
and vice versa.

This is a better strategy for various reasons:
- it abstracts the way the conversions are done
- no need to play with timezone's offsets
- probably all libs that has moment as a dependency accept a moment
  object in their options, that may not be the case for formats

- The daterange field now use the new strategy
- The datepicker component now use the new utility functions as it had
  implemented locally something similar.

closes odoo/odoo#104138

X-original-commit: 9dedfcaa4ad1fb5ea24f604b40df1bf0830617cb
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-10-26 14:05:53 +02:00
Florian Damhaut 9d778a7346 [FIX] sign: fix frame CSS for all screen size
Change CSS rules for the sign frame to make it more responsive

task-id : 2993103

closes odoo/odoo#104109

X-original-commit: a77f4f24c374254e1c13d9d5b5b538c7562eb96d
Related: odoo/enterprise#33209
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-10-26 14:05:42 +02:00
William Henrotin 38ad682388 [FIX] stock_account: show avco valuation
This commit display the valuation button action on AVCO products in
addition to the FIFO ones.

The view is slightly different to not show `remaining_value` and
remaining_qty` columns

closes odoo/odoo#102317

Task: 2985735
X-original-commit: dc78108fa8dc48a8f4bcb143e7e5a4a14c11dd41
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-26 14:05:31 +02:00
xmo-odoo 6dbe95c4ce [REM] base_setup: last reference to gengo
All other references were removed in 481d1393e7
but this was left over "to be removed in master" (the commit landed in 14.1).

The actual module was removed in 14.0 (b38b72e456a) so this is quite overdue.

closes odoo/odoo#100008

Related: odoo/upgrade#3884
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-10-26 14:05:26 +02:00
qsm-odoo c6561929f3 [REF] web_editor, *: review data-js + data-option-name duplicate
*: mass_mailing, website

Commit [1] introduced data-option-name allowing to name snippet options
without data-js so that their automatic snippet-option-XXX class was
not snippet-option-undefined. This was indeed useful to target specific
options in tours.

The attribute is however a complete duplicate of data-js (if you use
one or the other, it does exactly the same thing). Indeed, you can
define a data-js without a linked JS class (as it is already done). And
if you define both expecting the class using data-option-name but the JS
used from data-js that won't be the case, data-option-name is simply
ignored.

This removes data-option-name. This prepares refactorings that will be
done in the future:

- The way to define option in XML will be reviewed (probably client
  side definitions, probably OWL templates).

- Adding data-js will probably require a JS class to exist, but all
  option definitions of Odoo will declare one to ease extensions and
  stable fixes.

Those are theoretical at this point though. This commit main focus is
simplifying the code.

[1]: https://github.com/odoo/odoo/commit/7b0a147cd43e8e890ebe5a882292a69a5c8c90ac

closes odoo/odoo#103988

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-26 12:23:09 +02:00
Didier (did) 74b30cb480 [IMP] mail: remove moment from the convert data and compute it
closes odoo/odoo#103935

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-26 12:23:06 +02:00
Rob Coekaerts d66569498a [FIX] hr_holidays: fix time-off type multi-company
At this time, the responsible for a time off type can be a user related
to another company. With this commit, this is no longer possible.

In order to do this (and to fix the existing bug that the domain on the
responsible_id field was overwritten by the domain specified on the
form view), the domain on the form view was moved to the responsible_id
field itself.

task-2981972

closes odoo/odoo#100381

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-26 12:23:03 +02:00
Noe Antoine 2247c26834 [IMP] website_event_questions: clarify event question page
In order to clear the tree view of questions in the event
form, shorten labels (also on event template) and add a String
to the reporting button. This makes it more explicit.

Add an action helper on the event registration answer views if
no answer exists yet (for that event question).

Task-3032546

closes odoo/odoo#103556

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-10-26 10:39:03 +02:00
Joseph Caburnay 5a460d1cfa [FIX] web: useNumpadDecimal: synchronize the inputs listeners
This makes sure that the handler is properly assigned/removed
to/from the added/removed input elements.

closes odoo/odoo#104114

X-original-commit: d88b5e96a4d4a80dd14a271538a4669a6efd2d48
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-10-26 09:07:46 +02:00
Joseph Caburnay 5bbd8a05dd [FIX] web: useNumpadDecimal should take into account the selection
When NumpadDecimal is triggered, appending the decimalPoint to the
input field value is not enough, rather, we should replace the selected
range.

Also, we should ignore this for input field of type="number" because
it's natively taken into account.

X-original-commit: 3389cd2226ec82df9aa015637ac2d6a405936a4a
Part-of: odoo/odoo#104114
2022-10-26 09:07:46 +02:00
Julien Van Roy 6ff41d8a16 [FIX] account,account_accountant: fix the demo tour
This commit fixes the account_accountant demo tour.
Some attributes in the html have changed and the reconciliation widget was refactored.
Fix the broken account_tour_upload_bill view.
Fix the test of account_accountant_tour (missing import in __init__)

closes odoo/odoo#104110

X-original-commit: 8414a5a77be5fbcc6f66ba2acf160f43748c891e
Related: odoo/enterprise#33210
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-10-26 09:07:40 +02:00
Odoo's Mergebot c4da4dc0f6 [IMP] web: update pdfjs to 2.16.105
Our current version is getting rather outdated. Replace by the *legacy* bundle: pdfjs now provides a non-polyfilled version of the library, which is probably faster though it doesn't save overly much (for the entire bundle anyway). Use polyfilled version for safety, though it's unclear whether non-chromium Edge is still supported by Odoo. If not, we could just use the non-polyfilled version.

The difference is quite large for pdf.js (+32.5%), however it is much less consequential for the sandbox (+1%) or for the much larger worker (+5.6%). The biggest difference is likely performances but... who knows?

Notes:

- The main reason for this change is that automated vulnerability scanner have apparently started scanning for `postMessage(..., '*')` and the previous bundles includes a version of corejs polyfills without zloirock/core-js#542), therefore triggering those scans. As the PR notes this is almost certainly not a concern because of the innocuous payload, but there is no reason to waste time on those reports if we don't *have* to.
- The bundle now includes "standard fonts", those were removed as they're heavy and may not be necessary for our usage (?).
- All the bitmap images were dropped and replaced by svgs, which is nice.
- Previously local / bespoke changes:

  - 32c8922432 DOM dispatching has been removed, hook into pdfjs's event system
  - 2d5dd1448f seems to be the default now
  - 74fa91e0b3, re-apply change in default configuration
- pdfjs has migrated from lots of its objects / operations being / returning promises, to the result objects containing promises, this has required quite a few adaptations in website_slides

closes odoo/odoo#100067

Related: odoo/enterprise#31692
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-10-26 09:07:35 +02:00
Xavier Morel 59442f0988 [IMP] web: open external links of PDFs in new tab
Reimplementation of 74fa91e0b3 on top of
new version of pdfjs. See previous commit for explanation.

Ideally we would set that behaviour from the outside using
e.g. `PDFViewerApplicationOptions.set` but there are multiple
locations from which we embed the viewer, which makes that a difficult
proposition. There should probably be a clean component which handles
loading the library, configuring it to our specifications (possibly on
a per-embed basis), and exposing both manipulations methods and events
which pdfjs triggers on its eventBus.

Part-of: odoo/odoo#100067
2022-10-26 09:07:34 +02:00
Xavier Morel 542cb1dc21 [FIX] website_slides: outdated pdfjs API use
Apparently a PDF Document used to *be* a promise (a "thenable") but
that's not the case anymore. The loading promise has to be deref'd
explicitely. This is also the case for `page.render`, which is not a
thenable anymore.

Furthermore, the API seems to have changed to favor parameter
objects (getViewport) and setting callbacks (onPassword) rather than
having lots of positional parameters.

Finally, remove apparently long dead `disableWorker` feature in
`PDFSlidesViewer`, although really the entire thing should be
rewritten in modern javascript.

Part-of: odoo/odoo#100067
2022-10-26 09:07:34 +02:00
Xavier Morel 55d9f318fb [IMP] web: update pdfjs to 2.16.105
Our current version is getting rather outdated. Replace by
the *legacy* bundle: pdfjs now provides a non-polyfilled version of
the library, which is probably faster though it doesn't save overly
much (for the entire bundle anyway). Use polyfilled version for
safety, though it's unclear whether non-chromium Edge is still
supported by Odoo. If not, we could just use the non-polyfilled
version.

The difference is quite large for pdf.js (+32.5%), however it is much
less consequential for the sandbox (+1%) or for the much larger
worker (+5.6%). The biggest difference is likely performances
but... who knows?

Notes:

- The main reason for this change is that automated vulnerability
  scanner have apparently started scanning for `postMessage(..., '*')`
  and the previous bundles includes a version of corejs polyfills
  without zloirock/core-js#542), therefore triggering those scans. As
  the PR notes this is almost certainly not a concern because of the
  innocuous payload, but there is no reason to waste time on those
  reports if we don't *have* to.
- The bundle now includes "standard fonts", those were removed as
  they're heavy and may not be necessary for our usage (?).
- All the bitmap images were dropped and replaced by svgs, which is
  nice.
- The local changes since the previous update were *not* impacted in
  this, the entire thing was just reset to upstream. This means
  changes which were backported (922c7c72, 6943714f) are superseded
  but more odoo-specific changes will have to be reapplied in further
  commits.

Part-of: odoo/odoo#100067
2022-10-26 09:07:34 +02:00
Renaud Thiry eeb8197516 [FIX] mass_mailing: reduce pad on template select
There was too much padding up and down from the tooltip.

Adds conditional display on the template menu
when there are no templates (t-for-each is not fully empty).

Also fixes the favorite  icon color in edit mode.

task #2984478

closes odoo/odoo#104108

X-original-commit: a170b7265e158323d3769f1631314f06c96a6e4b
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-10-26 08:09:23 +02:00
Victor Feyens 46f80759eb [FIX] base: settings access test
Probably since recent changes in the views architecture, and
because the test coverage was recently extended, this test
failed when l10n_mx_edit module was installed.

While verifying the current user has access to all the fields specified
in the settings view, we browse all the fields, including the ones in a sub-view:

<field name="x_ids">
	<tree>
		<field name="whatever">
	</tree>
</field>

x_ids being a settings field, but not whatever, which made the test fail.

To fix this problem, we check the fields belong to the res.config.settings
model before trying to access it.

closes odoo/odoo#104119

X-original-commit: 60f22b71063eada039f59321722e794c653acbde
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-26 01:58:46 +02:00
Xavier BOL (xbo) f830656f0e [REV] project: fix alignment issue project sharing
Since the form view has no longer a readonly mode, the task name could
be cropped since its size has been reduced in a previous commit to keep
the same size in edit mode in 15.3 (before the OWL conversion and the
always edit feature). This behavior is no longer expected and the size
should be the one in readonly mode to use the available spaces between
the task name and the kanban state.

It is for this reason, this commit reverts
74a069226294044fa8901aed6b02bc25c4e11b21.

closes odoo/odoo#104118

X-original-commit: 677c8b1bc60fe0736ce45e8c041a03e65fc6413c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-26 01:58:41 +02:00
Kevin Baptiste ec109334c5 [FIX] hr_work_entry_contract: allow Payroll Manager to access work entries
A Payroll Manager couldn't access the work entries of their own
employees as they couldn't write the work entries generation date on the
employee's contract.

task-3014915

closes odoo/odoo#104113

X-original-commit: d6a5909f988568581c2ec5b3f83271863be85fc4
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-26 01:58:35 +02:00
Odoo's Mergebot 90866aa25c [FW][FIX] phone_validation: extend implementation of phone_mobile_search
PURPOSE

Extend implementation of ``phone_mobile_search`` that is currently limited
to performing an ilike with a term containing at least 3 characters. Any
operator is automatically considered as being an 'ilike'.

SPECIFICATIONS

Correctly support boolean check (is set / is not set), with its own small
implementation easier than the remaining computation.

Correctly propagate operator in generated SQL: like, ilike, =, those operators
should not be automatically considered as always ilike.

Correctly support negative operators. Supporting only positive search is a
bit limited.

Add tests.

Task-3012789

closes odoo/odoo#104111

Forward-port-of: odoo/odoo#103354
Forward-port-of: odoo/odoo#100724
Related: odoo/enterprise#33211
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-26 00:55:06 +02:00
Thibault Delavallée 9a5046ba0a [FIX] phone_validation: correctly support phone/mobile search parameters
Currently the search method defined on 'phone_mobile_search' supports either
a boolean (is set / is not set) search, either considers all searches to be
"like TERM". This is coming from the main usage that is the search view
that sends domains like "[('phone_mobile_search', 'ilike', term)]".

In this commit we improve the method to correctly support

  * direct check (=)
  * negative operators (not (i)like)
  * like / ilike (previously like were considered as ilike)

Idea is: a positive operator check that any of the phone fields respects the
domain (phone or mobile is TERM). A negative operator checks that all phone
fields respects the negative domain (both phone and mobile do not contain TERM).

Tests are added.

Task-3012789

X-original-commit: 8e905343f38a4dae828ccaddc62ce5c6a2f754db
Part-of: odoo/odoo#104111
2022-10-26 00:55:05 +02:00