Rev. 42e1efded5 aimed to disable the quick create feature when
grouped by date(time) fields, by only enabling it for char, boolean
and many2one fields. However, the selection case is quite important
and must be handled as well. This is what this rev. does.
Task 1878254
When a kanban view is grouped by a char or a boolean field, and the
quick create option is enabled, the correct default value for the
grouped field (i.e. the value of the column in which the record is
created) should be given (either in the context if that field isn't
in the quick create form view, or as a default value in that form
view otherwise).
Before this rev., it wasn't the case, as it was only working when
grouped by a many2one field.
Task 1878254
when grouped on field types for which it isn't supported.
Rev. 42e1efd disabled the quick create feature when the view is
grouped by date(time) fields. However, it hasn't been correctly
forwardported to 11.0 (with the new views). Indeed, the check was
done only once, at the initilization of the view. So if the user
selected another field to group by afterwards, the quick create
feature wasn't enabled/disabled accordingly.
Moreover, we didn't check if it was available when the user clicked
on CREATE in the control panel. So even if it wasn't (and thus if
there were no '+' icon in the columns), when the user clicked on
CREATE, the quick create widget was inserted in the first column.
This rev. fixes both issues.
Task 1878254
closesodoo/odoo#27867
This fix some inconsistent error on runbot.
In mobile, some views* depend on 'jquery.touchSwipe' library which
is lazy loaded. As a result, the views become asynchronous...
It's why this library is already loaded before running tests in the
mobile test suite. So we can continue to use synchronous views whether
in mobile tests or not.
But some mobile tests weren't in mobile suite...
In desktop, 'jquery.touchSwipe' is lazy loaded and the first test will
load it for others. It's why the first one has to be asynchronous:
https://github.com/odoo/odoo/commit/da7b59045d246c159f93bc75e3f19c6b1221d31c
The inconsistency comes from the fact that all tests are sequential but
we can't garantee the execution order. So, if the test mentionned is not
the first executed one, an error will occur because the view is not
asynchronous.
Now, all mobile tests are moved in mobile suite to be sure that
'jquery.touchSwipe' is loaded.
We also set the default value for size_class because we want a
coherent environment. It is very rare to find mobile devices with
more than 474px wide.
*: form_view, kanban_view, res_config_settings
closesodoo/odoo#28195
On the user's preference, change the timezone to one that is different
from the browser.
Save the form.
Go back to the user's preferences.
Before this commit, every timezone was displayed inside the span that contain
the warning icon, and leaked everywhere on the form view.
This was because of the joint action effects of commits:
86897ca1674dfabb8f7a
Which provoked the field to be re-rendered in edit mode,
but with an $el on which a span was added. `<option/>` elements
were then added to both `<select>` and `<span>`
This did not happen before v12.0
After this commit, there is no display glitch
OPW 1895088
closesodoo/odoo#28108
Modification in 60aa9ffd0 of web module kanban_view.scss contained
unused CSS style and style that affected usage of AttachmendImage field
in a normal kanban view.
The correct code was added in commit 6e12372 in composer.scss of mail
module.
opw-1892053
closes#27923
Before this commit, when an element with access key has a CSS
position absolute , pressing the key 'ALT' to show the access
key overlay may break the position of the element.
This is due to altering the CSS position of the element which the
overlay is attached to: it becomes `relative`, so that the overlay
takes the whole size of the attached element.
In case of an absolute element, it should not become relative,
otherwise its position on the document may be completely different.
Since the overlay has position `absolute`, if its parent has also
position `absolute`, then keeping both with position `absolute` will
let the overlay take the size of the parent, without changing the
position of the parent.
Task-ID 1885445
The handler function was used directly in the code. The MouseEvent wasn't provided in that case.
This FIX split the handler function and the processing function so that it doesn't interfere.
closesodoo/odoo#27929
When header was too long, the text was breaking into next line.
We want to avoid this behavior in mobile because it causes
a big margin on the top of the list view.
This issue was probably caused by the upgrade of Bootstrap.
task-1878252
closesodoo/odoo#27927
The option `showSearchInput` has been added on the ModelFieldSelector to allow
the user to easily filter the displayed fields. An input is displayed in the
popover title.
The search method is fuzzy for optimal results.
closesodoo/odoo#27788
(mainly views and ActionManager)
- add missing docstrings
- fix typos
- correctly order functions and imports
- put functions in correct sections
- stop using 'event' as argument of handlers
- don't call handlers directly
- remove trailing spaces/tabs
- move module created in stable version to its own file
- follow js guidelines in general
closesodoo/odoo#28024
The library es5 shim was usefull for older browsers that do not implement
completely the es5 specifications, like IE9.
As we do not support browsers older than IE11, that fully supports all
the features of es5, the library has become useless.
Removing this library will remove a little bit of noise in the callstack
when debugging.
closesodoo/odoo#27877
Before this commit, if a JS module caused an error while being
evaluated, the error was silently swallowed (and only logged in debug
mode, in the extra information about the state of all modules).
With this commit, we always log the error in the console. Note that
this only applies to JS execution errors. If a file has invalid
javascript structure, then a parsing error will happen, even before the
module system has the possibility to do anythin.
closesodoo/odoo#27836
Let's assume a one2many editable list containing a many2one field
(e.g. in a sales order, the product_id m2o in order_line o2m), and
the scenario where the user clicks on 'Create and Edit' in the o2m,
and then presses ESCAPE in the opened dialog.
Before this rev., it crashed because the 'navigation_move' (cancel)
event wasn't stop propagated by the form renderer (the one of the
dialog), and thus bubbled up to the list editable renderer, which
asked its basic model to discard a record it didn't know.
Note: same fix as in 8445baa (done in saas-11.3), but with a
simpler test.
Task 1878254
In Firefox, the input behavior and visual representation (navigation, caret
placement, value selection, etc.) was broken when using a datepicker (easily
reproductible on date and datetime widgets).
This was due to the `focus` event being stopped on the input, which doesn't
seem to be correctly supported by Firefox.
The deleted code was supposed to toggle the picker when the field was clicked
(see odoo/odoo@89093a1) (toggle on click and disable focus) but the lib
correctly supports on focus without extra code.
This also fixes the fact that the datepicker was not open on focus (only on
clicked). In some tests where the field was the first in the form view, it is
now correctly autofocused.
Forward-port: not useful from 12.0 because the code has changed with BS4 and
this has already been applied in odoo/odoo@6692919 and odoo/odoo@c63630d.
Closes#23438closesodoo/odoo#27657
- fix statusbar overflowing on the right and triggering a scrollbar
- fix background of the trash icon of the editable list remove
button which was white rather transparent
- fix cursor that was not properly displayed as pointer when on
top of the trash icon, while it properly transformed in the td
closesodoo/odoo#27806
There used to be no processing done at all when loading the client
from an url missing a menu_id and from which the menu could not
be inferred from the action_id. This resulted in the app name
button in the menu being empty but still present and not bound to
any action. Clicking on it triggered a traceback.
This commit stops ignoring the case when the menu cannot be
inferred from the action and hides the entire menu and submenus
for this particular action. They will be restored when entering
an action from which a proper menu can be inferred.
closesodoo/odoo#27791
Before this commit, we tried to hide some labels depending
of the available size of the graph.
However, it doesn't worked when the graph is updated.
A much simpler solution is to use the scale’s automatic tick
generator implemented in D3.
So, in this commit, we realized that 'tickValues' is unnecessary
because data are passed correctly (see 'svg.datum(data);') and
labels are defined in 'ticksLabels'. There is nothing else to do.
We had to remove the skipped test because 'renderEnd' is not triggered
for line chart. We need to update nv.d3.
We already tried to fix this issue in the following commit:
https://github.com/odoo-dev/odoo/commit/c4937132a38873761fa0ac0b41c983b917cb52f1
Documentation:
https://github.com/d3/d3-axis#axis_tickValuesclosesodoo/odoo#27828
Revision on https://github.com/odoo/odoo/commit/b7cf456560dc4fd7c1217ba90f0b5609466ede50
The commit above assumed the function `change_menu_section` was
mistakenly removed. However, it was turned into a handler function
and renamed according to our JS guidelines `_onChangeMenuSection`.
This commit removes the duplicated logic by removing the
function `_onChangeMenuSection` and using `change_menu_section`
as the handler for the bus event `change_menu_section`.
closesodoo/odoo#27809
Before this commit, the compute sequence was relying on the fact the ID was used
as a secondary order key to get the right result.
This is necessary when adding items between pages because we don't resequence
the following elements.
However this was not necessary when adding new elements on the last page since
there are no following elements to resesquence in that case.
PR: #27639
Image field widget need the __last_update field alongside them
for caching purposes, though that field should never be present explicitly
in the views
Before this commit, the dependencies of field widgets were not merged into
the model's fields definition, creating a traceback when adding an image field widget
into a x2many list
After this commit, there is no traceback and the image field works properly
closes#27545
Before this commit, when clicking on a link in a kanban
record having `href` that is set, it was opening the record
and accessing the `href`.
The intended behaviour is to not open a record if any children
component of the record contains either a click event or is
a link with `href`. The former was correctly handled, but not
the latter.
This commit fixes the issue by preventing opening the record
when clicking on a inner link with href from a kanban record.
Closes#24664closesodoo/odoo#27529
Have a user in English, put a sale report as "favorite" (pinned to dashboard app)
Change the user's language
Before this commit, the pinned view was in English (because it was recorded that way)
After this commit, the pinned view is in the user's language.
OPW 1890664
closesodoo/odoo#27574
The reference widget is expecting a models list as selection attribute
in the field declaration.
It does not exist in the case of the char field.
Support for char fields was added to allow for external identifiers,
but it only works in readonly.
As a consequence, it tracebacks in Edit mode when used in studio.
We thusly remove char field from the list of supported fields.
opw 1892602
closesodoo/odoo#27708