Commit Graph
103218 Commits
Author SHA1 Message Date
Aaron Bohy 2b99a36921 [FIX] mail: sent messages are plaintext
The problem was that users couldn't write characters like <, > in their
messages because the messages are html (e.g. '3 < 5' resulted in '3' because
this wasn't html valid so the second part was trimmed).

Because of mentions, we can't force messages to be plaintext (mentions are
processed and replaced by html links before the message is stored in DB).

The solution is to escape them just before processing the mentions. In the case
of chat windows, we must be careful because chat windows are also used for the
livechat, for which messages are plaintext. So the escaping should be done for
chat windows in the backend, but not in the livechat.
2015-12-16 15:48:42 +01:00
Aaron Bohy f5e4fbb20c [FIX] mail: correctly redirect to channels
Clicking on a channel link should open that channel in Discuss, not the channel
form view.
2015-12-16 15:48:42 +01:00
Raphael Collet 1fb0136f5a [FIX] fields: in onchange, do not serialize the inverse field of a one2many 2015-12-16 15:39:15 +01:00
Antonio Espinosa fc3c0b22f9 [FIX] mass_mailing: absolute URLs to email images
Partial backport of 9.0 commit a14f89c8 to 8.0
<base href=""> are not well supported in some webmails
Replace absolute URLs by full path appending the domain.

Closes #10062
2015-12-16 15:17:09 +01:00
vnsoft 4b635a1da7 [FIX] report: barcode controller: correct humanreadable handling
humanreadble arg comes as a string, so bool(0) was True. Cast it to int before.
2015-12-16 14:48:25 +01:00
Cedric Snauwaert 47359af3af [FIX] account: when doing a reconciliation from journal items, amount was rounded with incorrect precision 2015-12-16 14:44:03 +01:00
Jairo Llopis 5425316eff [FIX] auth_signup: no SQL error for duplicated user
In case of registration with an already existant user, an SQL error 'duplicate
key value violates unique constaint res_users_login_key...'
Replace by a more user friendly error.

Fixes #10068, opw 659913
2015-12-16 14:16:49 +01:00
Nicolas Lempereur b9520e22e9 [IMP] web: m2m_tags support _rec_name != 'name'
Currently, the m2m tags widget would only display the name present in
the "name" field. This prevent them from being used with custom
fields/models and other niceties.

opw-658490
2015-12-16 12:03:43 +01:00
Holger Brunn f9f7669e60 [FIX] pass context as keyword argument to search()
closes #10080
2015-12-16 11:42:05 +01:00
Denis Ledoux cb9d7982c1 [FIX] payment, website_sale: condition to recreate a payment transaction
Before this revision, in the ecommerce,
a new payment transaction was created only
when the transaction reference was different than
the order number, meaning that the transaction id
in the user session no longer refers to the current order,
that the user created a new order which has nothing
to do with the transaction he has in his session
variable `sale_transaction_id`

This made sense when the transaction reference
strictly matched the order number, but,
since f89e8f9df2,
this is possible that a payment transaction reference
number no longer strictly matches its order number,
as the transaction reference can contain `-1`, `-2`
at the end of its reference, meaning there was
already another transaction existing with the sale
order number as reference. But the transaction
is still about this order.

Therefore, from this revision, the condition on
which a new transaction has to be created
should no longer be based on the transaction
reference, but to which `sale_order_id` the transaction belongs.

In addition, we add two more conditions for which a new transaction
should be created:
 - The transaction has been cancelled or in error
 - The acquirer has changed.

For the second case, this is to handle a corner case:
 - The user selects one payment acquirer (Ogone), then click
   on "Pay now", and is therefore redirected to the payment provider website (Ogone)
 - Then, the user opens a new browser tab on the ecommerce, on his cart,
   choose another payment provider (Paypal), then click "Pay now" and is
   redirected to this second payment provider website  (Paypal),
 - Then, the user comes back on the first tab, on which he is on the first
   provider website (ogone), and pays/validate the payment
 - Then, we receive the payment feedback (either from the user/DPN, either from
   the server to server call/IPN)

Before this revision, this use case would have lead to the feedback from the first
provider (`/payment/ogone/accept`) while the transaction is set with the second
payment provider (`Paypal`), therefore breaking the payment validation.

Creating a new transaction when the user changes of payment provider solves this issue.
He will nevertheless be able to pay twice, on each provider, but it was
already the case before.

opw-659294
2015-12-15 18:31:12 +01:00
Olivier Dony b4949f757c Revert "[FIX] web: Can't save a x2m in list editable if contains a m2m_tags with a color field"
Reverted because it causes issue #10083 when serializing
nexted x2many values, and produces invalid x2many commands,
such as:

    `[[6, false, [[5, false, false], [6, false, [8]]]]]`

Pending a proper fix for the oririginal issue.

This reverts commit 7e2628aeb2.

Closes #10083
2015-12-15 17:55:35 +01:00
Richard Mathot 494e481b6e [FIX] website_sale_delivery: use sudo mode for reading carrier info
The "delivery" module restricts the access to delivery.carrier objects.
There is no reason to relax this in website_sale_delivery.

Furthermore, nearly all the code of website_sale_delivery accesses
delivery.carrier in sudo mode already.

Closes odoo/odoo#9812
2015-12-15 16:59:25 +01:00
Danimar Ribeiro 1ac94db8e8 [FIX] context to map_tax
Missing context to map_tax calls
Fixes #9909
2015-12-15 16:10:16 +01:00
Goffin Simon 1995c347b6 [FIX] stock_account: _store_average_cost_price
The function "_store_average_cost_price" doesn't have to update
the average cost price of a product if qty of the product in the move
is equal to zero.

opw:659329
2015-12-15 16:03:25 +01:00
Nicolas Lempereur 61398b2b46 [FIX] calendar: recurrent event after first occurences
The current code to show reccurent event would mingle on a searched
domain and add recurrency test leaves as alternative next to a leaf:

  ('start{,_date,_datetime}', '>=', '{date value}')

But in 43a12e9 the domain generated by the client was simplified, but
the had not yet been updated to reflect this change.

fixes #9165
closes #10084
opw-658241
2015-12-15 15:41:12 +01:00
David Monjoie fda5021e6b [FIX] mass_mailing: added missing models in form view
In 9.0, we created a simplified form view for mail templates, in
which the model_id field is retricted to show only the models for
which mass mailing makes sense. However, two of those models were
forgotten. There should have been some sort of override in their
respective modules, but considering the nature of the domain
attributes, there is no easy way to write such overrides, which is
probably why there wasn't any override to begin with. We decided
with tde and al to just add these models in mass_mailing, thus
breaking module abstraction, but avoiding a very complex override
mechanism for a rather simple case like this.
2015-12-15 15:20:27 +01:00
Goffin Simon cd5638ef46 [FIX] purchase: _default_picking_type
The function "_default_picking_type" must return a browse record.
2015-12-15 13:38:28 +01:00
David Monjoie f1ed73e5ea [FIX] stock_account: default on lst_price instead of list_price
The list_price field doesn't take the extra price of variations
into account. Actually, it's not even a field of product.product.
The lst_price, however, is defined on both product.template and
product.product and does account for the extra price of variations.

OPW 659330
2015-12-15 12:29:02 +01:00
Christophe Matthieu 16a3bc7f22 [FIX] web_editor: unbind summernote mousedown on detach/stop editor 2015-12-15 10:47:50 +01:00
Christophe Matthieu f3f7bd9f24 [FIX] web_editor: help the user to edit the link
User can't edit the first and last chars of a link (same issue for a lot of editors), and users don't want to click on edit link button in the editor bar.
When the user click (not if the user use arrow) on a link the link is activate with a content editable true and can edit the first and last chars.

opw: 654280
2015-12-15 10:47:50 +01:00
Nicolas Seinlet 5f35530615 [IMP] Stock: various small optimization to load barcode interface faster
Perform search_read instead of read then search
Perform some RPC in parrallel instead of sequentially
Do not reload uls everytime
2015-12-15 10:27:36 +01:00
Yenthe 8e81abfeb5 [FIX] Scaffold according to new module structure
fixes #10074
2015-12-15 10:17:59 +01:00
Florian Bruhin ccc26849e4 [CLA] Florian Bruhin
Closes #10045
2015-12-15 10:10:34 +01:00
Aaron Bohy 17896a92da [FIX] mail: various ui improvements/fixes
* chat windows:
  - input was kicked out of the window on chrome 43
  - don't animate if folded by default (e.g. after a refresh)
  - width and height 100% like in the frontend
  - z-index to make sure that they are over bootstrap active btn,
    but below notifications, and modals

* chatter:
  - internal note: send button renammed to 'Log'
  - send button is the first button again
  - remove annoying form view widget's tooltip

* client action: focus on composer on channel change
2015-12-15 10:01:21 +01:00
Aaron Bohy 1029571c35 [FIX] im_livechat: various fixes
- Don't display livechat button if no operator available
- Livechat windows persistence through website pages
- Auto popup feature re-introduced (inadvertently removed at rev. f23f57cc)
- Operators that are 'away' are available, as 'away' means that the focus isn't
  on the Odoo tab for at least 10 minutes, but the user is still connected.
- Avoid duplicated messages when the visitor is a connected user
- Unfold livechat window on first 'close' click as the event is intercepted to
  ask the user feedback before actually closing the window
2015-12-15 10:01:20 +01:00
Denis Ledoux 11911fe057 [FIX] portal: portal access management for partners having users
When the partner already had a user,
checking `in_portal` of this partner and applying
the wizard raised the fact there was already a duplicated
user for this email, even if there wasn't.

This is because the system relied on the fact
the field `user_id` of the `portal.wizard.user`
was automatically filled with the partner user if
there was one, but it was not the case:
This `user_id` field is a simple many2one field,
not computed, and the assignation was done nowhere
when the partner already had a user.

The assignation should be done in the `onchange_portal_id` method
of the `portal.wizard` model, like the other fields
`partner_id`, `email` and `in_portal`,
but if we do it know, as the `user_id` field is not
in the view (not even in `invisible`), the
web client will ignore it even if returned by
this `onchange_portal_id` method. It was therefore pointless
to solve this issue by adding the correct `user_id`
in the `user_ids` returned by this onchange method.

We could add `user_id` in invisible in the view,
but existing databases with the current view
will not benefit of the bug fix without updating the according view.

This revision therefore replaces `wizard.user_id` by
`wizard.partner_ids.user_ids[0]` everywhere where it's needed to
know if the partner already has a user or not.

Besides, it takes care about the fact his user could
be disabled (`active` False).

opw-659339
2015-12-14 18:43:56 +01:00
Thibault Delavallée 7a3ad6ba4c [FIX] rating: reuse ratings from the same customer
Otherwise Micheline ratings will be overridden by Raoul ones.
2015-12-14 17:10:49 +01:00
Thibault Delavallée 14008d055b [FIX] crm: default sales team computation
Delegate the whole default sales team computation to the _get_default_team_id
of sales team to ease the overriding and understanding. Otherwise part of the
behavior is implemented in crm, part in sales team, leading to a difficult
overriding.

Order

 - team the user is member of
 - team in context
 - Direct Sales
2015-12-14 17:09:35 +01:00
David Monjoie f6dd8994d6 [FIX] mail: fixed redirect to messaging url
I checked with aab, and action definition comes after # and not ?.
2015-12-14 14:51:27 +01:00
David Monjoie 9c43f79627 [FIX] web_planner: modal body height in IE11
Credits go to qsm for the fix.
2015-12-14 14:20:38 +01:00
Goffin Simon eb993b7f3b [FIX] purchase: supplier taxes in onchange_product_id
When adding a line in a PO with the SUPERUSER_ID all the record rules
didn't apply on him. Then all the supplier taxes set on the  product
were written in the PO line even if some of its were not in the company
of the user. Then with the SUPERUSER_ID, just the company taxes of this
user must be applied. Inspired from product_id_change in model
'sale.order.line'.

opw:659236
2015-12-14 12:15:12 +01:00
Goffin Simon 2150a6f1e9 [FIX] crm: on_change_partner_id in crm.lead view
The function "on_change_partner_id" defined in the model "crm.lead"
must be triggered each time the field "partner_id" is modified.

opw:659239
2015-12-14 12:04:38 +01:00
Sylvain GARANCHER 80b373f1e5 [FIX] ir_model: Fixed XML data recreation when inherited part are not deleted
Description: When updating the product module, if the "Service"
product.product has been deleted, but not the corresponding
"product.template" part, the update will crash on a "duplicate xml id"
error.

This commit fixes the bug by :
- Adding the link to existing inherited model xml id in values
- Avoid creating the duplicated XML ID

If the XML ID is found, but orphan, it's simply deleted.

Closes #8966
opw-658454
2015-12-14 11:46:49 +01:00
Raphael Collet a3697483bd [FIX] base_action_rule: fix method _check according to _process 2015-12-14 11:43:12 +01:00
Olivier Dony dde3432fb2 [FIX] res.lang: do not leak load_language global
During database creation via the database manager,
or when using the startup option `--load-language`,
the selected language(s) will be installed as soon
as either:
 - the base module is installed/updated (because
base_data.xml includes a call to res.lang.install_lang()
 - the registry is loaded (after loading `base`,
the system installs the requested languages, even
if the server is not in update/install mode)

This is implemented by passing a global config
option `load_lang

This behavior was modified as of saas-7 by PR
for the command-line and for the database manager.

In both cases, we don't want the installation
to be repeated the next time either of these
event occur. Essentially the `load_language`
2015-12-14 10:24:59 +01:00
Olivier Dony e62b9e7c93 [FIX] registry: explicitly log registry loading errors
In case the caller happens to silently catch
the exception, leading to hard-to-diagnose
registry/routing problems.
2015-12-14 10:24:59 +01:00
Odoo Translation Bot 63414bef54 [I18N] Update translation terms from Transifex 2015-12-13 02:56:20 +01:00
Odoo Translation Bot 5254e31a46 [I18N] Update translation terms from Transifex 2015-12-13 01:27:04 +01:00
qdp-odoo 2a89c926ec [FIX] analytic, addentum to commit f6d6762dc7: added some domains to filter out archived analytic accounts 2015-12-11 21:48:41 +01:00
Fabien Pinckaers 4c1224f5ec [IMP] Some features of product form should not be technical features (e.g. archive) 2015-12-11 20:40:20 +01:00
Nicolas Martinelli d23a1be96e [FIX] purchase: follow group_propagation_option
The propagation of procurement group is not applied when a procurement
generates a PO.

opw-659331
2015-12-11 18:35:30 +01:00
Aaron Bohy 9585e630df [FIX] board: open kanban card from dashboard
The Kanban view has been refactored recently, and the communication mechanism
between the view and its cards changed. The cards now communicate with the
view by triggering_up custom events.

The code in dashboard overrides the function open_record of the Kanban view to
allowing opening a record by clicking on a card directly from the dashboard.
Unfortunately, this code hasn't been adapted after the Kanban refactoring.
2015-12-11 17:48:11 +01:00
Aaron Bohy e47d4c61d2 [FIX] mail: client action layout: scrollbar in the sidebar
There was a weird bug on chrome when there was a scrollbar in the sidebar, as
the right part of the client action overlapped that scrollbar. The problem was
seemingly linked to the use of flex, which is removed by this rev.

Courtesy of QSM
2015-12-11 17:48:11 +01:00
Nicolas Lempereur 426172bb95 [FIX] project_issue: don't reset partner on project change
If an issue project is changed, depending if the destination project has
a set partner ("Customer") or not:

- if set, the project issue partner will be set accordingly
- otherway the potentially set partner will be conserved

Since 3fe06da if the project had not partner, the partner was unset
which is undesired.
2015-12-11 16:37:38 +01:00
Richard Mathot 48cdd1e77f [FIX] website_sale_delivery: unavailable carriers don't hide the other ones anymore
Backport of 48156efcd9 + 44f6409731 that fixed the problem in next versions
Revert of da563bcf5c that hid warning for users in backend

One day, we will have to refactor website_sale_delivery. But today, we are the dung beetles.
2015-12-11 16:16:27 +01:00
Thibault Delavallée 9ebbceeb65 [FIX] project, issue: stop spamming partners
Commit bb1200adc7 introduced the automatic
addition of cc as followers of tasks and issues. However it seems to
automatically create partners if the address it not recognized. This
does not seem a good idea.
2015-12-11 15:02:14 +01:00
qdp-odoo f6d6762dc7 [FIX] analytic: workaround to re-enable the feature to close an analytic account that has been unfortunately removed by mistake in commit 2a8c077.
It is using an already existing field that wasn't used anymore ('account_type') but as a lot of domains on analytic accounts were
 - wrong (still using old fields state and type that have been removed as well in the same commit),
 - or defined directly in the views
so, an update of some modules may be needed in order to avoid further problems.
2015-12-11 14:57:46 +01:00
qdp-odoo 6e24256e1c [FIX] account_voucher: company_id field of account.voucher has to be a related of the journal's company 2015-12-11 14:57:46 +01:00
qdp-odoo 7feaa205de [FIX] analytic: propagate the context of the related action when opening the analytic chart of account 2015-12-11 14:57:46 +01:00
Géry Debongnie 4e6caf19a2 [FIX] im_livechat: style chat windows in im_livechat
They are hidden in mobile mode, but we don't want to deactivate chat
windows in website livechat.
2015-12-11 14:04:59 +01:00