Commit Graph
123352 Commits
Author SHA1 Message Date
Jorge Pinna PuissantandSébastien Theys 47016a1df3 [FIX] portal: sent form without signing
In the portal, when the client signature is asked (for a SO for example).

Before this commit, the client could send the form without really signing
the document.

Now, a warning is shown if the form is not signed.

opw-1943702

closes odoo/odoo#31768

Signed-off-by: Sébastien Theys <seb-odoo@users.noreply.github.com>


Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-03-12 14:58:17 +00:00
Nans Lefebvre 37689b189e [FIX] payment: do not retry indefinitely to post process transactions
Suppose that a payment transaction cannot be reconciled for any reason.
Then _cron_post_process_after_done will try to process it every 10 minutes until
the end of time.

Moreover, if the user takes some manual action before
_cron_post_process_after_done,
even if in principle it would have been able to go through,
then it is likely to fail, e.g. on invoice_open.

Meaning that a transaction that could have been processed will become
an undead transaction.

To avoid that situation we set an arbitrary retry_limit_date set to 2 days,
which seems a reasonnable compromise.
It gives some time for the transaction to go through, but not exaggeratedly so.

opw 1945953

closes odoo/odoo#31791

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-12 14:17:38 +00:00
Martin Trigaux 7e2f9634d2 [FIX] web: do not use t-if inside assets
This makes the assets to be recomputed everytime somebody with a different
language load the page.

closes odoo/odoo#31782

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-12 10:58:53 +00:00
Sébastien Theys cd773e79df [FIX] website_sale: prevent crash if setting qty to 0 in cart update
When there is an optional product for which the quantity is set to 0 because
there is no stock available, the cart update would raise because it tried to
read the order line even though it was deleted above.

Now we apply the logic only if the order_line actually exists.

Part of task 1950712

closes odoo/odoo#31779

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-12 10:59:27 +00:00
Nicolas Martinelli 77584bee3c [FIX] website_sale: price precision
- Set company currency as VND and Enable the Multi-currency with USD
- Create Pricelists for VND & USD, set them as 'Selectable'
- Without being logged, go to eCommerce
- Select the USD pricelist
- Open a product page

The price has zero decimals, while it should have 2.

When the product page is opened, a RPC call is performed on
`get_combination_info_website`:

https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L71

When the response is received, the price is updated in:

https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L472

However, `_priceToStr` uses the decimal precision of
`product.currency_id.decimal_places`:

https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L543

This is incorrect: it should be the currency of the website, not the
curency of the product.

opw-1947140

closes odoo/odoo#31770

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-12 09:56:19 +00:00
RomainLibert 602a485f52 [FIX] hr_recruitment: create applicant in the right stage
Closes: #31733

closes odoo/odoo#31773

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-03-12 10:03:57 +00:00
Johan Demaret Rivarola 7612f2c55c [FIX] payment: remove transaction from session
Sequentially previewing and paying two sale orders was causing a
redirection issue. Instead of being redirect to the SO preview
(/my/orders/<:order_id>), the user was redirected to /payment/process.

The issue was due to processed transactions not being removed from the
session.

opw-1948288
Closes #31741

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-11 15:44:39 +00:00
Luis González 3c9a50569a [FIX] account: Not enough account codes for created journals
When journals of type bank are created, default accounts are also
created, and an account code is automatically generated. However, the
number of possible automatic account codes is very limited, because only
100 different codes may be generated, and the error message "Cannot
generate an unused account code" is shown.

To solve the above, the number of possible account codes is raised up to
10,000 different possibilities.

closes odoo/odoo#31681

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-07 18:00:04 +00:00
Jorge Pinna PuissantandToufik Benjaa dd8494313f [FIX] account: instant payment post process
When register a payment, and choosing a payment acquired.

Before this commit, the payment post process had to wait until a cron
run (every 10 minutes).

Now, The post process is executed instantly after the payment, if the
payment is not yet done, the post process will be executed in the next
cron run.

Co-authored-by:  Toufik Benjaa <tbe@odoo.com>

opw-1928834

closes odoo/odoo#31732

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-11 12:02:32 +00:00
Martin Trigaux fdce99424b [FIX] base_automation: do not read all fields
vals may be an empty dict
This may happen a write is done on a computed field, the call to _write will
be empty (still needed to update write_uid/date).

Before this commit, all fields were read in the read call.
This was unecessary and may produce acess-rights errors or other side effect
(e.g. in odoo/enterprise#3778 the technical field ticket_count was read, even
if not present in the view or the write call)

Only compute old_values on the fields that are modified

Fixes odoo/enterprise#3778
opw-1949911

closes odoo/odoo#31737

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-11 10:50:45 +00:00
Elmeri Niemelä ec40cbb5b0 [CLA] Sprint IT
closes odoo/odoo#31728

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-10 16:57:09 +00:00
ypapouin 05275d95c8 [CLA] signature for Yann Papouin
closes odoo/odoo#31725

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-11 12:20:10 +00:00
Nans Lefebvre 245286949f [FIX] web: fix kanban css for overflows
If the content is too long, it overflows badly.
Since the height is fixed, the flex doesn't work well.

opw 1924145

closes odoo/odoo#31717

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-08 16:07:34 +00:00
VysakhMenon 3e645cd255 [CLA] signature for VysakhMenon
closes odoo/odoo#31611

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-11 12:21:53 +00:00
Alex Tuyls bcf722f639 [FIX] mail: incorrect check in template if no company set
In case company is not set on the model related to the template,
we should not try to retrieve it when creating the associated partner.

Fine-tuning of a46138cb01

opw-1947334

closes odoo/odoo#31607

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-11 12:18:38 +00:00
Raphael Collet 8a7dc813af [FIX] base: copied views are delete too early
Install Invoicing (account) and uninstall it. It results to a an error
because some views required by `payment.acquirer` are deleted before
the acquirers.

The problem is due to the way copied views are deleted, since 1388b7f
they are removed before the module uninstallation. The related commit
faced a similar problem where copied views were deleted too late
during a module uninstallation.

The two problems are revealing that the copied views have to be removed
as part of the module uninstallation, more precisely after all records
refering to them has been deleted but before the schemas has been
cleaned.

opw-1943286

closes odoo/odoo#31443

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-02-27 10:38:50 +00:00
Romain Derie 63ba2317f8 [FIX] website: get the error view without parsing the view tree
Before this commit:
The `if` condition doing a `View._views_get` was supposed to be a sort of
'hack' for when the error occured in a child view (as the template raised would
be the parent, not the broken child).
But since we refactored that part to use etree, it was actually going into that
condition for every error even if the error was in the called template.
Proof is, we only set `editable` in that if condition, meaning going in the
else would actually prevent to show reset template.

Indeed the following code would always be true:
   et = etree.fromstring(view.with_context(inherit_branding=False).read_combined(['arch'])['arch'])
   node = et.find(exception.path.replace('/templates/t/', './'))
as read_combined returns all the view hierarchy DOM

Note: We could not fix this by checking exception.path against `arch` as we
could have false positive (eg the child view replace the <p> element by another
<p> element which is broken, then the path would be found in the parent view
even if the error was in the child view).

closes odoo/odoo#31515

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 10:30:54 +00:00
Odoo Translation Bot 9d4aad2d67 [I18N] Update translation terms from Transifex 2019-03-10 01:36:03 +01:00
Christophe Simonis 6b2e519fbd [IMP] hr_holidays: unmute logger
Since 8da3750cee, logger does not need to
be muted anymore.

This reverts commit f5889303ef.

closes odoo/odoo#31720

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-08 16:49:41 +00:00
Nicolas Lempereur 228a5041bf [FIX] stock_landed_costs: service and landed cost
In saas-11.3 "Is a Landed Cost" (landed_cost_ok) was moved from the
product accounting tab, to the inventory tab.

The inventory tab is only shown for product not of type service, but the
field should be shown when product is of type service, consu or product.

With this changeset, "Is a Landed Cost" is displayed in the top and
"Split Method" is hidden: to specify the split method, this needs to be
done from products in Inventory > Configuration > Landed Cost Types, or
by the list view of cost lines when creating a landed cost.

opw-1949329
closes #31714

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-08 15:14:12 +00:00
Swapnesh Shah 805b75049b [FIX] survey: use correct icon for button
The button was referencing an image that no longer exists since 2015

closes odoo/odoo#29813

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-08 15:24:12 +00:00
Nicolas Lempereur b1a8a15c1a [FIX] project: double rating document name in search
The filter parent_res_name was already in the original search view so
the duplicated one was not needed and caused to have two times the
filter in the search view with possible different behavior.

opw-1949559
closes #31707

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-08 14:04:03 +00:00
Damon Liu df5ba89d5d [CLA] signature for DamonLiu0814
closes odoo/odoo#31694

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-08 14:48:58 +00:00
Luis González fa1210befd [I18N] sale: Remove duplicated term from pot
Commit 6af6da5c5 introduced a duplicated term to the file .pot, which
causes the following error when trying to re-load translations:

```
ON CONFLICT DO UPDATE command cannot affect row a second time
HINT:  Ensure that no rows proposed for insertion within the same
command have duplicate constrained values.
```

This commit removes on eof the duplicates, leaving only the valid one.
```
```

closes odoo/odoo#31683

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 21:55:12 +00:00
Christophe Simonis c023d0784f [MERGE] forward port branch saas-11.3 up to ecd8c023b7 2019-03-08 16:10:55 +01:00
Christophe Simonis ecd8c023b7 [MERGE] forward port branch 11.0 up to e5f93b83c6 2019-03-08 15:08:16 +01:00
Christophe Simonis e5f93b83c6 [IMP] base,account: unmute logger
Since 8da3750cee, logger does not need to
be muted anymore.

This reverts commits c3764265de and
1693a27f28.
2019-03-08 14:59:01 +01:00
Christophe Simonis fabbcf1579 [MERGE] forward port branch saas-15 up to 21c84f1532 2019-03-08 14:10:38 +01:00
Christophe Simonis 21c84f1532 [MERGE] forward port branch saas-14 up to b47749effd 2019-03-08 13:09:26 +01:00
Christophe Simonis b47749effd [MERGE] forward port branch 10.0 up to 88de931141 2019-03-08 13:08:58 +01:00
Jairo Llopis 8da3750cee [FIX] core: remove extra exception log, redundant in P3
Reverts 2b1d3ff82d introduced in 10.0 via

It was relatively useful in Odoo 10.0 because in Python 2 the exception
was missing a root cause traceback. But Python 3 includes exception
chaining by default, so it comes for free.
See [PEP3134](https://legacy.python.org/dev/peps/pep-3134/)

On top of being redundant in P3, it can also break some testcases
by causing an extra ERROR log entry, even when the final exception is
expected and caught. So it's simpler to remove it.

closes odoo/odoo#31699

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-08 10:46:23 +00:00
Romain Derie 88de931141 [FIX] payment_authorize: use SHA-512 instead of MD5 as not supported
Authorize.Net is phasing out the MD5 based hash use for transaction response
verification in favor of the SHA-512 based hash utilizing a Signature Key.

Instead of hashing with md5 the transaction key, it is now required to hash
the signature key (binary format) with SHA-512.

Support for MD5 will be dropped the 7th March 2019 for sandbox environment and
the 28th March 2019 for production environment, initially planned for the 14th.

Note that as of February 11, 2019 authorize removed the ability to configure or
update MD5 Hash setting in the Merchant Interface.
Merchants who had this setting configured have been emailed/contacted.

opw-1943030

Usefull links:
https://developer.authorize.net/support/hash_upgrade/
https://support.authorize.net/s/article/What-is-a-Signature-Key
https://support.authorize.net/s/article/MD5-Hash-End-of-Life-Signature-Key-Replacement
https://support.authorize.net/s/article/Do-I-need-to-upgrade-my-transaction-fingerprint-from-HMAC-MD5-to-HMAC-SHA512-and-how

closes odoo/odoo#31642

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-03-08 10:14:57 +00:00
cristinamartinrod ca1b201cec [FIX] website_mass_mailing: translate button
The text was in a value tag, making it untranslatable

Closes odoo/odoo#30774

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 15:36:58 +00:00
Pedro M. Baeza 98b2784d1e [CLA] backport of e78af353fc to 10.0
Include cristinamartinrod in CLA of Tecnativa

Needed for odoo/odoo#30774
2019-03-07 15:36:47 +00:00
Rémi Rahir cc54194e13 [FIX] website_sale: filter fiscal positions on company
When creating a cart on the website, the website company was not
considered which could end up with the selection of a fiscal position
linked to a wrong company since the method is called in sudo.

closes odoo/odoo#31673

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-03-07 15:38:10 +00:00
Christophe Simonis db50050ed3 [MERGE] forward port branch 11.0 up to 7698f18ddd 2019-03-07 10:26:07 +01:00
Martin Geubelle d2d7f57529 [FIX] *: remove references to kanban_label_selection widget
This widget does not exist anymore since the merge between the all widgets
(new view refactoring).

closes odoo/odoo#31643

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-07 08:45:41 +00:00
Martin Geubelle 590c9d8e33 [FIX] web: add a fallback for kanban_label_selection
Before 11.0 the kanban view used to have its own widget registry. It is not the
case anymore, but there are still leftovers from the past. For example, the
widget `kanban_label_selection` is still used in many views, even though it is
now called `label_selection`.

As we are in a stable version, a fallback has been added for it in the field
registry.

Similar to odoo/odoo@5401c15

Closes odoo/odoo#30904
Closes odoo/odoo#25928
2019-03-07 08:45:41 +00:00
Suganthi Karunanithi eb62cd2c2b [FIX] gamification: badge auth for badge no error
To avoid exception:
  TypeError: Mixing apples and oranges: gamification.badge() - gamification.badge.user(1,)

when rule_auth of a badge is set to `having`.

opw-1945440
closes #31436
closes #31595

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-06 18:00:53 +00:00
Julien (juc) Castiaux e0bd7b9932 [FIX] mass_mailing: inline image not supported
Inline (base64) embedded images are not supported by most mail
clients (gmail on top of them), this fix save those images as
attachments and replace the src tag with the url of the
generated image so the image correctly renders.

opw-1929940

closes odoo/odoo#31532

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-03-06 09:04:29 +00:00
Christophe Simonis 3e54704e66 [MERGE] forward port branch 11.0 up to 27081bf6f5 2019-03-05 17:26:04 +01:00
Christophe Simonis 27081bf6f5 [MERGE] forward port branch saas-15 up to c03f6db6ea 2019-03-05 16:45:22 +01:00
Christophe Simonis c03f6db6ea [MERGE] forward port branch saas-14 up to fdb9f8273b 2019-03-05 16:23:55 +01:00
Jorge Pinna Puissant 7698f18ddd [FIX] event_sale: result returned by super not propagated
Issue introduced in commit : 7c63f39db086f68fdce5b7d97bdcded74c125178

opw-1947735

closes odoo/odoo#31600

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-05 14:14:49 +00:00
Martin Trigaux 1748b46718 [REV] orm: revert d855e3911f
This commit introduced a regression in web_studio, discovered at opw-1947380

A fix in web_studio will be integrated too but the regression is the proof this
commit should not have been integrated in 11.0.
While the new behaviour introduced at d855e3911f makes more sense, it is still
a change of behaviour that should not target a stable version.

For the problem raised at opw-1887162 that d855e3911f was trying to fix, a
workaround should be used instead.
For instance, setting a widget='html_frame' allows to translate in the website
editor that handles this correctly.

In master, the new behaviour can be maintained and eventual regressions will be
investigated there.

closes odoo/odoo#31585

Signed-off-by: "Martin Trigaux (mat)" <mat@odoo.com>
2019-03-05 10:18:11 +00:00
qsm-odoo fdb9f8273b [FIX] web_editor: stop using translated versions in HTML editor
Since https://github.com/odoo/odoo/commit/5a030db3eb77b6d80187f8ae1a64303b2f50391d
the HTML editor displayed the translated versions of the templates it
allows to customize. So if the user edited and saved such a template,
the non-translated version was saved with translated-version content.

The behavior before the mentioned commit was:
1) Load all views the HTML editor allows to edit
2) Each time a view is displayed, re-make a RPC to load the view again

The mentioned commit made this simpler by making:
1) Load all views the HTML editor allows to edit
2) Each time a view is displayed, simply show the previously loaded view

... the problem was that the step (2) of the old behavior was
explicitly saying (client-side) to load the view's untranslated content.
This commit makes step (1) always load the untranslated versions of the
views (server-side).
2019-03-04 17:05:01 +01:00
Lucas Perais (lpe) 6aad8b2691 [FIX] l10n_fr_fec: dom-tom excluded from EU's fiscal territory
Sources:
https://www.service-public.fr/professionnels-entreprises/vosdroits/F23570
http://www.douane.gouv.fr/articles/a11024-tva-dans-les-dom

This commit allows a Dom-Tom based company to export the FEC file out
without needing to have a normalized French TVA set on the company

OPW 1946623

closes odoo/odoo#31543

Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>
2019-03-04 13:53:50 +00:00
Lucas Perais (lpe) 5dfb6e39af [FIX] l10n_fr_fec: no new line at the end of file
It seems that our beloved administration is not happy with the FEC file
ending with an empty new line

Hence, this commit makes the FEC file last line end without \r\n characters
and there is no empty new line

OPW 1943302
2019-03-04 13:53:48 +00:00
Christophe Simonis 1693a27f28 [FIX] account: mute logger on expected Exception in test 2019-03-04 17:09:21 +01:00
Christophe Simonis c3764265de [FIX] base: mute logger for expected Exceptions in tests 2019-03-04 16:33:38 +01:00