Commit Graph
103218 Commits
Author SHA1 Message Date
Raphael Collet baa3ce58fd [FIX] models: update field transient only, and do not modify state
Fixes regression introduced at 4d9e36a459
that caused all custom (manual) models to be reset to "base" models.

This prevented the creation and proper use of custom models.

opw-657017
Closes #9670

Partial version of #9663
2015-11-20 17:36:23 +01:00
Yannick Tivisse 9f2b6e00ef [IMP] website: Add a class btn-multi-line to allow multi line labels on buttons
On website_quote, according to the translation, the label may become much larger than
the button width. By default the bootstrap btn class has the property 'white-space: nowrap'
Here the goal is to add a class which will be used for these kind of cases.
2015-11-20 16:41:37 +01:00
Aaron Bohy a8239cd2ae [FIX] im_livechat,mail: detach chat on the receiver side
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.
2015-11-20 15:48:03 +01:00
Aaron Bohy c2dfea5cc9 [FIX] mail: correctly load livechat channels
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.
2015-11-20 15:48:03 +01:00
Aaron Bohy 1dfd1bd7a3 [FIX] mail: correctly pin DM's on message post
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.
2015-11-20 15:48:02 +01:00
Aaron Bohy c470e0bf85 [FIX] mail: only open DM on first message received
instead of directly, when the other user opens the DM on its side.
2015-11-20 15:48:02 +01:00
Julien Legros a92b558652 [FIX] mail: update_notification 2015-11-20 15:28:21 +01:00
Jairo Llopis 4eab4d7868 [DOC] reports: clarification about styles
* correct xpath to add style in report.styles
* informations about style troubleshoot

closes #9105
2015-11-20 15:21:56 +01:00
Denis Ledoux 777f215edb [FIX] website_quote: quote email template
When there is a quote template set on a sale order,
the email sent by default is the email
`Sales Order - Send by Email (Online Quote)`,
and this since 5153b2d281.

Therefore, there is no point to override the content of the
email template `Sales Order - Send by Email` to set
the quotation link in the email template, since this is not
this email which is being used for sales order with an
online quotation template.

Nevertheless, the link to the email quotation must be
put in the `Sales Order - Send by Email (Online Quote)`,
so the customer can access his online quotation directly
from the confirmation email, as it was designed and done
in the override of the `Sales Order - Send by Email`.

opw-657060
2015-11-20 14:35:13 +01:00
Joren Van Onder 5c9b4556e3 [FIX] point_of_sale: display currency amounts correctly
Displaying these amounts should be done according to what is specified
in the used language. ec29736801
broke this by redefining the format_currency_no_symbol function inside
of the function itself for some unknown reason.

Although we now use round_di instead of round_pr most of the time, there
shouldn't be any change in behavior because the POS manually calculates
the currency.decimals from currency.rounding.

opw-656565
2015-11-20 14:26:49 +01:00
Nicolas Martinelli 902c1bf085 [IMP] purchase: split onchange_product_id
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
2015-11-20 13:55:04 +01:00
Nicolas Martinelli d38f916cd8 [IMP] purchase, product: suggest minimum quantity for vendor
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
2015-11-20 13:55:04 +01:00
Lionel Sausin 6188bc6e9d [DOC] Add words of caution about sudo
Closes #9655
2015-11-20 13:52:36 +01:00
Martin Geubelle 37492e5c9a [IMP] board: I want to be an app ...
just like the others.
2015-11-20 13:30:31 +01:00
Joren Van Onder 84f9bfecad [FIX] point_of_sale: do not attempt to parse "-" as a float
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.
2015-11-20 12:15:04 +01:00
Thibault Delavallée f6fdb0b6b3 [FIX] website_forum: new post notifications
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.
2015-11-20 11:51:53 +01:00
Thibault Delavallée a6b6d02007 [FIX] website_forum: do the todo
We have a tunable parameter for flagged / offensive questions. So let us use
it instead of some other parameter * 5.
2015-11-20 11:51:49 +01:00
Denis Ledoux 8590f0445f [FIX] stock: partner_id field in incoming products list
`partner_id` is not the `supplier` of the stock move,
this is the destination address:
`Optional address where goods are to be delivered,
specifically used for allotment`.

The supplier would be a related to the `partner_id`
of the `picking_id`.

Nevertheless, displaying the `supplier` in the `stock.move` list
is not useful. You should use the pickign list for that matter.

opw-656985
Closes #9219
2015-11-20 11:28:44 +01:00
Thibault Delavallée feb86ae38c [FIX] website_forum: no auto subscription
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.
2015-11-20 11:25:17 +01:00
Thibault Delavallée 104826c311 [FIX] mail: subtypes read as sudo
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.
2015-11-20 11:25:17 +01:00
Aaron Bohy 3c0c354e19 [FIX] web: list_view: display nocontent helper after delete
if there are no more records to display
2015-11-20 09:43:58 +01:00
Fabien Pinckaers 623bfe644c [FIX] twice url in tweet 2015-11-19 23:08:20 +01:00
Fabien Pinckaers e043a0780b [IMP] Analytic Accounting Visible if active only 2015-11-19 23:04:04 +01:00
Josse Colpaert 1fa45fcfff [FIX] stock: don't prepare pack operations when not everything is reserved and delivery method is all at once
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.
2015-11-19 17:18:31 +01:00
qsm-odoo cb16d20909 [FIX] website: theme customization modal crash
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.
2015-11-19 17:14:56 +01:00
Nicolas Lempereur 068b81cfef [IMP] web: graph legend tweaks when many item
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
2015-11-19 16:24:09 +01:00
Goffin Simon 38c80ad7f9 [FIX] warning: Blocking messages with PO
Before the fix, it was possible to create a PO with a vendor who had
a Blocking Message set on.

opw:656875
2015-11-19 16:19:01 +01:00
Goffin Simon e42e6d4b0d [FIX] website_quote: old api on_change_product_id
The old api on_change_product_id function in model 'sale.order.option'
doesn't receive the order_id to compute correctly the price unit for
suggested products. The new api _onchange_product_id function has exactly
the same logic as on_change_product_id and this function receives the order_id.
Then the new one can replace the old one. But to keep the compatibility with partners
who overwrite this old function, it is kept in the code.
This bug was introduced by 5047f4e, this commit defined the product_uom_change function
which called on_change_product_id. This commit was applied in saas-6.
The onchange calls in the views have be removed because all the new api onchange are called
even if they were still there.

opw:656494
2015-11-19 16:10:34 +01:00
Xavier Morel c6d6ae8aec [FIX] qweb: handle unicode tags and attributes
closes #8895
2015-11-19 14:59:44 +01:00
Nicolas Martinelli b528afe299 [FIX] purchase: correction of correction of wrong portage
Really fixes #9252
2015-11-19 14:42:49 +01:00
Nicolas Martinelli d28865fba4 [FIX] purchase: convert to invoice currency
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
2015-11-19 14:42:49 +01:00
Thomas Groutars b665478fa7 [FIX] py.js: unhandled prefix not
closes #6129
2015-11-19 13:54:26 +01:00
Nicolas Martinelli b2a30a1747 [FIX] purchase: delivered quantity
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
2015-11-19 13:21:52 +01:00
Nicolas Martinelli b53ff53cdb [FIX] purchase: do not create stock move for services
If a PO containing services contains at least one stockable/consumable
product, stock moves are generated for these services, which is not
correct.
2015-11-19 12:08:43 +01:00
Christophe Simonis 2450e57775 [MERGE] forward port of branch 8.0 up to f57e580 2015-11-19 11:56:03 +01:00
Denis Ledoux 4f00372eb1 [FIX] portal_sale, website_quote: jinja2 compatible templates
When editing the email template with the wysiwyg,
`Greater than` & `lower than` are automatically escaped
to &gt; & &lt;, screwing up the jinja2 condition.

This change in the condition makes this Jinja2 condition
compatible with the wysiwyg.

opw-654270
2015-11-19 11:27:14 +01:00
David Monjoie 6e6d6362df [FIX] website_sale_digital: fixed attachment count
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.
2015-11-19 11:22:34 +01:00
pvy 17b131b404 [REF] account: get_followup_lines_domain now may be given ids to exclude 2015-11-19 10:52:50 +01:00
Géry Debongnie 1dc32c7277 [FIX] website_links: we dont want no crash in nvd3
nvd3 was updated recently, and its api has slightly changed.  The call
to nvd3 was no longer correct.
2015-11-19 10:17:22 +01:00
Joren Van Onder 317c6b82a2 [FIX] point_of_sale: compute the tax based on the rounded price
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.
2015-11-19 09:12:50 +01:00
Joren Van Onder 07a89b8aee [FIX] pos_restaurant: fix customer deselection in the POS
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.
2015-11-19 08:35:23 +01:00
Aaron Bohy cdc71ba9a7 [FIX] im_livechat: rating shortcodes' type is image
...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.
2015-11-19 08:16:56 +01:00
Aaron Bohy d519ce5596 [FIX] mail: channels: don't send email by default
Disable this option by default as it might be very costly on channels with a
lot of members. Should be manually set to true on massmailing channels.
2015-11-19 08:16:56 +01:00
Thibault Delavallée 870c822ac5 [FIX] mail: incoming email parsing
Correctly flag and remove nodes to remove containing odoo buttons.

Backport of revision aece706603 of saas7.
2015-11-18 17:23:26 +01:00
Denis Ledoux 49a0eae805 [FIX] mail: mails fetch
`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
2015-11-18 17:02:13 +01:00
Denis Ledoux 2fc6e94d8a [FIX] ir.config.parameter: set_param with None/False as value
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
2015-11-18 17:02:13 +01:00
qsm-odoo f137921d12 [FIX] web: formview autofocus when attached
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.
2015-11-18 17:00:34 +01:00
Goffin Simon 3783289ece [FIX] account: _default_line_ids for a account.payment.term record
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
2015-11-18 16:15:58 +01:00
Nicolas Martinelli c354a101fd [FIX] sale: calculate price subtotal in pop-up
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
2015-11-18 16:12:07 +01:00
Thibault Delavallée e1b610b705 [FIX] mass_mailing: mailings on mailing lists
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.
2015-11-18 15:34:28 +01:00