If you commit the transaction inside the context manager `cr.savepoint()`, the
savepoint is lost. In that case, releasing the savepoint fails. That failure
should not be handled by rolling back to the savepoint...
The message body must be inside a tag div because when the message was short
with a @author, there was no tag div around the body and it was displayed
inine.
opw:666840
Simplify the API and make it possible to detect fiscal positions based
only on geo information, without having to call `get_fiscal_position()`
which requires a specific partner record.
This commit simply moves the logic related to the global 'world' fiscal
position fallback (no country, no country group) into the low-level
method `_get_fpos_by_region()`, so that callers do not have to do it
themselves.
This revision is related to 100d604cb0
The above revision aimed to add the correct `content-type` headers,
the according route returning Javascript and not simple html.
HttpRequest.render` returns a Response,
and `make_response` doesn't expect a Response as first argument.
In other words, this is not possible to make Reponse from a Response.
`HttpRequest.render` accepts kwargs, including `headers`.
opw-666898
The price displayed on the event page is the
`event.ticket`.`price_reduce` field,
which is basically the ticket price(`event.ticket`.`price`)
minus the possible discount applied by the pricelist
Nevertheless, the price asked when ordering the ticket,
in the cart/checkout, was the `ticket.price`,
without the possible discount from the pricelist, therefore.
The price asked for the ticket was therefore different than the price displayed.
To reproduce:
1. Settings > Sales > Use pricelist
2. Sales > Configuration > Pricelist > Public Pricelist > Apply a 20% discount (-0.2)
3. Go to /event, -> Conference on Business Applications
4. Order 1 of each
5. Notice that the price asked is 800€ and 1200€ instead of 1000€ and 1500€ respectively
6. Hit Order now -> Notice that the price in the cart are the price without the discount
opw-665540
issue: the current leave is not display in kanban view.
_get_leave_status select the leave only if the leave finish after the end of the current day.
opw-666453
Quants should never be changed or deleted by a user.
We make it not possible anymore in the views.
And also in the code we avoid to unlink without
passing a specific key in the context.
(as we still need to be able to delete quants in case of
negative quants reconciliation)
When opening a mail template,
and choosing a theme,
then directly saving, without changing anything within the template,
the chosen template wasn't saved in the template.
Therefore, when re-editing the same template, the theme selection
re-appeared, while you had already chosen in the previous steps.
opw-665537
On iOS (at least version 8.3 and up), both Chrome (at least 47 and up)
and Safari emit ghost clicks [1] that added the product normally
rendered under the table widget to the order. So when selecting a table
without any orders you would end up with the table selected, and the
product under the table in the order after just tapping the table.
The issue is that on the table selection screen we listen to touchend
events. On the product selection screen we listen to click
events. Mobile browsers will usually emit both, first the touchend
event, then a small delay, and then the click event. The small delay is
platform dependent. Also, depending on a bunch of circumstances,
browsers adjust this delay time (see [1] for more info).
On Android this never caused issues because there the click is fired
pretty fast after the touchend and more importantly, the click event
still has the table widget as it's target. We don't listen to click on
the table widget so it gets correctly ignored.
On iOS there is a longer delay, and the click event is emitted with
whatever target is currently under the coordinates of the click.
In order to stop this from happening we'll just bind to click when not
editing. When we are editing the floor layout we'll do what we did
before.
We also bind to dragend because on touch devices it is sometimes not
easy to click, especially on small elements. You have to touch and
release the screen without moving your finger. Because the table
selection screen hides overflow there are no downsides to doing this,
and it makes selecting a table much easier and less likely to fail due
to accidental dragging.
Calling preventDefault on the touchend event is another option but did
not work on Android running Firefox 43.
[1] http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/
Two composers are appended to the client action: a basic composer and an
extended one used in mass mailing channels. Emojis are rendered in a container,
and when the user clicks on the emojis button, this container is shown.
The problem came from the fact that this container has the same classname in
both composers, so for both composers, the emojis were rendered in the same
container, producing an empty container for one of the two composers
(in this case, the basic one).
When displaying a dashboard, if a custom default filter was set on a
view it would be concatenated to a given dashboard filter.
Since it is never wanted and dashboard are embodied by fixed saved
filters, thus not needing custom filter, this fix simply disable them
when viewing the dashboards.
closes#10477
opw-660140
_mail_mass_mailing attribute is evaluated at server launch (with no context) so
the attribute is never translated.
Create a new method in mail_thread to translate again the term at evaluation but
with a correct context.
Thanks to the _(...) in the attribute definition, the proper term is exported
and present in .pot file.
Has been changed at d8e5cdec in the source but wasn't in the translations.
Replace also is .po files combined with a tx push to be able to add the new one.
Closes#10461
The default pricelist set for visitors
in the ecommerce must be part of the available
pricelists (available according to the country)
The pricelist of the public user may
not amongs the available pricelists.
opw-665536
The function scrollBottom has been removed at rev. 30c26d7 as the scroll logic
has been moved to the thread, to make it common for the client action and chat
windows.
Moreover, the o_chat_content div has been removed from the chat window layout
at the same commit, we thus now directly replace the thread's $el by the
feedback and fix less rules
Also adapt the behavior of the livechat's chat window as done for the backend
at 30c26d7:
- scroll to bottom on message sent
- increment unread messages counter if the chat window is folded or if the
thread is not scrolled to bottom
- reset the unread counter on scroll to bottom)
Field virtual_available on product.product is called Forecast Quantity but was
not on product.template.
This is not an issue to modify in stable as the term is already translated and
the translation of the string of the field is not based on the source (meaning
that, without reloading the translations, people will still see the translation
for 'Quantity Available').
Closes#10443
The less rules of the o_kanban_mobile class shoud only be applied
inside an .o_kanban_record (otherwise the span group buttons are
broken).
See 49b938a0f1.
In multi currencies, the different invoices linked to a journal can
be in different currencies, this is why the amount_total of each invoice
must be summed in the same currency.
opw:666311
- don't add 'New message from' in the title of notifications when an
author name is defined
- use a simple O icon instead of the full Odoo logo when a notification
is natively displayed
- don't scroll to bottom if the thread is not already at bottom
- don't mark a channel read if thread is not at the bottom
- add # in front of channel name in chat windows and in invite dialog
- accept anonymous names in channel (for ex, livechat channels)
- always go to the next line with shift+enter
- always send message with ctrl+enter
- pressing enter sends message or go to next line depending of context
- don't allow to detach mass mailing channels
This reverts commit a8239cd as the navbar dropdown recently introduced now
offers a quick access to channels without coming back in the Discuss App.
Moreover, this commit emphasizes the notifications navbar icon when there are
unread messages (or at least, it mutes it when there isn't).
Some UI changes:
- Unread messages in chat are now displayed as needactions in the Discuss's
sidebar (badge with counter of unread messages, instead of simply bolding the
channel name).
- The counter displayed in the navbar is now the sum of needactions and total
of unread messages in chat.
- The counter displayed next to Inbox is still the needaction counter.
For consistency between tabs/browsers/devices, the channel_seen info is now
broadcasted, meaning that every tab/browser/device will be noticed.
Also now correctly increment the unread counter of a channel if the received
message is a needaction.
The navbar notification is now a dropdown containing a preview of all pinned
channels (except Inbox and Starred), channels with unread messages being on the
top.
It allows to quickly detach a channel without going back to Discuss.
The channels preview fetching is performed only once, and it is done in
background without blocking the whole UI (using shadow option or session.rpc()).
Also fixes a synchronization problem between server and client about the folded
state of channels (the info wasn't stored client side, so it produced weird
situations, e.g. unfolding a channel didn't actually unfold it).
Former algorithm to display chat windows was pretty basic: each window was
positionned 5 pixels to the left of the previous one, starting from the bottom
right corner of the screen. Thus, when there were too many chat windows to fit
in the screen, they overflowed to the left.
This rev. handles this case by hidding overflowing chat windows and making them
available in a dropdown positionned 5 pixels to the left of the last visible
chat window.
While this is important to read the replies
you get in the threads you follow, `Unread messages`
is more accurate to describe what these filters
displays.
opw-666739
The field "amount" in 'account.analytic.line' must be in the currency
of the 'account.move.line' record because the "currency_id" field is over
written in "addons/account/models/account_analytic_line.py" and
this field is related to the currency of the move linked to the
analytic line.
opw:666538
f3f7bd9 improved some link editing behaviour by adding contenteditable
attribute on it.
But if contenteditable is set on a link, using command "unlink" on the
element for `document.execCommand` does not work.
Hence this commit adds a code so the first click outside the link remove
contenteditable.
closes#10436
second-part-of: opw-659772