with this commit we adding weekly recurrent widget, currently proeject and
calendar shows boolean for each day vertically but with this widget we displays
week days and its boolean horizontally.
Here widget will display first day as per language's week_start field, also we
adds FieldDependencies on custom widget and consider those FieldDependencies
while processing view node in basic_view.js
We add support of registry to contain owl custom widgets and add support
of rendering owl custom widgets.
Also with this commit we removes fields like sun, mon, tue etc. from view and
instead use "web_weekly_recurrence" custom widget to display boolean for each
week day.
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Issue
- Install "Sales"
- Switch to "German" language
- Go to Sales -> Products -> Products
- Try to filter on "Public Price" is equal to "2,3"
Not possible to add decimal point at the end (only in middle of number).
Cause
In case the 'decimal point' in DB params is not a dot '.',
the filter input will be considered as 'text' instead of
'number'.
In case of the 'number' type; HTML do already a pre and post
processing, including managing decimal point (who, for example,
is not included in ev.target.value if last char is a '.').
Unfortunalty, the library is not well working with other
language and not supported on every browser, therefore,
must use own logic.
In case of a 'text' type, the value will be send to 'parseFloat'
,then `parseNumber` will replace decimal_point by dot (also one the
issues since needed to display decimal_point according user language),
and `Number` will remove the decimal_point in case of '123,' -> '123',
and therefore we will not be able to write decimals ( apart of adding
the decimal point after writing the whole number...)
Solution
If user input is well parsed, store parsed value in condition.value and
set condition.displayedValue to the input value (an so without updating
input value). Else, replace input value with previous value (who should
be the condition.DisplayedValue).
opw-2463441
closesodoo/odoo#67978
X-original-commit: e795ce5bff14b6b748c1f4a2651946aafdc299f4
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Styles for the hex and rgba inputs from the color picker were modified
on directly from the web module, which means that for a specification
concerning only the frontend colorpicker, the backend colorpicker was
also changed.
This commit reverts the changes that were made and only applies the new
style for the website editor.
Related to https://github.com/odoo/odoo/pull/65249closesodoo/odoo#67396
X-original-commit: 9529e29615699942aac89099cd37144e052b9004
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit's primary objective is to ensure that the timesheet uom is working in accordance
with the company settings in a multi company environment.
Prior to this commit:
- The timesheet preferences sent to the front end were always those of the default
company of the user.
- The timesheet related widgets initialisation process (adding the correct ones in
the fieldRegistry) was performed before the front end treatment of cids and coockies
which prevented applying the front end selected company settings.
After this commit:
- A dictionnary is used in the session in order to structure the companies info.
- The company timesheet preferences are sent to the front end through the company dict.
- The uom info is sent to the front end through the session.
- The timesheet uom is now managed from the frontend and is now in sync with the settings.
- Timesheet widgets are initialised during the AbstractWebClient init and are in sync with
the multicompany front end settings
task-2168337
Closes: #66551
Purpose of the task is to improve the mobile UI and kanban view of
the service, contract, odometer, menufacturer and vehicle.
So in this commit,
- Remove the record link from odometer and service kanban view.
- Added the stage in service kanban view.
- Display the Expiry Date in red when contract is expired.
- Redirect to model view when we click on kanban card of the
manufacturer and add the properties dropdown to open the record
- Also improve the some ui for small screen
closesodoo/odoo#62292
Taskid: 2348332
Related: odoo/enterprise#14959
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit improves the calendar behavior.
* Before this commit, the invisible attribute were not evaluated in the calendar popover.
* Several alignment, label, improvements
taskid: 2342252
The hex and rgba inputs styles were not matching other inputs ones when
focused.
closesodoo/odoo#66057
X-original-commit: 850581c49c84042bd5b40b632798c56789a1c60e
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
This commit adds the quick edit behaviour.
The quick edit allows to click on fields in readonly form view to switch
into edit mode. After switching mode, the clicked field is automatically
focused.
A few fields have a custom quick edit behaviour after mode switched:
- checkboxes automatically toggle.
- radio buttons are set to the selected value.
- one2many list's cell are focused.
One2many list fields now show the "add a line" in readonly mode.
task 2330101
This commit does 4 things in order to reduce the shift when switching
mode in form view:
1. modifies the render function of many2one and x2many radio
fields to render them the same in edit mode and read mode.
2. removes margins in inner form groups.
3. sets a minimum height on rows to align them.
4. empty fields are now visible. (as a blank line)
task 2330101
model_field: name of the FieldMany2One('ir.model') containing the model of the records that can be selected. If its value is different from False, the select will not be displayed.
The purpose of adding this option is to allow the creation of a reference field having its model defined in another field (Many2One).
Task-2195019
Right now, the quick create kanban card is having three buttons, Add, Edit
and Discard. In some languages, the translation terms of these buttons may be
quite long. This pushes the last button into second line and leads to an
ugly display.
This commit replaces the 'Discard' button with trash icon and makes sure that
all buttons are always in single line. If the strings are too long, they will
be cropped automatically.
Task ID-2373130
closesodoo/odoo#62326
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
A calendar filter's id is the concatenation of "o_cw_filter_collapse_" and the title of the filter.
When title has space (like "Time Off Type"), the id become "o_cw_filter_collapse_Time Off Type", which is invalid.
So, we can't collapse the filter.
With this fix, it replace space by nothing so if there is space in title (like "Time Off Type"), the id is "o_cw_filter_collapse_TimeOffType".
Task id: 2318645
- Resize Year view
- Add "is_hatched" field
- Scroll to current month in Year view
- Hide the sidebar if no filter is present
The goal with Year view is to display it in a single page without scroll bar.
Before this commit, a scrollbar was displayed on the right of the screen.
This results in some data wasn't displayed on the screen.
Now, the year view is scaled to the browser.
That means that all information are now on the screen (without scrollbar).
"is_hatched" is used to hatch date under specific conditions
The goal was that it was not possible to display some information differently depending on a variable.
Now, if a variable named "is_hatched" is set to true and passed to the calendar view, the specific date is hatched.
Task id #2318645
Before this commit, when the user entered some text in a many2one
and then focused out (e.g. clicked outside), a dialog was shown to
ask him if he wanted to create such a value, no matter what he
wrote in the input.
After this commit, if the search triggered by the text he entered
returned records, the first one is automatically selected when the
focus is lost. However, if it matches no record, the dialog still
opens. The text in the dialog has been slightly reworded as well.
Task 2372480
Closes#61455closesodoo/odoo#62677
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Same change in several areas where translations existed:
- website editor notification popup
- elearning share popup
- forum remediation filter popup
- event registration attendees popup
- portal rating popup
- stripe payment error popup
And many other locations where there were no translations yet
"×" has been replaced by its UTF8 character.
Also introduced aria-label where missing.
Before this commit the close icon was included in translated resources.
For example, in Spanish the "×" had been turned into "&veces;"
thus not rendering an icon anymore
After this commit the close icon is not a translated text anymore and
remains an icon across all languages
https://github.com/odoo/odoo/pull/60186
task-2312878
closesodoo/odoo#62250
X-original-commit: 9896af94ebc887d98ccf44e6568ef7eeb5a27172
Related: odoo/enterprise#14937
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When a progressbar filter is activated, it will only show records
matching the filter and nothing else.
"Load more" link will update its counter accordingly.
closesodoo/odoo#55466
Taskid: 2196661
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Remove the icon of the toast elements. Remove the header and move the
title in the body, as simple text. Move buttons at the bottom instead
of at the right side.
Note: this will be refactored with OWL anyway but this is a first step
towards more consistent tips across backend and frontend.
task-2311554
closesodoo/odoo#61756
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit improves the UI of the Export Data action's modal on mobile
screens:
* open it full-screen
* 2 main panels are one after the other (side-by-side on desktop)
Task ID: 1879566
When opening a DropdownMenu OWL component (like the favorite menu, filter
menu) positioned to the right of the screen (left on RTL languages) on a
small screen, the content of the dropdown could easily overflow out of
the viewport, making hard to use or even unreachable.
This commit fixes it by using the middle of the screen as a threshold to
align the dropdown menu to the right (or left in RTL) of the triggering
button.
Note: this fix specifically targets mobile-like/small screens as bigger
one like on desktop would require much precise calculations (and are
not an issue at the time of this commit).
Task ID: 1879566
Fix the design of he notification which is sometimes broken
(if there are lists or buttons display in it for example)
task-2346462
closesodoo/odoo#59776
X-original-commit: 238654ae53582d791154388c827f725c8d136612
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PR #45400 disabled the export feature for those who were not in
group 'base.group_allow_export'. However, it only considered the
'Export' link in the actions menu. In list view, an export button
was still displayed in the control panel (next to 'Create'),
whether the user was in the group or not.
This commit fixes this issue.
Task 2348571
closesodoo/odoo#58920
X-original-commit: 7925e30482ad0df4b2a004c223c3eb87f3ce725f
Related: odoo/enterprise#13730
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When navigating fields using the keyboard, it's not possible to reach
most of widgets for selection fields. That is because most of them
consist of one main element containing several other ones, one per
possible selectable value (e.g. buttons). When their focusable element
is computed, the main element is taken, instead of its sub-elements,
which causes the field to be skipped when navigating.
This commit fixes the above, as well as some missing aria attributes and
keyboard events, for the following widgets:
- `priority`
- `state_selection`
- `statusbar`
- `radio`
opw-231112
closes#58302closesodoo/odoo#58421
X-original-commit: 2471e7c176c5df0f310f2939f8a6cf6948c0ac0c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Because the position of the popover depends on the size of its content.
Part of task-2270731
X-original-commit: 3066a946ef1ca0973503207d0486515798168fa2
When one constucts a custom filter in the search view and clicks
on the "ADD A CONDITION" button, the new condition dropdowns always
start with the top of the lists.
This commit will instead default a new condition to the same field and
operator as the previous one.
Presetting the dropdowns used in the previous condition is a better
guess for what a user tries to filter than starting the dropdowns each
time at the top of their lists.
closesodoo/odoo#56918
Taskid: 2222545
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The document layout preview is a complete defferent simplified template
with its own css that replicates at best the different styles.
It does not have the external layout features and lack of fidelity.
The new preview actually use the real documents templates and put the
result in an iframe. It now has a high fidelity, though not perfect.
The goal is for a better onboarding, where clients see easely how
documents will look if they had an app to generate them. Of course, the
data on the document is a false invoice.
Refactor all this from base to web.
Task ID 2304177
closesodoo/odoo#56995
X-original-commit: c121a246f16899735306266a3a12b526e08e7620
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
A previous commit has paved the way for displaying sample data in the
reporting views. The present commit brings the required changes to have
sample data in pivot views.
Task ID: 2282196
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
A previous commit has paved the way for displaying sample data in the
reporting views. The present commit brings the required changes to have
sample data in graph views.
Task ID: 2282196
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
This commit adds the parameter `scales` in the calendar view's template.
This parameter can be used to choose which mode(s) is/are allowed.
This commit also refactors the way we manage calendar scales.
Before scales were defined in model and renderer, now it's defined
in the view and given to model, controller and renderer by params.
Task: 2193921
This commit adds a new year scale to the calendar view.
It comes with a new view in the calendar, this view displays a
4x3 grid which cells are month views.
Task: 2193921
Issue
- Sales > Create a quotation
- Click on quotation date or start
writing in it
On chrome, if addresses autocomplete is enable
and have data to show, a dropdown will overflow
on the datepicker
Cause
This is mainly a chrome issue and the only way
to solve it without a fix is to disable the
autocomplete totally which is not really a
solution since we want the autocomplete on
adresses
Solution
Add the autocomplete off on datepicker field
OPW-2308278
closesodoo/odoo#55470
X-original-commit: b40fef968ab000870574ae45ba482288cdf94ad1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Adaptation of the rest of the environment to the changes regarding the
refactored search panel and model.
This commit includes the following changes:
- Since the control panel model is now part of the search model, the
view widget is responsible of its instantiation with the appropriate
API; creating an ActionModel holding the required model extensions.
- The controller is now importing/exporting the state of the entire
search model as well as the current state of the search panel (given
throught its props). Changes have been made to adapt to this behaviour.
- The multiple components linked to the control panel model have been
adapted to reflect the changes brought to it (they will now listen to
the "searchModel" instead of the "controlPanelModel").
- The `test_utils_create` methods have also been adapted to properly
instantiate a searchModel
Part of task 2228968
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Refactoring of the search panel and its inner logic to Owl.
The previous search panel widget has been divided in 2 parts:
1. Component
The "Search Panel" component's responsibilities are now to render the
search panel data given by its model, display some rendering logic
(expanded categories, checked groups) and dispatch the events triggered
on it.
2. Model Extension
The "Search Panel Model Extension" holds all the search logic of the
search panel. Its responsibilities are calling the server to update its
data and to provide them to its component and other search extensions.
Part of task 2228968
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
*: website
The style to achieve the chess-like bg result was duplicated at many
places. The 'web' app was also actually using an image from the
'web_editor' app (we can live with it in stable as web_editor always
comes with web in auto_install but this was still a mistake).
closesodoo/odoo#54154
Also: fix some layout issue in the colorpicker widget.
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since the refactor of the control panel, support of "widgets" attributes
in the search view archs has been inadvertently dropped.
Now, they are once again supported.
Task 2061795
closesodoo/odoo#54066
X-original-commit: f33b0bc7a93e60bd0ed00b40d7459225ec0b749a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
*: web_editor
Do not display the backdrop element added by bootstrap in the body and
add a background on the modal to keep the same effect. The bootstrap
backdrop was probably useful for compatibility with <IE9 but is no
longer needed. This also avoids z-index issues because modals could be
opened in an element (e.g. the website #wrapwrap) whose stacking context
is different of the body one (where the backdrop is opened). This would
make the backdrop appears on top of the modal.
Part of https://github.com/odoo/odoo/pull/49142
Related to task-2229551
Co-authored-by: qsm-odoo <qsm@odoo.com>
Before this commit, when archiving a record through the action
menu, the 'Archive' link was not updated to 'Unarchive' and same
when unarchive was clicked, the link was not updated to 'Archive'.
After this commit, when archiving a record through the action menu,
the 'Archive' link is updated to 'Unarchive', same way when
unarchiving a record link is updated to 'Archive'.
This commit also introduces a new prop 'closeOnSelected' to the
Dropdown component, to specify whether the dropdown should be
closed when an item is selected, and makes Action Menu dropdown
closed on item selected.
task-2251739
closesodoo/odoo#53835
X-original-commit: dc5d02ade7747c74c31566c74932ef45c30e9356
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Before this commit, the calendar view showcases tasks by deadline. Because it is a simple date field, the day/week modes don't have much value and are even confusing to the users, who expect to be able to define timeframes.
In addition, the quickcreate doesn't allow to select a project. This is problematic because it leads to "ghost" tasks.
closesodoo/odoo#52478
Taskid: 2264594
Related: odoo/enterprise#10976
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Prior to this commit the close button of the notification is wrongly
placed when no title is provided.
Applying this commit places the close button at the right end. This commit also
modifies the size of the buttons to btn-sm.
task-2277737
Fixes#52229closesodoo/odoo#53219
X-original-commit: caa3f1107ddaa4cdf6878f4532632a41bc710862
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit introduces a new attribute 'limit' for search panel fields
that allows to avoid performance issues. That integer attribute (with
default 200) allows to fix a maximal number of values to display for the
fields. When the number of field values to display reaches the limit,
no values will be displayed. Instead, a warning message will be shown
in the corresponding search panel section.
Note it is possible to have no limit using limit="0" on a field.
This commit reintroduces in a better way the principle brought by the
fix 8d57153b34c04952a85f6642951cb2697016da84.
Task ID: 2154749
The commit introduces two new attributes for search panel fields:
- hierarchize: boolean attribute (default True) available for
many2one fields with select="one". It allows to choose whether
to hierarchize the field values using the _parent_name (if set)
on the field comodel.
Note that a sanitization of the parent hierarchy takes place.
Basically, it ensures that parent chains are
completely in the domain (on comodel) accessible by the user.
See _search_panel_sanitized_parent_hierarchy documentation for
more information.
- expand: boolean attribute (default False) available for many2one
and many2many fields. If set to true, all field values are fetched
and displayed in the search panel. If set to false, only the
values that have at least one corresponding value in the field
model (and in some domain) are fetched.
An exception in the case of an hierarchized field
(hierarchize=True and _parent_name set): more/less values can be
displayed in order to have a good representation of the parent
hierarchy. That means we complete and sanitize the set of initial
field image values.
Note that the fix 8d57153b34c04952a85f6642951cb2697016da84 bringing the
notion of limit in search panel has been reverted in the present commit.
An upcomming commit will reintroduce the limit principle in a better way.
Task ID: 2154749
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
PURPOSE
The purpose of this task is to improve the interface by removing the
fa-building icon which is automatically appended by the property field
(i.e. company-dependent) and, instead, indicates that a field has
company-specific values in the tooltip of the field.
closesodoo/odoo#52313
Taskid: 2266519
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>