rev 6327cda0a tried to workaround the fact that the assets bundle were
unreadable when they are created in the same request by opening multiple
cursors and commiting the writes in ir.attachment. Sadly, this strategy
introduces sometimes hard to reproduce and hard to understand deadlocks
when regenerating the assets. This commit tries a ~safer strategy by not
opening multiple cursors but commiting the writes in ir.attachment when
a magic key is in the context.
On Firefox, the website page is not completely reloaded after saving or
cancelling. Because of this behavior, the Edit button is kept disabled,
forcing the user to completely refresh the page in order to activate the
Edit button.
By extending the Notification widget to create the CalendarNotification one,
we override the events key of Notification defining the handler when clicking
on the close cross. So when clicking on the cross, it doesn't close the
notification, and it even toggle the app switcher since the preventDefault
isn't performed.
Note that this should be directly handled by the webclient itself, and its
mechanism of extending widgets. This should be done in current master.
The message_last_post mechanism was introduced to have a trigger for
automated actions, but for some reason we do not use it. Moreover, it
interacts badly with the bus.
Because of the message_last_post update, concurrent transactions can
fail and be rollbacked. This is an issue because the bus commit the
transaction after writing the messages. This means that some messages
can be duplicated, and the more users are chatting, the more frequent
this will happen.
Since we don't use this field, it could be removed from the models, but
we are in a stable release, so we need to keep it for now.
When we initialize the web editor, the font size in the toolbar is
initialized to NaN.
What is done:
- Initialize the Summernote editor in initialize_content
- Render the content of the node in render_value
- Append the node to the DOM
Since the Summernote editor is initialized in initialize_content, the
node is still hidden. Since the node is hidden, Summernote won't be able
to determine the style info of the text (see method fromNode from
Style.js). Indeed, when jQueryCss is called, $node.is(':hidden') is true
which will lead to styleInfo['font-size'] = NaN.
To avoid patching Summernote, we take advantage of an existing trigger
which reloads the button content upon mouseup. This is also safer than
initializing Summernote after appending the node to the DOM.
opw-652041
The goal is to avoid recomputing field several times. Consider, for instance,
two fields F and G, such that G depends on F. Suppose that G is recomputed
before F. Saving G to database proceeds well, but when F is saved to database,
G is invalidated and marked for recomputation. Field G is possibly recomputed
twice on some records.
Avoid this situation by chosing a field such that none of its dependencies must
be recomputed; use a topological sort based on field dependencies for that
purpose. In the example above, G will never be recomputed before F.
When an error occured while executing an action (e.g. access rights), the
action manager's state was inconsistent as inner_action, inner_widget and
action_stack were all updated before trying to execute the action. Then, if the
user tried to open another action, the screen was split into two because the
reference of the previous action was lost, and thus it couldn't be detached.
We now restore inner_action, inner_widget and action_stack to their previous
state in the case of a rejected deferred.
A better fix would be to update all three variables once the deferred is
resolved, but it would require a refactoring of the way the action manager
and the view manager communicate to perform the do_push_state and to compute
the breadcrumbs. Indeed, those operations directly rely on the internal state
of the action manager, and they are performed before the callbacks in
push_state are called. Such a refactoring should probably not be done in
stable.
Partly fixes#8886.
The problem was that the action manager wasn't notified at all when something
went wrong with the view manager as the deferred returned by appendTo was in
that case never resolved nor rejected.
The introduction of the CSRF tokens in
8932c52e67 broke invoicing from the Point
of Sale. chrome.do_action('point_of_sale.pos_invoice_report') would
fail because no CSRF token is set in the POS. This fixes it using a
similar approach as in the website module.
Note: The change in `base_security.xml` is needed as xmlid must exists
when adding/removing users from group to determine the value of `share`
field.
Also add a test to reassure @odony the function fields are correctly
recomputed for removed m2m entries (see http://git.io/vCqAG for context)
The `analytic_account_id` was set after the field `active`.
This `active` field has been moved, to the top of the form,
in a button, at revision ed95043d7e.
Placing the analytic account after this field is
therefore no longer the brightest idea.
In addition, there is no longer any `parent_id` field
on the `account.analytic.account` model, making the according
domain invalid.
Fixes#8668
Fixes remaining occurences of 8.0 in the windows installer. Mainly, odoo is now
correctly installed in odoo.9.0-timestamp/ instead of odoo.8.0-timestamp/
The lost filter wasn't working:
- The domain syntax was not correct
- It tried to filter `active='f'` leads,
while, in the SQL view, they were already filtered out
with `active='t'`
We can safely remove the active=`t` from the SQL view, by default
`active='f'` records are filtered out except if explicitely set
otherwise.
opw-651746
Since invoice quantities are computed from the invoice lines linked to the so line via a many2many field, we need to overload the refund function that adds the fields on the invoice lines; explicitly copying the sale order lines references.