This commit improves the style of the image widget
to use more approriate icons for edition/deletion.
Before this commit, a rectangle was covering the
entire image to highlight those buttons. Now, only
those are visible and highlighted on desktop when
hovered, while being always visible on mobile.
This will improve the visibility of this field
with views being always-edit.
task #2860958closesodoo/odoo#97208
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Define classes for some default bootstrap transitions + 'none'.
These values are generic enough to fit different circumstances.
Classes added:
- transition-base
- transition-fade
- transition-none
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
closesodoo/odoo#97051
Related: odoo/enterprise#30066
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Drop custom cursor classes in favor of Bootstrap default ones.
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
Part-of: odoo/odoo#97051
This commits adds the '$o-opacity-disabled' value in the opacity
utility class generation list, allowing to use the 'opacity-disabled'
class to style on the fly elements that don't support disabled states by
default (eg. generic divs)
The commit introduces also a new '.opacity-trigger-hover' class.
It can be applied on parent elements in order to trigger their children
opacity states. Eg:
<div class="opacity-trigger-hover">
<span>Always visible</span>
<span class="opacity-0 opacity-100-hover">
Visible when parent is :hover
</span>
</div>
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
Part-of: odoo/odoo#97051
In debug mode, we highlight legacy fields with a red background
and legacy views with a red top border. Legacy views only use
legacy widgets. There's no point highlighting legacy fields inside
legacy views.
Note that these highlightings won't be in v16, their purpose is to
ease the identification of legacy/wowl fields/views during the
conversion phase.
closesodoo/odoo#97415
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the dropdown of the activity widget wasn't
visible when the widget was used in a legacy list view, because of
the `overflow: hidden` rule on the cell.
Part-of: odoo/odoo#97415
This function helped us managing the transition from the legacy
/web codebase to owl, and we don't need it anymore as there's no
test using it.
Part-of: odoo/odoo#97415
Open a record in a many2one.
Make the form view to take a js_class that is an extend of the legacy form view
Before this commit, the resId of the record and the view id were not transmitted to the legacy form view dialog.
After this commit, they are.
closesodoo/odoo#97385
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
As a stable fix, to not touch XML templates and break existing
translations, the ⌙ character was automatically replaced by └ which
makes more sense for the usecase and should work properly in all
browsers. The ⌙ character is actually rendered mirrored on Windows 11
Chrome (and others) as the font used for those unicode characters is
left to the browser. We could force a font of our own but it's probably
not worth it.
A better solution with a SVG or CSS solution has to be done in master.
That would unify the look of the symbol across all browsers and
also prevent special characters to be placed in translations.
With this forward-port commit, we'll start first by using └ via a CSS
rule. Three new classes have been created: o_we_sublevel_1,
o_we_sublevel_2 and o_we_sublevel_3. Adding any of them on a widget
automatically adds the └ character. Then choosing 1, 2 or 3 controls
the indentation, which was previously controlled by placing the  
HTML entity directly inside strings.
This commit also takes the opportunity to fix some of those level
indentations (sometimes 2 was used instead of 1 or 1 was used instead of
2, etc) and also review some related labels.
closesodoo/odoo#97361
X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, if a form view has a group containing only invisible
elements and at least one invisible group, then the view crashes.
Example:
<form>
<sheet>
<group>
<group invisible="1">
<field name="foo"/>
</group>
</group>
</sheet>
</form>
The solution is to have an empty list as the default props for the
OuterGroup slots. OuterGroup is a group containing at least one other group.
closesodoo/odoo#97295
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, an error was returned when opening a view if the
view's searchArch contained a field with a filter_domain and the view's
context contained an integer "search_default_" for that field.
Example:
<search>
<field name="m2o" filter_domain="[('m2o', 'child_of', raw_value)]"/>
</search>
context: {
search_default_m2o: 1,
}
Part-of: odoo/odoo#97295
When a ViewButton is clicked and the action fails, you would expect to
see an error dialog explaining the failure.
For example:
- go to a form view
- click on a state button which should open another view
- the new view has an issue when rendered
Result before:
We stay on the form view and nothing happens
Result after:
We stay on the form view and an error dialog is displayed.
Part-of: odoo/odoo#97295
After updating mass_mailing_snippets_menu_tabs to cancel the
template's edition at the end of the tour, the editor starts blowing
up during cleanup with:
```
Trying to set result to failed (UncaughtTypeError: Cannot read properties of null (reading 'anchorNode')
at Sanitize._parse (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1453:105)
at Sanitize.parse (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1450:6)
at new Sanitize (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1448:6)
at sanitize (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1460:53)
at OdooEditor.cleanForSave (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1372:37)
at Class.getValue (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:2547:1121)
at Class.isDirty (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:2547:407)
at
_onBeforeUnload (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:2509:560)
```
After consultation with the relevant team, there are edition contexts
where it's perfectly valid to have no "live" selection for one reason
or an other, so this should be fixed.
Ideally the field should also properly be discarded such that the
event listener is removed and the callback is never called at all,
however the legacy client has no such hook at the field level (the
controller seems to be the lowest).
closesodoo/odoo#96517
Related: odoo/documentation#2550
Related: odoo/enterprise#29824
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- the community version would finish with a wizard opened in edition
mode, add a "real" final step of waiting for the wizard to finish
processing (the invoice to be marked as paid)
- the enterprise version would finish on the reconciliation widget,
which is always an edition-mode form, check that the reconciliation
succeeded and (as in the accounting tour) return to the accounting
dashboard afterwards
Part-of: odoo/odoo#96517
- the x2many tour would finish on a click canceling the creation but
not wait for that to resolve, leading to the driver catching it in
the act (checking before the client had had the time to switch),
just need to wait for the list view to be displayed
- the constraints tour would just drop in the middle of a creation
with an error dialog open, so need to finish the entire thing and go
back to the list view
Part-of: odoo/odoo#96517
Since 54ea956490 the form view has an
"urgent save" fallback mechanism. Even if nothing has changed since
the last (?), it will save during unload, which leads to extra
requests during the browser teardown (deletion of cookies and storage,
navigation to about:blank, ...), which can lead to inconsistent
behaviors and non-deterministic errors.
- add check steps at the end of the tour to wait for relevant terminal
states
- perform an explicit save during the tour (before confirmation)
Ideally we'd really only block on *dirty* forms, because logically the
urgent auto save thing should not trigger if the form is not
dirty. However I'm not sure there's any way to check for that
externally, so saved it is...
Part-of: odoo/odoo#96517
A tour finishing while a form is in edition mode is an issue, as it
then triggers an `urgentSave` which generates network traffic (and
promise handlers) during browser cleanup, at a time when the state of
the browser may not be entirely coherent.
Two methods seem to be the most common here:
- drop form during creation, aka the tour mostly wants to mess around
with onchange & ui & error reporting, in those cases the tour just
stops using the form, the "proper" way to handle this is to cancel
the creation and wait until back to the list view (note: the utility
step does not currently handle situation where the creation was
triggered from an other form view, or canceling an edition)
- save form during creation or edition, aka the tour wanted to create
an object, did trigger a save, but didn't wait for the save to
complete, leading to the tour finishing mid-save (which in theory
should allow the save to complete but may still trigger odd effects)
Part-of: odoo/odoo#96517
We can't really know where the clickall tour will end, and if it ends
on the settings action things are rather difficult as saving or
discarding the settings form returns to the edition mode.
Part-of: odoo/odoo#96517
Since 54ea956490 the form view has an
"urgentSave" fallback when the page is unloaded (tab closed, page
navigated away from, ...).
In tours, this translates to new network requests being performed
during the browser cleanup, possibly chaining further into more
network events.
Flag these tours as incorrect (by making them fail if we find a form
in edition mode after receiving `"test successful"`).
Adjust testing of http cases because I've added an empty line between
the signal and the actual message for better readability on complex
error messages.
Also provide opt-out, as for some tours it's difficult to impossible to
truly fix them: the `allow_end_on_form` class attribute can be set to
`True` in order to disable the new behaviour.
To implement this, update the browser runner receive the test class
directly (rather than just the test class' name) for more
introspection flexibility.
Part-of: odoo/odoo#96517
The navigation bar inside the Courses main page and the courses list
are forced to white with an inline style.
When a dark palette is used it makes the text color white as well.
Because of this the texts in those navigation bars cannot be read
anymore.
This commit removes the forced white background so that colors can
automatically adapt to the palette.
Steps to reproduce:
- Pick a dark palette.
- Go to the "Courses" page.
=> "All courses" and its icon were not visible anymore.
task-2855511
closesodoo/odoo#97148
X-original-commit: 852acad7585fa884f365dd2fc10348446d56d4e9
Related: odoo/enterprise#29995
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website, website_sale
Before this commit when a search bar was within a navigation bar, its
autocompletion popover was using the text color according to the
navbar's background color determined by the theme. For dark themes, this
made the autocompletion appear almost as white on white.
This commit uses the defaults before applying a specific preset color
so that the dropdown menu style within the navbar uses the original
color.
It also resets the `text-muted` style used in "No results" message.
Also removing the `website_sale.productsSearchBar.autocomplete` template
which was not referenced anymore.
Steps to reproduce:
- Select a dark palette (e.g. one that makes the navigation bars black).
- Drop a "Products Search" block.
- Reset its background color.
- Pick a color combination with a dark background.
=> The autocompletion's "No results" message is shown without contrast.
task-2855511
X-original-commit: f9bf40cb53cf487c8736c1f565c2f0d3834acd5e
Part-of: odoo/odoo#97148
- Purpose
Improve the UX of the "column creation" mechanism in the kanban view
so that users better understand what it is they are creating.
- Specifications
In the kanban creation mechanism, use the name of field on the model
(e.g. when grouped by stage_id in project.tasks kanban, "Add a Column"
would become "Add a Stage" because the stage_id field's name is "Stage").
task-2755570
closesodoo/odoo#95550
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose of this PR to improve generic usage of project app.
So in this commit did the following changes:
- Changed recurrence conformation messgae
- Changed Burger menu actions in
project.project kanban view
- Added quick search Description in project.task search view
- In product form view hide button based on condition
- Added sample data in project_milestone_views
- switch the state and the author fields from place and add author
label underneath it's value
- switch the date and the progress fields from place
- Added table-stripes class
- Changed label sprint summary to summary in project_update_default_description
- In project.project form view and project.update right-side panel hide
'collaborators' button on condition
task-2895388
closesodoo/odoo#95245
Related: odoo/enterprise#29089
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2943607
closesodoo/odoo#97403
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the Ace editor field did not update on props change.
Now, it will update its value and options when the props keys "value",
"mode" or "readonly" are modified.
closesodoo/odoo#97396
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Stacked bar does not support the stacked option in the y axes.
This option was introduced in the stacked line generalization and was
set to False if the user is in the bar mode.
closesodoo/odoo#97410
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Previously, the pre-commit hook was modified to disallow commiting when
the config files were not up to date, the paths that were checked for
changes assumed that the hook was executed in the community repo which
breaks in enterprise and disallows commiting completely instead.
This commit fixes that, and also reloads or refreshes the tooling
automatically when it is not up to date before running prettier and
eslint instead of aborting the commit and asking the user to do it by
hand.
closesodoo/odoo#97404
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Since 48ef812a63, a warning was raised
(python side) when a grouped list is sorted by anything different from
an aggregate or the first field of the group.
Now, only the first field of the group or an aggregate fields can be
used to sort a grouped list.
closesodoo/odoo#97392
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Enable automatic linting and formatting for spreadsheet modules.
`o_spreadsheet.js` lib file should not be checked since the file comes from
an external library (`o-spreadsheet`)
closesodoo/odoo#97393
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Currently, when we delete a single certification that is linked to a course,
it gives a validation error, which is good. But when we try to delete multiple
certifications that are linked with courses, it throws an error.
This commit fixes the issue by properly handling multiple records in the
deletion check, and updates the ValidationError message accordingly.
taskID-2901629
closesodoo/odoo#97391
X-original-commit: fecc1babb63ad1164189c95bb019afb2469043bb
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The actual icon have to be replaced with a new one
in order to follow the style of other payment acquirers modules
task-2937637
closesodoo/odoo#97387
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
We recently added the prefer-const eslint rule, but the default
configuration of this rule disallows some things that we often do and
which we do not think are bad practice such as declaring a variable with
let so that it's available to a function defined below, but assign it
only once later, we also sometimes destructure variables with let where
some of the variables could be const but not all, in those cases we
accept that some variables will be mutable even though it's not strictly
necessary in favour of conciseness.
closesodoo/odoo#97384
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Previous fix: https://github.com/odoo/odoo/pull/84631 missed the case
when raw_move_ids have already done move_orig_ids (i.e. when 2/3 step
MOs or subcontracting w/ resupply contractor). This made it so when
MOs are backordered, these moves would not be reserved even though they
were in the original MO.
This issue was fixed during a refactoring (reserved amounts are now
distributed to backordered MOs), but this commit will add a test to
prevent the issue from returning in the future.
Part of Task: 2777571
Original PR fix (pre-refactoring): odoo/odoo#91460closesodoo/odoo#97383
X-original-commit: a825d9ed715b369128c876174ca6ebfac72adbe5
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Steps to reproduce:
- create a subcontracted product (i.e. create subcontract BoM)
- create and confirm PO for subcontracted product (qty > 1)
- try to decrease PO qty for subcontracted product
Expected Result:
Since receipt is not yet validated, the qty in the receipt should
decrease (it will in the subcontract MO as well, but this doesn't matter
since no one should work directly with the MO)
Actual Result:
A validation error occurs saying the qty to produce must be non-negative
We allow neg demand qtys to be proprogated from SOs and POs since
https://github.com/odoo/odoo/pull/76752 . While we added in a check to
make sure MOs are not created when a neg qty change is proprogated, we
forgot to add a check for subcontracted created MOs, hence the
validation error (i.e. the neg qty change is trying to create a
subcontracted MO of a neg amount.)
Task: 2777571 (issue 2 of additional issues)
X-original-commit: 251f146b6ecb0e2d428089669199a6deb3a6c060
Part-of: odoo/odoo#97383
Fixes a few incorrect subcontracting UX behaviors:
- When subcontract BOM is flexible, the record burger should always show
so user can more easily record varying quantities
- When `show_operations=True` then `action_assign_serial` button in
Operations tab should only show if subcontract BOM is NOT strict AND
has no tracked components (instead of always showing regardless of BoM
consumption and its components)
- When a subcontract receipt is backordered, the Done moves should no
longer return `_action_record_components`.
- When 'show_operations=True' for receipts, we shouldn't display the
subcontracting component lines in the Detailed Operations tab
Task: 2777571
X-original-commit: e9b9fe541df984bba33c4f44d48e57820ea4968f
Part-of: odoo/odoo#97383
Prior to this commit a non existing product type was used in one of the
test.
This commit changes it to an existing one.
closesodoo/odoo#97380
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Issue:
The product descriptions on the /shop page (always shown if the product
description option is checked) are shortened... but only if the user is
logged in. It should also be the case for visitors.
Explanation:
Using css selector for data-oe stuff is a problem for visitors as they
don't apply to them. To fix the issue we change the selector to a classic
css class.
opw-2926847
closesodoo/odoo#97379
X-original-commit: eb50e48c798e3a5f39fa333d4248973a31e16a9f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Since 4f984568e1, the css theme is not
correctly applied to the boolean fields in the settings, allows them to
take a big width.
Now, the max width is fixed. Note that, this was already the case on the
legacy views
closesodoo/odoo#97378
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Steps to reproduce the bug:
- Let's consider a company c and a user in this company u.
- Delete the logo of c
- Go to mass mailing > Create
Bug:
Traceback is raised
opw-2927807
closesodoo/odoo#97326
X-original-commit: edda787471d539e9e32ab0dfe4f15235dacec48d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
This commit fixes the style of the progressbar
in kanban. It also remove a useless
t-on-click that was left in the template
by mistake
closesodoo/odoo#96957
Related: odoo/enterprise#29878
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>