Commit Graph
117156 Commits
Author SHA1 Message Date
Olivier Dony 4729632275 [FIX] mail.mail: propagate smtp_session
Make sure the _send() method propagates the provided smtp_session
to benefit from the speedup obtained by avoiding multiple SMTP
sessions.

Cfr 00bd7274c4
2017-03-07 18:50:52 +01:00
Nicolas Lempereur 629d80c3c2 [FIX] mail: fix typo in attachment managment
Fix some dead code. This is a fallback for linking mail attachment with
its data. The issue was not reported since a long time since this just
disable a fallback which in my tests was not used anyway.

opw-710502
2017-03-07 18:05:53 +01:00
Christophe Simonis 0a2b99f985 [FIX] product_visible_discount: use defined variable
Oversight of a previous forward-port
2017-03-07 16:55:05 +01:00
Olivier Dony 7b59ce18be [FIX] ir.mail_server: server TLS setting overrides connect() parameter
Cfr 00bd7274c4
2017-03-07 16:47:23 +01:00
Olivier Dony 00bd7274c4 [FIX] mail: batch and speed up email queue processing
Work around performance issue when sending large mass-mailing:

1. Processing a large email queue would crash with MemoryError.
-> The queue agent will now browsing the emails 1 by 1 during
delivery to avoid filling the memory.
-> The agent will not select more than 10k emails per delivery.
The delivery rate can be increased by waking it more often.

2. Reopening a connection to the SMTP server every time is slow.
-> ir.mail_server.send_email() now accepts an extra `smtp_session`
optional parameter. When passed, that session will be used and will
not be disconnected after the delivery. The queue processing agent
prepares batches of emails to be sent to the same outgoing mail
server, and uses a persistent smtp_session to avoid the multiple
reconnection.
To account for MTA that would refuse to process a large number
of emails in the same session (that should be rare), a system
parameter can be used to set the batch size (default: 1000).

3. As a bonus, the ir.mail_server.connect() method is now
responsible for resolving the actual mail server parameters,
rather than having half of the logic in the send_email() method.

Warning: this commit drops support for "maildir:/" format in
outgoing mail servers hostnames. This feature is deprecated,
unused, untested, and was meant for debugging only.
2017-03-07 16:12:31 +01:00
Olivier Dony a7ff8364ea [FIX] mail sanitize: allow extra common style attributes
Without allowing these harmless style attributes, sending
mass mailing emails with the new snippets produced an ugly
dumbed-down version.
2017-03-07 16:04:33 +01:00
Jigar Patel 8c6b19d605 [IMP] note: Add activity widget on kanban view 2017-03-07 16:04:02 +01:00
Martin Trigaux 76b724294a [FIX] calendar: correct search in recurrent event
Add a 3 use cases with tests that were failing before.

datetime filters were not working correctly on stop filters
The `_get_recurrent_date_by_event` was only computing recurrency on the start
field of an event which can make a difference. A recurring event
  start=2017-01-01 09:00:00; stop=2017-01-01 10:00:0
was not matched in a search ('stop', '>', '2017-01-01 09:30:00')

The filter != was not handled in the recurring use cases.
e.g. making the search 'start is set' in the web client is equal to
  ('start', '!=', False)

Searching with only a start filter matching recurring events but not the
first ("real") occurence, was returning no result if no stop filter was present.
  start=2017-01-01 09:00:00; count=5
had no result in a search ('start', '>', '2017-01-02')
2017-03-07 15:57:37 +01:00
Pratima Gupta 4a28c103fe [IMP] crm: filter usability improvements
- Switch order of 'Unread Messages' and 'Won' filters
to group them by relevance
- 'Won' filter does not depend on the state property of
stage, since the 'Won' stage is not folded by default.
2017-03-07 14:34:01 +01:00
Goffin Simon 8eb759dcff [FIX] hr_expense: Multi company rule for hr.expense.sheet
To apply to multi company rule on hr.expense.sheet
Inspired from Expense multi company rule

opw:709834
2017-03-07 13:51:02 +01:00
Olivier Dony 58593c2755 [FIX] mass_mailing: correct unsubscribe token check
The mailing._unsubscribe_token() method expected the record ID
as an integer, but accepted strings and generated a different
token for the string representation of an integer (!)
The unsubscribe controller was passing a string by mistake.

mailing._unsubscribe_token will still expect integers but if
the string representation of an integer is passed it will be
silently cast to an integer, and will generate the same token.
2017-03-07 13:27:59 +01:00
Denis Ledoux 04bb06fcb3 [FIX] mrp: Do not ask for to provide a lot if there is no finished product.
If `product_move` is an empty browse record
`produce_move.product_id.tracking` is `False`, not `none`,
and therefore
`produce_move.product_id.tracking != 'none'` returns True,
and it therefore asked to provide a lot for no reason.

opw-710748
2017-03-07 12:50:34 +01:00
Nicolas Martinelli c0f1f27dbd [FIX] crm: translation in merge message
- Install a language different from English, set it to your user
- Merge two opportunities

The merge message which summarizes the operation contains the name of
the fields in English.

opw-708381
2017-03-07 12:09:45 +01:00
Goffin Simon a7cd820fc1 [FIX] account: Duplicates a refund customer invoice
When clicking on button "Invoices"(below "Print") on a refund
customer invoice, it prints "Refund  + number". But when clicking
on button "Duplicates" it printed "Duplicate + number". Now it prints
" Duplicate refund + number" if the customer invoice is of type out_refund.

opw:708440
2017-03-07 12:06:06 +01:00
Nicolas Martinelli 4ce309dfab [FIX] web: deactivate buttons
To reproduce:
- Get a slow connection, e.g. activate throttling in debug mode of the
  browser.
- Create an invoice with at least one tax.
- Change a price unit.
- Click on 'Save' then repeatedly on 'Validate'

The tax lines are duplicated.

The issue comes from two identical `write` calls whose purpose is to
delete the existing tax line and create a new tax line.

The two calls are issued by the click on 'Save' and the click on
'Validate', which triggers a 'Save' since it doesn't consider the form
as being saved yet.

There were several issues:
- The buttons from the statusbar were not disabled
- The buttons were enabled too soon. They should be enabled again when
  the form is reloaded, otherwise the call to 'Validate' doesn't
  consider the form saved.

This is an extension of commit
https://github.com/odoo/odoo/commit/bbbf3db581b5cf883

opw-710642
2017-03-07 11:57:14 +01:00
Martin Trigaux ee78aa7d6a [FIX] web: avoid undefined options
options is not mandatory, crashed when navigating with tabs
Complete 2bf6e69e
2017-03-07 11:24:23 +01:00
Thibault Delavallée cb5ddc8ecf [FIX] website_sale: fix heuristic of abandoned carts
Abandoned carts are those with lines, not linked to public user, still
in draft mode and having more than one hour of lifetime.

By the way imp typo, abandonned abandoned one n.
2017-03-07 10:50:42 +01:00
Jeremy Kersten 7c5271140b [REL] 10.saas~15 2017-03-10 17:39:06 +01:00
Goffin Simon 69d6c37456 [FIX] web: prepare_dropdown_selection
Steps to reproduce the bug:
1.Create a new company
2.Set a user in this company
3.Go to Helpdesk > All tickets > Create

It raised a traceback because stage_id was not defined

opw:710084
2017-03-07 00:35:58 +01:00
Denis Ledoux cde8668034 [FIX] web: IE <= 11.0 doesn't support ChildNode.remove
IE 11.0 doesn't support `Childnode.remove`:
http://caniuse.com/#feat=childnode-remove

As a workaround, we use `Node.removeChild`,
which is more widely supported.

opw-710617
2017-03-06 18:21:06 +01:00
Nicolas Lempereur 65ac6b8ae3 [FIX] website: use public user for sitemap making
The current user was used to generate the sitemap. So if a user with
more permissions than `public user` goes on the sitemap, he could
generate it (if he is the first to see it or the last generation was
more than 12 hours ago (by default)) and have pages unavailables for
a user with lower permission in the sitemap (until the sitemap is
generated again).

The issue was solved in 8.0 with d08facdcb but was introduced back in
10.0 with fd09ddb6f because the `uid` argument was dropped from
`generate` method on `ModelConverter`.

Ths fix add the `uid` parameter back.

opw-708456
2017-03-06 16:52:45 +01:00
Olivier Colson 5169b50efe [IMP] l10n_ch
Add a new button to generate the ISR and remove the "double generation" of reports on 'Print invoice' button. This modification brings the code back to its original version and hence fixes the javascript bugs that occured with less than 3 workers running on the server and with Google Chrome when triggering multiple downloads simultaneously.

[ADD] account

Add a identifier to the 'register payment' button in order to reference it more easily and add the 'Print ISR' next to it.

[FIX] l10n_ch

The module did not install itself anymore, an import was missing.

Report generation was crashing due to a function's suppression.
2017-03-06 16:43:26 +01:00
Atte Isopuro 6458210250 [FIX] sale_stock: don't link groupless backorders to all sales
When a backorder is created from an outgoing picking, a message is posted,
linking to the related sale orders as source of the original picking.

If the initial picking was not created from a sale, the resulting backorder
group was `False`.
The domain ('procurement_group_id', '=', False) matches many unrelated
(e.g. unconfirmed) sale orders.

Avoid trying to find the origin SO for pickings with no SO

Closes #15693
2017-03-06 16:41:14 +01:00
Denis Ledoux a14cf34327 [FIX] im_livechat: Add the livechat on an external site
The file
`/web/static/src/js/services/session.js`
is not required for the livechat to works,
and with it it fails on external websites because it makes
RPC calls to the relative URLs:
`/web/webclient/bootstrap_translations`
`/web/webclient/qweb`

opw-710049
Closes #15518
2017-03-06 16:37:35 +01:00
Nicolas Martinelli 6b7012086f [FIX] mail: add followers
- Create a SO with a new product configured as service, Track Service
  "Create task and create hours" and link to "Internal - GAP Analysis".
- Confirm the SO
- Add a new line for the same product in the SO and save

A Odoo Server Error (Validation Error) appears "Error, a partner cannot
follow twice the same object"

It seems that the value of the related field `res_model` is not
correctly computed in the cache. As a workaround, we can use the
`res_model_id`.

Courtesy of @mart-e

opw-709790
Fixes #15589
2017-03-06 16:24:23 +01:00
Olivier Dony 4f40c9da7b [FIX] account: prevent loops when unreconciling entries
7544c22de9 refactored the handling of
exchange rate entries when unreconciling entries.

However it did not preserve the piece of code that prevented loops
during this operation (`full_rec_lookup` context key).

This could cause the unreconciliation of entries with an exchange rate
difference to fail with a confusing error claiming that the user is
trying "to reconcile some entries that are already reconciled!".
The double reconciliation was caused by a recursive attempt to reverse
the exchange rate entry.
2017-03-06 16:17:10 +01:00
Julien Legros ee5241a2f3 [FIX] mass_mailing: use correct model in the recipients widget 2017-03-06 16:12:39 +01:00
Nicolas Lempereur 2d10c5eb43 [FIX] website: use public user for sitemap making (up to s14)
The current user was used to generate the sitemap. So if a user with
more permissions than `public user` goes on the sitemap, he could
generate it (if he is the first to see it or the last generation was
more than 12 hours ago (by default)) and have pages unavailables for
a user with lower permission in the sitemap (until the sitemap is
generated again).

The issue was solved in 8.0 with d08facdcb but was introduced back in
10.0 with fd09ddb6f because the `uid` argument was dropped from
`generate` method on `ModelConverter`.

From 10.0 up to saas-14 the fix introduced is to use a `use_public_user`
key in `request.context` but in master we will keep the fd09ddb6f fix
by adding uid to the `generate` method.

opw-708456

note: to forward-port only up to saas-14
2017-03-06 16:11:19 +01:00
Denis Ledoux 3d2841aac0 [FIX] crm: New / opportunity in the dashboard opens an opp form
Up to now, it opened the lead form view instead
of the opportunity form view.

Most-likely, a new / lead should be added to
the dashboard in addition to the new opp,
as this is the case with the view lead/opportunity
but it doesn't seem it was expected up to now
so I leave it like it is.

opw-710583
2017-03-06 16:03:54 +01:00
Christophe Simonis cb00be643a [MERGE] forward port branch saas-14 up to a4d5e64a4c 2017-03-06 15:46:24 +01:00
Denis Ledoux a4d5e64a4c [FIX] report: Edit Header button in General Settings
opw-710501
Closes #15661
2017-03-06 15:39:27 +01:00
Thibault Delavallée 68225b3a69 [IMP] website_sale: improve website dashboard computation
* avoid searching on all available sale order when
   computing transactions and apply access rights;
 * use read_group on sale.report model to compute
   total sold
2017-03-06 15:38:07 +01:00
Nicolas Martinelli fb35132bc6 [FIX] sale_stock: incorrect return
- Create a SO with both 'service' and 'consu' products
- Depending on the order of the lines, the 'Delivered qty' might not be
  editable consistently.

This is because of an incorrect `return` statement in the
`_compute_qty_delivered_updateable` method.

opw-710561
2017-03-06 14:35:20 +01:00
Jeremy Kersten 4edbd15845 [IMP] website_sale: disable zoom on xxs device by default
This is a cherry-pick of 44911af6fd

opw-710491
2017-03-06 14:24:49 +01:00
Martin Trigaux ad615c8c58 [I18N] l10n_be: update nl_BE.po based on .po
To reflect changes in two previous commit.
Remove outdated reference file.
2017-03-06 14:00:54 +01:00
Martin Trigaux f05a6385a2 [I18N] export l10n_be extra translations 2017-03-06 13:54:57 +01:00
Christophe Simonis d08ecdc3b8 [MERGE] forward port branch 10.0 up to 1279f82e12 2017-03-06 13:52:06 +01:00
lap-odoo 5a065ece72 [IMP] l10n_be: Taxes' names in French
The l10n_be module is in French and translated in Dutch.
No reason to have English content and even less mixed content.

#15723
2017-03-06 13:49:41 +01:00
Denis Ledoux 1279f82e12 [FIX] sale: sales order email template without portal_sale
When disabling the customer portal
in the general settings
(or uninstalling the `portal_sale` module directly),
the model `sale.order` no longer has a method
`get_signup_url`, and it therefore leads
to the fail of the email template rendering which is
still referencing this method.

Besides, the `access_url` is actually used only if
`is_online` is True,
(see the `% if is_online:` few lines later)
and in this case `get_signup_url`
was not used at all.

Therefore, we can assume `None` is a good alternative,
as the resul of `get_signup_url` was actually no longer
used.

opw-710481
2017-03-06 13:28:14 +01:00
Christophe Simonis 6b3a80862c [MERGE] forward port branch saas-11 up to 503227838d 2017-03-06 13:23:38 +01:00
Yannick Tivisse 08b75c181a [FIX] sale: Correct the tax inclusion definition in the sales config
The commit 1b31635 introduces a switch between the definions of tax included and excluded.

As the default value wasn't coherent with the intended behavior, the commit 2e467a7 tries to fix this.

This commit is correct. Switch back the selection labels and set back the default value.
2017-03-06 13:21:20 +01:00
Jeremy Kersten 925c5e8986 [FIX] website_sale: fix layout to remove last column in address page
task-31389
2017-03-10 11:29:58 +01:00
Jeremy Kersten 5c9cea4ee7 [FIX] website_sale: remove duplicated code for coupon and call from enterprise route
/shop/pricelist_payment was only defined in coupon module from enterprise.
Add optional r param in pricelist controller to allow to redirect into a specific page
2017-03-10 11:29:58 +01:00
Christophe Simonis 503227838d [MERGE] forward port branch 9.0 up to eaddb7caff 2017-03-06 13:09:17 +01:00
Denis Ledoux eaddb7caff [FIX] uninstall: unlink of many2one fields having one2many dependencies
The revision
ea9ef7c39d
introduced a regression:
many2one fields having one2many depending on it declared before
the declaration of the many2one itself were not unlinked
during a module uninstall.

As a result, the column in the table was not dropped,
and the table itself was not deleted either, not even truncated.

Therefore, when you tried to reinstall the module, you had data
left.

The check of the one2many dependencies must not be performed
during an uninstall. Anyway, this wasn't blocking the uninstall
of the modules,
it was just preventing the field  to be deleted, that's all.

opw-710291
2017-03-06 13:02:39 +01:00
Christophe Simonis be0c9596c8 [MERGE] forward port branch 9.0 up to 8092ee8c6a 2017-03-06 12:21:27 +01:00
Thibault Delavallée 856335ddb4 [REV] mail: remove unnecessary override to add filter in JS
This reverts commit 96b9d28351.
2017-03-06 12:04:43 +01:00
Thibault Delavallée 3ae9029732 [IMP] mail: add filter to see explicit mentions 2017-03-06 12:04:43 +01:00
Denis Ledoux 8092ee8c6a [FIX] purchase: taxes in price difference accounting entry
Setting the taxes in the accounting move entries
is important for the taxes report.

When a price difference occures in a purchase
with a product set in a perpetual inventory valuation,
the taxes set on the price difference move line should be the same
than the move line from which this price difference
is computed. Otherwise, the taxes report
do not have the whole purchase amount

opw-710228
2017-03-06 11:42:18 +01:00
Christophe Simonis ea527cc3fc [MERGE] forward port branch saas-6 up to 9ff0eb0586 2017-03-06 11:29:04 +01:00