bus.poll() should be a private function, as it initializes a new longpolling.
Only bus.start_polling() should be called as it prevents running multiple
polls concurrently.
On the website, bus.poll() was called each time the user clicked on the
livechat button, blocking the whole UI if the user clicked 6 times in a row on
that button, as only 6 RPCs can be done concurrently.
A consequence of this fix is that the poll isn't restarted if the user opens
a new livechat session just after closing one, so the messages sent through
that session are delayed (~50 seconds). To circumvent this situation, we simply
don't restore the livechat button after closing a livechat session (the button
re-appears anyway at the next click, or after a refresh).
Long messages are not displayed entirely, but a 'read more' button is displayed
and allows to show the whole message. This button is an <a> inside a <span>,
both having classname 'oe_mail_expand'. Also note that messages are html, not
plain text.
Sometimes, the long message is truncated at some point that the 'read more' is
inserted inside an <a>, which is not html valid (nested links). In this case,
the browser automatically moves the inner <a> out of the outer one.
Unfortunately, when that happens, clicking on 'read more' redirects to the app
switcher because of missing prevent_default(), as the event handler was bound
on the <span> clicked, not the inner <a>.
This rev. simply binds the handler on 'oe_mail_expand', not specifically on
its <span>.
Before this rev., only the root user was allowed to do so, because some
operations were performed on the channel just after the user had been
unsubscribed (to trigger the unsubscribe notification on the bus, and to post
the 'left channel' message).
When several channels followed the same document, and a message was sent in
this document, the unread counter of each channel was incremented by the number
of following channels (because as many notifications were sent on the bus, and
for each notification, we incremented the unread_counter of the channels in
which the corresponding message is posted).
This rev. makes sure to only increment the unread counter once, if the message
is not yet in the JS cache, i.e. if this is the first notification we receive
for this message.
- don't display subject for messages coming from chatter
- better tooltip on the leave channel button in client action sidebar
- don't squash nearby messages in chatter
- reduce margin of date separator in chat windows
When the kanban view is grouped, it did not correctly set the ids of the
dataset. Consequently, the user could find himself in some weird
situation, such as having X issues visible in a kanban view (typically
grouped with a custom filter), then clicking on it, and arriving in a
form view with Y issues, and X != Y.
In saas-6 the editor assets were always included, in 9.0 only for
designer but if website_forum is installed it should also be included.
fixes#9402closes#9852
note: should not be forward ported after saas-8
The decimal precision displayed for the quantities
should be the same in the point of sale interface
and in the back-end.
Besides, the decimal precision of the pos order lines
quantity should be the same than the decimal
precision of the sale order lines quantity.
opw-657591
This commit fixes two bugs on followers:
- when landing on a form view, the followers' dropdown is now correctly filled
- when editing the subtypes of a follower while not being ourself a follower,
the subtypes are now correctly displayed in the modal.
Full composer messages were not loaded in the chatter when sent. We
lost that functionality sometimes in the previous months. This commit
makes it work properly again.
Some refactoring were required, we needed a way to load messages with a
given res_id and model.
message_ids contains the ids of all the messages. However, a maximum of
100 messages are fetched when a page is open, and therefore some
messages might not be found in the JS cache. This leads to
message.is_needaction throwing an exception.
This fix returns True if the message is not found. It means that the
message will be set as 'read' even if it is not displayed.
opw-657896
URL attachments are now returned as data and not redirection.
If the url does not match with a module file, the 301 status
(redirection) is still returned.
This allows to use the /web/image/<xmlid>/<dimension> route
and get an image attachment with correct dimensions.
At the end of the production, the cost of produced product should be the total
cost of production (cost of components + worklogs) for real time product.
The previous behaviour was to take the standard price from the product which,
in real time product, is the last purchased price, which is 0 for manufactured
product.
opw 657419
The 'cron_remove_empty_session' is performed every day and removes livechat
channels that contain no message.
The problem was that the cron might have been executed between the moment a
public user clicked on the livechat button, creating a new empty channel, and
the moment this user sent the first message through that channel. If that
happenned, the message was sent in an unexisting channel, and obviously never
received by the operator.
This fix makes sure that removed empty channels haven't been created or
modified within the last hour.
The problem occurred when the im_livechat cron 'cron_remove_empty_session'
removed empty livechat channels (a public user clicked on the livechat button,
creating a new channel, but never sent any message in it). The empty channel
was deleted by the cron, but the two records in the mail_channel_partner
relation table (linking the channel with the public user and the livechat
operator) wasn't removed, and the value of their field 'channel_id' was None.
When this happenned, it broke the SQL query of 'channel_search_to_join()', the
RPC call performed when clicking on '+' new to public channels in the client
action, resulting in no result displayed in the dropdown.
With this fix, records in the relation table are automatically deleted when
their corresponding channel or partner is deleted.
Those messages can be read from the client action interface, where the onclick
redirection is properly handled, but they are also sent by email. The
generated links should thus have a correct href.
Clicking on the author of a message opens a DM with the corresponding user if
there is one, and opens the corresponding partner's form view otherwise.
When the author is the current user, obviously we don't want to open a DM with
ourself, but we probably don't want to open our partner form view either, which
was exactly the behavior before this rev.
- clicking on a channel mention (or a user) from a chat window opens a new chat
window for that channel
- clicking on any other link in a chat window correctly opens the corresponding
document
2 minor changes were required:
- use do_show() instead of on_reverse_breadcrumb() to update control panel and
url in client action, as other actions can be stacked over the client action,
e.g. by clicking on a document link in a chat window. In that case, the
on_reverse_breadcrumb callback wouldn't be set, and thus the control panel and
url wouldn't be updated by coming back to client action using the breadcrumbs.
- channel_join() now checks whether or not the channel has already been joined
(i.e. if it is in the JS cache) before performing the RPC. This check was
performed by each caller, so this simplifies the code.
When raw materials of finished products are tracking with lot or serial
number, using the "Play" button on the work orders will never trigger
the pop-up asking for the numbers.
This fix prevents the MO to be set on "Done" if any product with
tracking activated is found. This will force the user to click on
"Produce" to finish the process, and therefore enter the serial numbers.
opw-657586
The `amount_residual` computation depends on the fact
the `acccount_id` of the move line does allow reconciliation
or not. If it doesn't, the amount residual will always be 0.0.
So, if you check the "allow reconciliation" on the account
after creating the journal items or after changing the
debit/credit amount, the amount residual is not recomputed.
We do not set the `depends` directly on `account_id.reconcile`,
as, if we do, and a user checks/unchecks this box on an account
having a lot of records, this will recompute this residual
amount on all lines, and this is something we do not want
to happen.
The work-around when this case happens,
that the amount residual is not correct due to the fact
the `allow reconciliation` on the account
was checked after having posted the entry,
is to cancel the entry and repost it. This
will recompute the residual amount.
opw-656972
When an email is sent through the "Contact us" page, it triggers the
creation of a lead or an opportunity depending on group_use_lead. The
issue is that if group_use_lead is set to 0 ("Each mail sent to the
alias creates a new opportunity"), the user will never see the customer
information entered in the contact form such as the name.
It was therefore decided to make this tab visible even if the leads are
not used.
opw-657154
Email alias is now visible in the form view. Indeed it is displayed in the
kanban view. However in order to edit it the user had to go into technical
group in the form view. This is confusing. Advanced alias configuration
is kept in technical group.
In project, stages are shared between projects. However demo projects do not
have any stage by default but stages are assigned to some random stages. This
leads to columns disappearing from the kanban view when there are no more
tasks or issues in it.
Also fixed the addition of followers in a demo project. Instead of hardcoding
the followers use a message_subscribe instead. It was impossible to reload
the project module before that fix.
project.project: alias should be visible without being in technical group.
Indeed the alias is displayed in the kanban view. However in order to edit
it the user has to go into technical mode, which is confusing. The alias
is now displayed in the form view, but advanced alias configuration is still
in technical group.
project.stage: show projects using the stage. Without that field it is quite
impossible to configure the use of stages in the project application.
with the recent update of nvd3 to the last version, we fixed a lot of
tooltip issues, but we introduced at least a new problem: when a view
is detached from the dom with a visible tooltip, it no longer is cleaned
up.
In this commit, we simply remove all nvtooltips when we detach a kanban
view (necessary because dashboards inherits from kanban). This is not
really an elegant way to solve the issue, but at least it works. any
improvement is welcome.