The `fiscal_position` in the values dict for the `create`
expects an id, not a browse record.
This prevented to automatically create purchase order
from a sale order in an inter company environment
when the fiscal position of the companies were set.
opw-651443
Previously, if there was a sale_order_id but it was wrong,
like when the sale order was deleted for example, the function
didn't return a sale order, even with force_create=True.
It used to pass the first 'if' as sale_order_id had a value, so
no new sale order was created. However, as sometimes the id was
referring to a non-existant sale_order, a sale_order.exists() test
was used later, resulting in the function sometimes returning None,
even with force_create = True.
Proposed solution is to test the existence of the browse record with
the given id earlier, instead of testing the existence of the id itself.
On initialisation summernote call update method with oStyle.range is undefined.
The range can be undefined because the update is call before any selection and attach method from summernote call the update without range.
The method summernote_table_update try to use the range and raise an exception.
fix: Check if oStyle.range exits.
Issue: when the user create a pricelist item, the function fields (name, price) are updated only on save (the form view) and not on change.
In the pricelist form view, the 'item_ids' one2many receive empty value from the modal (name, price).
Fix: update 'name' and 'price' field to the new v8 api.
The read_group collating user badge counts is extremely slow when
there's a large number of users (possibly even slower than 8.0's naive
approach), replace the whole thing by a single SQL query seems to yield
pretty significant (~2 orders of magnitude) performance improvements on
the computing function resulting in ~1 order of magnitude improvement
for the page as a whole.
1) Domain of account.analytic.line
When an expense is created with a cost of zero, the quantity delivered
on the SO line is not updated.
2) Delivered quantity updateable if manual tracking
The delivered quantity cannot be manually modified if it is calculated.
Therefore, we need to restrict the condition to a manual tracking.
3) Upselling conditions
Upselling is possible only for a product invoiced on ordered quantities
for which we delivered more than expected.
html_escape_keep_url is now included in plaintext2html method (since the opposite method html2plaintext transform link tags into simple url text). Force the posted message to be plaintext (adding directly html is not safe), and trim the posted message before submitting it.
The url are now clickable again in chat message, but also in chatter messages !
Use the (dbname, 'ir.needaction', partner_id) channel to broadcast needaction to partner. Some message can be needaction, without belonging to a mail channel of the partner. Keep the (dbname, 'res.partner', partner_id) channel for conversation header.
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.
The field timesheet_ids (hr.analytic.timesheet) and analytic_account_id
(account.analytic.account) should not be accessible by the portal user.
Fixes#8338Closes#8354
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)
The user creating the event should be by default in the attendees (to see the event
he just created in his calendar) and the contact on the logged call
should also be in the attendees by default.
opw:650556
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
Use the parameter zoom as in `google_map_img`
Change the default value to 10 to avoid changing the behaviour for existing
links (zoom was not used anyway).
Closes#8318
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).
Closes#8754
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.