If calling more than once `sendmany` (or `sendone`) on the same http request, the `NOTIFY imbus` will tell pertinent polling thread to
fetch their notifications in the bus table, which will not contain the new notifications, since they are not yet committed. For some reason, this
doesn't happen when calling only once `sendmany`. Committing the notifications breaks the tests since no rollback is possible.
So, `self._cr.commit()` should not be called in a test environement.
In this case, we cannot use `isinstance(self._cr, TestCursor)` since TestCursor is only avaiblable for http request in test mode. Here the cursor is a normal cursor, and to determine if we are in test mode, there is no other option than checking the config of the odoo server.
Previous commit (3304b31938) was not performant enough for AL, so got special autorization to make a particular controller for mail.message author avatar. Avatar of message is avaiblable if current user has 'read' access right to the document. Otherwise the default avatar is one white pixel.
I miss commit c3c2281a4d, so the search on attachment url is useless now.
Also check if the return content is not None, avoiding to decode base64 a None object.
Before this pos_mercury would use journals of type Bank, and would not
use the Mercury configuration on journals to figure out which one to
use. This meant that it would 'wait for swipe' on bank journals,
regardless of whether or not they were configured for Mercury.
The refactoring of product added a new type of product besides stockable/consumable/service: digital
It usually behaves like a service, for example it does not need a procurement rule (which is the point of this fix)
By default the author of a message is always removed from the notified recipients.
However in some cases it is interesting to be able to notify the author. A context
key has been added that handle that case.
- fixed computation of needaction flag (typo)
- fixed order of auto subscription and message tracking: first subscribe then
track. This way messages are send to newly added followers.
- added tests in CRM to ensure this behavior works by updating the already
existing test and using the mail test class
The problem was that, when substituting the emoji pattern by the emoji icon,
we only replaced the first occurence of the pattern.
This rev. replaces all occurences of the pattern by performing a global match
('g' option), and correctly handles matches overlap by using a lookahead
assertion ('x(?=y)') instead of basic non-capturing parentheses ('x(?:y)').
Instead of using the channel's ids to communicate between the client action and
the chat manager, directly use the channel itself. This prevents many lookups
in the channels dict to retrieve the channel from its id.
When receiving a new message, we add it in the client side cache of the
corresponding channel. The problem was that when we previously unsubscribed
to this channel, it was removed from the cache, producing a traceback when
trying to add the new message.
This rev. checks whether or not the channel is in the cache, and if not,
performs an rpc to fetch its info before adding the message.
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.
simplejson and the builtin json module apparently differ in how they
decide to optimise decoding JSON strings to str rather than unicode
python strings, so check for basestring rather than one or the other.
This may also depend on the Python version.
Closes#8726
On a new database, logged as administrator, installing
``website_slides`` commonly (but not systematically) leads to a 403
error when the module install redirects to the slides
index (``/slides``).
The issue here is the installation of the slides module deletes the
existing routing map, which needs to be regenerated. The regeneration is
performed at the start of URL dispatching *before authentication* but
accesses ``request.env` in order to look up the list of installed
modules, which generates and caches (due to env being a lazy_property)
an ``Environment(cr, None, context)``.
Once regeneration and auth are done the controller is executed with
``request.env`` still being set to ``Environment(cr, None, context)``
and thus the first tentative access (search) to an object blowing up
with an AccessError. The next request or an initial request not
accessing ``request.env`` will work fine as they'll reuse the routing
map generated by the initial request.
Fixed by just getting the set of installed modules from the registry.
The only difference between payment matching and reconciliation is that
in the former the reconciliation was already made while in the latter we
do it at bank statement reconciliation time.
So they behave the same in the interface except that partial reconciliation
is not proposed for payment matching.
Main_domain for getting preferred_quants needs to be reset every time.
(otherwise the method will change it every time and it will lead to inconsistent results)
An entire pack can be moved also when the products inside require lot tracking. (check_tracking update)
There is no check if the quants have lots when a pack is moved entirely.
On the other hand, the "put in pack" checks that what is put in it has the necessary lots.
(but if incoming is without lots and outgoing with, you can still do an entire pack out without lots)
In commit bc43417b, a loading attribute is set on any submit button. The
problem is that this attribute is the first thing to be set. Therefore,
we cannot prevent its propagation.
Since Bootstrap sets this 'loading' attribute in a setTimeout, we need
to remove it in a setTimeout as well.