| Age | Commit message (Collapse) | Author |
|
The implementation of `__len__` & `__nonzero__`
were not defined for the py types `wrapping_dict`
and `wrapping_list`.
For instance, this prevented an empty list
to be considered as `False` in domains
evaluated by the web client.
e.g., in the automatic partner merge wizard,
the domain
```
[('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)]
```
is used.
When the `partner_ids` list was empty (meaning the "partners to merge" list
was empty in the wizard), it wasn't considered as
`False`, and it therefore attempted to get
`partner_ids[0]`, which resulted to a crash, as
the list was empty.
opw-672095
Closes #11343
Courtesy of Xavier Morel (xmo@odoo.com)
|
|
x2m send_commands add options for all command to avoid onchange trigger for internal change.
|
|
- Issue: Edit sale.order form view, add new line, change product who have
taxes and click quickly on save (with slow network) => error message.
Because some deferreds are lost.
- reduce number of reads and onchange for x2m widgets
- remove before_save method and use commit_value (the issue was that if the
before_save and the change trigger an onchange, the onchange deferred is not
checked before saving the content.
|
|
The Dialog class destroys the modal (and so removes it from the DOM)
when the dialog closes but leaves the modal-open class on the body
element if there are still other modal(s) in the DOM.
The problem is that (maily on the frontend side) there may be others
modal(s) in the DOM (not handled by the Dialog class) but which are
not shown to the user, and in that case the modal-open class should
be removed.
|
|
The copied textarea used in autoresize was a valid target for focus when
using the tab key. This is a major issue in editable list views,
because when the user leaves a textarea, the list view jumps up, with no
visible focused field.
|
|
One will still be able to chat in chat windows during long RPCs...
|
|
- better width handling
- disable css vertical resize
- correctly copy css classes to the 'shadow' textarea
|
|
|
|
autosize does not work correctly (it moves the screen in all directions
sometimes when the user press enter in the bottom of the screen in some
browser),
So, we decided to have our own version, because of course, we can do it better. A
few horrible hacks later, I proudly present you "autoresize" (it was
almost named "odooresize" but common sense prevailed).
As added benefits, it plays better with our web client, so when you open
a dialog in a modal for example, the autosize fields should have the
correct height automagically (or should I say 'odoomagically')
|
|
In some cases the Referer HTTP header may be missing or
stripped by a proxy, browser extension or anti-virus.
This breaks debug mode because it was solely relying
on the Referer header.
Introducing an explicit X-Debug-Mode header for RPC
calls allows for an alternative method that works
even when the Referer is missing.
This won't work in all cases, e.g. for direct $.ajax
calls, for example.
Closes #9824
|
|
|
|
fixes #8516
note: was already solved in enterprise with 7ab5075
|
|
useless changes
|
|
Wrong underscore method called.
Issue: go on customer form view, remove a contacts in the many2many kanban view and save. The record is not unlink.
|
|
The method evict_record calls _update_cache with an empty dictionary,
which will not replace any cached value. Therefore, the cache is never
cleaned.
opw-652393
|
|
Addon mail needs to know if we are using a touch device to set or not the
focus on the chat composer. However, this information was not available in
the community webclient.
|
|
|
|
In test mode, only one cursor is available, and longpolling will take
it, and not give it back before 60s, causing a phantomjs timeout. This
commit simply return an error when the server is in test mode.
Sadly, I had to patch the web client to prevent logging the error in
this case, because that's the way phantomjs detect if there is a
problem.
|
|
* add CSRF token as core.csrf_token
* add CSRF tokens to client-generated and/or JS-submitted forms
* remove broken "compatibility" mode of web.ajax.post
/cc @dmo-odoo I've no idea how that was supposed to work, from looking
things up all modern browsers seem to support FormData, and old IEs
which don't don't support fallbacks either and would require
submitting an actual form as fallback so...
|
|
Some widgets like list editable use and change values dictionary. When the write is called, the values in the cache is equal to the changes send => field no dirty => no change triggered.
|
|
Provide a more informative error message than "undefined is not a
function" when a method passed by name to the events object is missing
on the widget.
|
|
url from livechat to male it work outside odoo server. In website_livechat, the web.session js namespace is redifined, and i'm still not sure this is a good idea
|
|
to compute the offset of a DOM element
|
|
When a button in the modal's footer has an onclick handler and closes the
modal, the action of closing the modal should wait for the potential deferred
returned by the handler.
For instance, if an handler performs an asynchronous call and, when resolved,
triggers a notification, the notification doesn't reach the webclient if the
modal is already closed because the widgets hierarchy is broken.
|
|
|
|
This attribute can be used when the view needs a searchview but wants it to be hidden.
|
|
|
|
Contains a new ajax post function that comes from mdo's
original code and that I was not able to get rid of.
|
|
Widgets and website display images or display the type with icon like pdf, doc...
|
|
from 500 to 1000, as requested by fp
|
|
contain the record
|
|
|
|
|
|
The dataset implementation has been improved to handle the result of a `read`
on ids that are already modified in the dataset: the lists `to_create` and
`to_write` are updated properly.
|
|
Add a key icon in the view's prototype corresponding to the font-awesome icon
to display in the view switcher.
|
|
If the module barcodes is installed, a BarcodeEvents singleton is
automatically instanciated. It listens to keypresses and, when a
sequence of keys represents a barcode, it broadcasts a 'barcode_scanned'
event on core.bus containing the barcode string.
|
|
Since rev. 16eb36ff, do_show() and do_hide() on widgets toggle the classname
o_hidden on which the rule 'display: none' is defined, instead of calling
jQuery's show() and hide().
The method do_toggle(), sharing the same logic, has been introduced in rev.
74c5f772.
From now on, every widgets should call do_toggle() instead of $el.toggle() as
it will have undesiderable effects (they should call do_show() and do_hide()
instead of $el.show() and $el.hide() as well, this as been done in 16eb36ff).
This rev. replaces all calls to $el.toggle() by do_toggle(). It also adds
an optional argument to do_toggle() to force hidding or showing the widget.
|
|
Add "Alert" and "Confirmation" as default titles for
alert and confirm dialogs
|
|
This allows to open a simple message dialog with potential
action when the unique "ok" button is clicked
|
|
|
|
Backport of the Notification system
|
|
|
|
The problem of $el.show()/hide() is that calling show() on a jQuery element on which
there is no display rule in the stylesheet automatically sets 'display: block'.
However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet
applied, meaning that calling show() will set its display to block (in inline style),
even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the
priority over the stylesheet, the correct display won't be applied, even when the widget
will be appended in the DOM, resulting in a possibly broken layout.
|
|
The main purpose of this commit is to be consistent with the enterprise edition,
in which the event 'DOM_updated' is triggered when new content is inserted in
the DOM. This way, addons that need to know when a view has been attached in the DOM
(e.g. web_tip) can listen to this event and will work fine with both editions
of the web addon.
With the actual structure of the webclient (action_manager, view_manager),
there is no easy way to decide whether or not a view is attached in the DOM,
because every rendering is performed in a detached element. For instance,
when a view_manager instantiates a new view, it appends it in its $el once
the view is ready, but it can't know if its $el is attached in the DOM (it is
only the case if the view_manager is the current action of the action manager).
This rev. introduces utility functions to centralize the appending/prepending of
content, so that an event can be triggered (at a unique place) when the content
is really in the DOM. These functions are used by the the action_manager and the
view_manager.
Another change is that the action_manager keeps the view_manager informed when
they are attached in/detached from the DOM, through the variable is_in_DOM.
|
|
|
|
for html field) and website
|
|
must call web.DataModel.
|
|
takes now an object of options for the Dialog, containing two possible
callbacks (for confirm and cancel).
|
|
introduced by forwardport: a3041949364141eaa66b22ab0d72227b675df324
initial commit in 8.0: 19eda68547917cfabe923ea41edb8ac7beb141b6
|
|
|