The computed fees can depend on the country.
There was a typo about it:
there is no `country_id` field on the `payment.transaction` model,
it's `partner_country_id`.
Therefore, the computed fees according to the country
were not always correctly computed.
e.g. for Paypal, where the domestic fees
are lower than the international fees, it always
computed the fees as international.
opw-651778
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
This reverts commit bd9cbdfc41.
The above revision solved the SQL constraints not being
translated when raised. They were not translated because
the context, containing the lang, was not located as expected
in the `kwargs` dict.
While it solved this issue, it had as side-effect to raise
`current transaction is aborted,
commands ignored until end of transaction block` errors more
often when using the web client.
This can be explained by the double check, when the first
check raised this error
- which can happen, e.g. when the cursor is closed,
there is a retry mechanism in such cases -
and by the fact the transaction was not rollbacked.
This issue could have been solved as well by rollbacking
the transaction, but it is regarded as not-so-clean.
Therefore, to solve this issue, while still having
the SQL constraints translated, we apply the
second patch proposed in bd9cbdfc41
commit message, which is not-so-clean as well, but
which is a proper solution.
opw-651393
This fix is about several issue of office oulook:
- a fixed table width must be in pixel, using 100% of parent div width
doesn't work,
- a background-color on a div is not used, the background color should
be on the table inside this div using the attribute "bgcolor",
- the only way to center a table is to have a `<center>` tag arround it,
or have an element arround it with "text-align: center",
- having a background image doesn't seem to be possible.
The two first are straightforward, but for the third:
- in non-outlook: all the snippet are centered (since they all have
"margin: auto" which is valid outside outlook),
- in outlook: only a small part of the snippet with text-align:center
or `<center>` arround them are centered.
To escape a bigger code change, this commit unify the outlook
behaviour by having all of the snippet left aligned in outlook (they are
still middle centered in other application).
For the background image, we need a fallback bgcolor and thus we need to
have the background on the table element. There was also an issue
between relative and absolute url for gmail.
closes#9019
opw-650217
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.
'state', 'in', ('draft') is an invalid definition, ('draft') is not a tuple
should have been ('draft',)
Replacing by simpler 'state', '=', 'draft'
Fixes#8115Closes#9016
When using "remove" in a xml inheritance without "add" attribute, the
separator would be erronously appended at the end of the modified
attribute value.
e.g: we have "a,b" from which we remove "c", the end result would be
"a,b," which is an invalid jQuery selector.
This commit change this so empty tokens are not added to the attribute.
When delivering partially a picking in which the moves
had an owner (`restrict_partner_id`) set,
the owner were not kept in the backorder moves.
Closes#4693
In the landed cost types form view
(landed costs types being nothing else than `product.product`),
we force users to choose an account of type `other`,
in order to prevent them from entering wrong data,
other types of accounts,
or receive an error message when setting a view account type.
This domain is actually the domain already applied in the
regular `product.template` and `product.product` form
view, thanks to `account.product_template_form_view`
Closes#4719
To reproduce use a form view with a one2many editable list and create a lot of lines. Then click a few times quickly on the delete.
If the user click at least two times on delete of a same record, the dataset add the id in "to_delete" the virtual id because "to_create" doesn't contains the virtual id of the record deleted previously.
E.g.: create a "Customer Payments" and select a "Customer" and "Payment Method" who generate a lot of "Credits" lines.
Double clicking on the confirm button was actually possible and could confirm the orders multiple times (which could be problematic if some action are linked to the so confirmation)
Before this fix, it was possible to validate then cancel a quote (or the other way around) simply by using two tabs in your browser. From now on, we only validate/cancel a quote if it's the 'sent' state and advise the customer of the situation if he tries to abuse the process.
Initialise quant_dict inside for loop as doing outside loops
renders to be a quadratic write of quant object due to the fact that
previous quants are kept each time a new valuation line is read.
In case of posting a Landed Cost record with a huge amount of cost_lines
and huge amount of stock_move having several quants would result in a
extra overhead.
Closes#9005
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.