Commit Graph
117851 Commits
Author SHA1 Message Date
Nicolas Martinelli 4524dcd691 [FIX] sale: fiscal position
- Create a fiscal position FP which maps the deposit product account to
  another account
- Create a SO, use the fiscal position FP.
- Create a downpayment

The account is not mapped following the fiscal position.

opw-1947069

closes odoo/odoo#31781

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-12 12:52:10 +00:00
Enric Tobella c16d2827bc [FIX] context on reports
closes odoo/odoo#31150

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-02-15 12:58:38 +00:00
Adrian Torres 073b7bb944 [FIX] stock: unlink move_lines in batch
Before this patch, cancelling a PO of 2000 lines would take a **very,
very** long time to process... so long that I terminated it before it
finished... yikes.

This was due to the call to `_do_unreserve` on every single move when
calling `_action_cancel`, this meant that n² calls to unlink where being
made (at least), which also meant n² calls to
`stock.move._recompute_state` were being made... that's a lot of
recomputes... = bad performance

The patch simply calls unlink once, which means `_recompute_state` is
called only once, saving a lot of time.

Cancel time for a PO containing 2000 lines:
        - Before patch: 1h30min+ (process terminated before finishing)
        - After patch: 7min

Other modules making use of stock and `_action_cancel` should also see
benefits from this patch

closes odoo/odoo#31787

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-12 15:35:19 +00:00
Adrian Torres 859586b641 [FIX] purchase: recompute in batch after confirmation
For every line in a RFQ, we create a stock.move upon confirmation of the
RFQ. This create, in turn, triggers a lot of recomputes that are not
needed for the creation of the next moves and thus should only be
triggered once.

This commit disables the recompute during the step that creates the
moves and then manually triggers the recompute **once**, after all the
moves have been created.

Confirmation time for a PO with 2000 lines:
        - Before patch: ~1h
        - After patch: ~9min

This patch is similar to the one introduced at [1], however the
previously mentioned patch uses batch create which is not available in
this version, so we manually emulate batch create's behavior.

[1] https://github.com/odoo/odoo/pull/31471
2019-03-12 13:15:40 +00:00
Nans Lefebvre 1be873d40d [FIX] purchase: do not overwrite vendor reference on vendor bills
The reference fields is supposed to contain the reference number in the vendor's
system. E.g. if the vendor is using Odoo, it could be SO0744.
Therefore this reference is not supposed to change once written by the user.
However there is the _onchange_origin that uses the origin purchase order lines
to populate the reference fields on invoice_line_ids changes.

We remove entirely this behaviour for reference,
essentially reverting 052a5702c5.
Instead we put a default for origin and reference in action_view_invoice
so that these values are initially used at create.

opw 1920747
opw 1944840

closes odoo/odoo#31757

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-12 09:05:42 +00:00
Suraj ShuklaandMohammed Shekha 587e90fe18 [FIX] web: reload form after failing save
Let's assume a form view with a clickable statusbar, in readonly.
When the user clicks on a status, the change is saved directly.
When the save fails (e.g. access rights), the statusbar widget
is in an inconsistent state and must be reloaded.

This rev. reloads the whole record and re-render the form when
this happens.

Related to Issue: #1915391
closes #29519

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-03-12 09:11:06 +00:00
Martin Trigaux 173401100f [FIX] mail: translate global variable
As the message was set globally in the file, a _lt was needed for a lazy
translation

Fixes odoo/odoo#26288

closes odoo/odoo#31761

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-12 07:46:03 +00:00
Lucas Perais (lpe) d8f8996424 [FIX] website_sale: search abandoned cart negated domain
Search for orders that are not abandoned

Before this commit, the same results for abandoned and not abandoned were returned
This was because the not abandoned domain was not negated with the '!' operator that
expression.distribute_not() relies on

After this commit, the abandoned domain is negated

OPW 1942311

closes odoo/odoo#31739

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-11 10:35:06 +00:00
Adrien Dieudonne 1cdf2bdaf6 [FIX] barcodes: let focus in number, password, tel, phone inputs
Before this commit, users wasn't able to input values in some
input elements like password, email and phone in mobile.

Steps to reproduce:
- Go to user
- Select Preferences
- Select Change password
- Try to input something
=> The focus was lost and the keyboard disappeared

In fact, a hidden input always have the focus when no other fields
need it. This input is used to intercept a value from a barcode
scanner.

So now, we added some input types to avoid to set the focus on the
barcode input.

It's quite difficult to test this feature because we aren't allow
to simultate a keyboard to write in a input field.
See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
Plus, we don't have the focus in mobile except if we have the cursor
inside the window.
So, we can't test focused elements or input values.

opw-1936712
opw-1948266

closes odoo/odoo#31566

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-11 09:57:56 +00:00
Odoo Translation Bot 07e89c5c8d [I18N] Update translation terms from Transifex 2019-03-10 03:14:20 +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
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
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
Christophe Simonis 27081bf6f5 [MERGE] forward port branch saas-15 up to c03f6db6ea 2019-03-05 16:45:22 +01: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
Christophe Simonis 1c712986c4 [MERGE] forward port branch saas-15 up to 1f1fa35c07 2019-03-04 15:49:35 +01:00
Christophe Simonis 1f1fa35c07 [MERGE] forward port branch saas-14 up to 232da9a0ec 2019-03-04 13:40:44 +01:00
Christophe Simonis 232da9a0ec [MERGE] forward port branch 10.0 up to 0f0c5db49d 2019-03-04 12:02:31 +01:00
Julien Legros 0f0c5db49d [FIX] base: fix parse_version import 2019-03-04 11:24:18 +01:00
Jorge Pinna Puissant d92eba3a19 [FIX] website_event_sale: pricelist discount product qty
Before this commit, a pricelist discount based on the product qty could
be created and the user may believe that it will work also for event
tickets.

Now: when configuring a pricelist discount based on the product qty a
warning message is show to alert that this kind of discount don't work
in event tickets.

opw-1940368

closes odoo/odoo#31459

Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>
2019-02-28 08:59:25 +00:00
Jorge Pinna Puissant 4613d0a80b [FIX] event_sale: on change of events product in SO
Have a product that is an event, with the price of 1500.
Create a ticket for this product in an event, with the price of 600.
In a SO, add a line with this ticket.

Before this commit, when you change the product, to another product that
is also an event, the event, the ticket and the price stayed the ones of
the first product.

Now, the event, the ticket and the price are updated when the product is
modified.

opw-1940368
2019-02-27 12:54:53 +00:00
Xavier Morel 925385fde6 [FIX] base: properly check werkzeug version
Werkzeug version was being checked to avoid passing quote=True to
werkzeug.utils.escape (as that parameter was changed to `True` *and
deprecated* in 0.9).

However because DeprecationWarning was made silent by default in
Python 3.2 and the way the check is implemented worked for 0.9 it
looks like nobody really noticed it's broken in the usual manner of
half-assed version checks: works for 0.9.0, doesn't work for
0.12.3 (because lexically 0.12.3 < 0.9.0).

Fix by using proper version parsing and comparing the result of that.

See also: odoo/odoo#28116

closes odoo/odoo#31553

Signed-off-by: "Xavier Morel (xmo)" <xmo@openerp.com>
2019-02-27 12:46:02 +00:00
Odoo Translation Bot 5a3ac7dece [I18N] Update translation terms from Transifex 2019-03-01 02:45:39 +01:00
Nicolas Lempereur 15ea753a0f [FIX] stock: show product qty on searched location
The location_id and warehouse_id fields on product.template are just
dummy field intended to add something in the context that will be used
to compute the data being rendered (eg. for location, the quantity
displayed is the quantity of the product in the searched location).

But the feature was broken at a point, and has been solved in 11.0 with
7c7b099273.

This solution was not implemented in 10.0 up to saas-15 since this is
not acceptable for a stable version.

This changeset is only for 10.0 up to saas-15 to implement the fix
differently.

opw-1945417
closes #31475
2019-02-28 12:42:18 +00:00
Jorge Pinna Puissant ee184bcf58 [FIX] event_sale: unit price changes with the qty
Have a product that is an event, with the price of 1500.
Create a ticket for this product in an event, with the price of 600.
In a SO, add a line with this ticket.

Before this commit, when you change the tickets qty in the SO the price
change from 600 to 1500.

Now, the unit price stays the one of the ticket.

opw-1940368
2019-02-27 12:40:39 +00:00
Odoo Translation Bot f014204447 [I18N] Update translation terms from Transifex 2019-03-03 03:15:43 +01:00
Can Tecim 3eeb34318a [CLA] backport of 5028507ea2 to 11.0
Remove the corporate CLA (only cantecim has contributed in the past) and signs
an individual CLA file instead

closes odoo/odoo#31495
2019-03-01 14:13:50 +00:00
qsm-odoo 395c169db9 [FIX] web_editor: wait for animation end before covering snippets
Part of https://github.com/odoo/odoo/pull/31440
opw-1929133

closes odoo/odoo#31440
2019-03-01 13:52:14 +00:00
qsm-odoo 8405c7f5fa [FIX] web_editor: properly check snippet options
Commit https://github.com/odoo/odoo/commit/c2b8d2a3017256e4ea60a3710bdaab6d1f693d81
made the mistake of considering each dropdown-menu individually while
all are considered to be the same when enabling a class. From saas-11.x,
commit https://github.com/odoo/odoo/commit/8ca92330b367d54fddf1c02089ee9d0bc3edbfdc
will group by dropdown menu but that will be another fix to make.

Part of https://github.com/odoo/odoo/pull/31440
opw-1929133
2019-03-01 13:52:14 +00:00
gustavovalverde c812cc4ebc [I18N] *: remove es_DO translations
Include commit 572d628 again, as it was lost with a forward port.

closes odoo/odoo#31479
2019-02-28 12:39:03 +00:00
Christophe Simonis 023dfaeb6b [FIX] core: correct ir.rule domain generation
Since 934c001680, fasly domains are
correctly OR'ed.
Models without group binded rules were then wrongly reduced to an
`AND FALSE` condition.
2019-02-27 12:27:24 +01:00
Christophe Simonis 4c46dd4f9d [MERGE] forward port branch 10.0 up to 2f139632d6 2019-02-27 10:42:03 +01:00
Nicolas Lempereur f8b38f64d3 [FIX] web: keep col group by on 2nd reload
In 187c32c2 some improvements were made for conserving/restoring group
bys on the pivot view.

This introduced an issue on the column group by:

- before reload, if we set manually a column group by (+ icon in the
  header) it would be saved and not lost (unless a context or filter
  in the search view override it)

- after reload, the following manually set column group by are not saved
  anymore on subsequent reload (the column group by at the first reload
  are set back)

This behavior is not normal since the behavior (conserving or losing
column group bys) should be the same at first reload or second reload.

The issue was caused by the duplication of group bys that were not
synchronized (one on the column root header, one on the pivot model
instance).

Without the change, the added test failed with: "Column groupby not lost
after second reload" and product_id is hidding from the object
pivot_column_groupby dictionary (having only "customer").

Using _.clone on initialRowGroupBys was necessary change because without
duplication of "groupbys", the initialRowGroupBys would be changed on
expandHeader which is unexpected.

opw-1941095
closes #31407
2019-02-26 14:54:46 +00:00
RomainLibert 463601a384 [FIX] mail: set mail.activity.type related fields readonly
It does not make sense to be able to write on mail.activity.type using
the related fields defined on mail.activity.

closes odoo/odoo#31469
2019-02-27 14:44:06 +00:00