This commit concerns DM and livechat channels. Those channels are now
automatically detached on the receiver side. This allows users to directly
reply to DM's or livechats without coming back to the client action.
Note that they aren't detached if the user previously manually closed the
channel's chat window.
The livechat channels returned by the chat_manager's initial RPC were ignored.
Livechat channels thus weren't persistent in the client action.
This rev. cleans the returned object 'channel_slots' so that it only contains
arrays of channels. The additional mapping and partners array were useless as
the information they contained was directly stored in the DM channels.
We now simply iterate on each array returned and add each channel it contains,
including livechat channels.
DM channels are supposed to be pinned on each partner's side when a message
is post in the DM. This didn't work because we checked if the channel is a DM
by comparing its type to 'direct_message', which is not a valid channel type.
Also stop marking the DM as pinned in channel_join_and_get_info() as it is now
useless.
This commit splits the changes which affect the product_id and the
changes which affect the product quantity. The main reason is that a
product change should trigger the recalculation of the price unit,
while a change in the quantity should not trigger product-specific data
recalculation (such as the name or the taxes).
The original issue was the following:
- set a supplier for a product with a minimum quantity larger than 1.0
- create a PO for this supplier and this product: since the minimum
quantity is not met, no tax is set on the line.
- change the quantity to the minimum quantity of the supplier
- the tax is set on the line, but a warning pop up confuses the user by
asking if it is necessary to discard the line since Odoo and the user
changed the same line.
This commit prevents this warning, and moreover it will set the taxes on
the product right away.
Bonus: if you change the product of an existing line, it will not keep
the privious quantity/price values, which was the case before.
opw-656729
This commit introduces the suggestion of a minimum quantity for the
chosen vendor. The minimum quantity is suggested only if the quantity on
the line is zero. It still allows the user to set a quantity smaller
than the minimum quantity for the given vendor.
opw-654300
When inputting a payment, you can toggle between positive and negative
amounts by pressing the minus key. We use a string representation of
what the user inputs and then parse it to a float to do calculations. So
what can happen is that you can type in an amount of "-" or you can have
a payment of "-2" and do one backspace. Both of these would trigger the
problem because "-" is not a number.
Better message management, linked to the validation feature added in v9
- post a "new post to see" message only when the post is validated
- post a "new post to validate" message when the post has to be validated.
This message is sent only to followers having sufficient karma.
Remove forum creator as follower of the forum. Indeed this means that generally
the website admin will be follower of all posts of this forum. Which is
probably not really necessary.
Indeed portal and public users may have to read internal subtypes to perform some
check in the code. However the rules do not allow them to read those internal
subtypes. We have to read some subtypes as sudo then.
When all the products need to be reserved before doing the picking,
the pack operations were not shown, but still created.
This is not necessary (and did not work as it tried to reserve according to
existing pack operations), as you will need to reserve again when there is
sufficient stock to put the picking in available state and then
the pack operations will be generated and made visible.
When clicking on customize theme button or going on an url which
contains the theme=true option, the theme customization modal failed to
be launched as we did not wait for website to be ready.
The legend of the graph when there was too much items in it could
prevent user to see a part or even the whole graph.
On non-mobile device, move the Pie Chart legend to the right, thus if it
overflows the char is still visible and we can toggle the seen top
legend item.
Otherway, the legend on top is hidden when :
- there is more than 25 legend items and the device has width < 768
- there is more than 50 legend items and the device has 768 <= width < 992
- there is more than 75 legend items and the device has 992 <= width < 1200
- there is more than 100 legend items and the device has 1200 <= width
Since this is based only on the number of legend items but legend items
could have variable name lengths, there will still be edge case where
the legend obstruct the graphical data display.
In this situation the current way to cope with this further filter the
displayed data.
opw-653445
When a PO is imported, convert the prices in the currency of the
invoice. Moreover, an onchange on the currency will recalculate the
prices if necessary.
opw-656762
The field `product_qty` contains the normalized quantity, while
`product_uom_qty` contains the actual requested quantity in the UoM of
the PO line.
opw-654318
The read_group function bypasses some restrictions, and in this case
was counting the "image", "image_small" and "image_medium" attachments
of the products, thus resulting in wrong attachment counts.
I changed it to a search_count which is cleaner, simplifies the code
a lot and, more importantly, returns the right values.
Before this, we would compute taxes based on quantity * price. In
account.tax (used by the POS backend) however taxes are computed on a
rounded (based on currency precision) quantity * price. This would cause
issues as orders in the backend would have a different total price as
calculated in the frontend.
An example that used to trigger the problem:
Order with orderline with product with price of 5, excluded tax of 21%
and a quantity of 0.985. This would cost 5.96 in the frontend and 5.97
in the backend.
The issue was that the deselection button did not appear when setting a
customer and then going back into the client list. Now new_client gets
reset whenever we hide the clientlist widget, which makes the hide/show
deselect button logic work.
...and not text, which is the default value. Otherwise, they are evaluated
server-side and the produced html is escaped in the body. Smileys are thus
not displayed.
`node.get('class', '')` returns a `Nonetype`
in some cases, and, therefore,
`'o_mail_notification' in node.get('class', '')`
throws a
`TypeError: argument of type 'NoneType' is not iterable`.
Replacing by `(node.get('class') or '')` keep the behavior
that was expected, but will prevent to have a `Nonetype`
opw-656508
opw-656753
opw-653965
Use `ir.config.parameter`.`set_param` with `None` or `False`
was not allowed as `value` of a `ir.config.parameter` is required.
An attempt to set a system parameter to `None` or `False` means,
most of the time, that the system parameter should be dropped.
For instance, in configuration wizards (`res.config`),
`set_param` is used when boxes are checked, or fields are filled,
to create/update system parameters with the value given in the
configuration wizards.
When unchecking these boxes, the configurations wizards tried
to set `None` in the system parameters, leading to a warning
saying the value is mandatory. The behavior expected when
unchecking these boxes was to remove the system parameters,
not to leave them empty. Besides, there is not methods
available in `ir.config.parameter` to quickly remove a system
parameter, like there is one to set a parameter.
opw-653547
Autofocus in formview did not work when landing on the form view in
edit/create mode. This was because autofocus was called before the
formview was in the DOM.
Solution here in community is to defer the call to autofocus.
The sequence of the first account.payment.term.line must be 9 because
the default sequence for a new line is 10.
Before the fix:
When changing the value of the default line by "percent" and adding a
new line with value equal to "balance". An exception was raised because
the sequence of the default line was 500 and then this default line was
always considered as the last one.
opw:656704
When a SO line is added through the pop-up form, the price subtotal is
not calculated when the user saves the pop-up, and therefore it is not
displayed in the SO line list.
When the field is added in the pop-up, it will be calculated and
displayed right away.
opw-654283
Due to the change in 2many input / output the domain to apply the mailing was
not computed correctly. Indeed the onchange was waiting for a list of ids or
a 6, _, ids command, aka things that were send by 2many before some cleaning.
It has been adapted to the 4 command, now sent by the new onchange mechanism.
Some feature of the iframe embedded editor may require csrf token
present, thus it has been added in the same way that cea29e0c0 did.
The web editor iframe template is also used to display the value without
editing it and in this instance having the csrf has no meaning.
opw-656685
The read more / read less in chatter has been removed in the new timeline and
then cleaned timeline introduced at cc6d2aa995.
This feature has been brought back at revision 486aab5098.
However a new cleaning removed the feature at revision 2a5f07e0b9.
This commit brings back this feature for the second time. Next one brings free
cookies.
When having a tracking, the subtype description should be displayed. This is
used for tracking linked to a subtype like Task Opened, Task Blocked, ...
This feature was forgotten when refactoring the chatter for v9 and is now
back.
In some instance, the mail content of a sent form would only be text
formatted. This could lead to a message with no newline, thus making it
illegible.
This fix has to be ugly since body_html field of a mail.mail is of type
text.
In the form builder, custom field name could contain special char but
the get key values are of the type str whilst the value are in unicode
type.
Thus when concatenating them, one should be converted so they are
uniform and don't lead to an encoding error.
opw-656745