Commit Graph
135516 Commits
Author SHA1 Message Date
Samuel Degueldre e2abbdcc59 [FIX] web_editor: fix original not being properly set when cropping
Previously, if you opened the cropper on an already cropped image, it
would load the crop data for that image. If you then changed the image
and cropped that new image, it would keep most of the metadata of the
previous image when saving, causing any subsequent crop to show the
previous original image instead of the current one.

This commit fixes that by removing all crop-related jQuery data from the
image, so it's considered a fresh crop and a new attachment is created.

closes odoo/odoo#50066

X-original-commit: 46c08050998d0c94d8955cd23ac783f38ecb5af1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-23 11:49:49 +00:00
Julien Mougenot 85eef1ec4d [FIX] web: properly define control panel layout
Before this commit, some elements in the control panel were not properly encapsulated
in layout-related parent elements and this caused some inconsistencies if some of
the control panel components were not displayed. For example: if the breadrumbs
were missing, the search bar went to the left side instead of the right.

Now, all components are in a grid-like structure (in desktop mode) and should not
overstep their given boundaries. The layout in mobile remains unchanged since the
top part behaves quite differently.

closes odoo/odoo#50057

X-original-commit: 533db5991a5bb871198485cd71a63f75a8c6becf
Related: odoo/enterprise#10148
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-23 10:32:25 +00:00
jerome hanke (jhk) b4ba1ccb13 [FIX] website_crm: state_id=false not shown in lead description
Steps to reproduce:
- install website, crm
- go to crm > settings > activate leads
- add a contact form to your website and submit
- go to the created lead

Previous behavior:
state_id is shown as false when geoip data is empty

Current behavior:
state_id is not shown if geoip is if the state found in geoip
does not not exist on the Odoo instance

opw-2218498

closes odoo/odoo#50055

X-original-commit: eba0eafac78adb498f8062f3490cea0847ed7927
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-04-23 10:20:29 +00:00
Nicolas Martinelli 6ff823b2f6 [FIX] account: dashboard domain
- Go to Accounting
- On Customer Invoices kanban card, click on the 3 dots > Credit Notes

Invoices, credit notes and receipts are shown.

This happens because the action domain is overridden, while it shouldn't
be in this case.

We only set the action domain if the action name was not explicitly
requested.

opw-2242195

closes odoo/odoo#50052

X-original-commit: 5dab4d56055cc197fb0f3a6cd20e60cd0f638fa9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-23 09:55:10 +00:00
qsm-odoo 13cacdfde9 [FIX] website: restore 5 colors system edition
Broken by [1] which is renaming a variable without changing its uses
for no apparent reason. "secondary" was always considered different from
"beta", thus showing them both in the color editor.

[1]: https://github.com/odoo/odoo/commit/adea75765df125606023fb0befef1cb767853c3c

Part of https://github.com/odoo/odoo/pull/49993

closes odoo/odoo#49993

closes odoo/odoo#50023

X-original-commit: a8c0bbfba1a39f003b0154e05f537ccdc216e49d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 16:50:44 +00:00
qsm-odoo 8c6d3d5ad7 [FIX] website: restore color order for themes with more than 5 colors
Broken by [1] (example: in treehouse, which has currently 6 colors,
primary was after secondary).

[1]: https://github.com/odoo/odoo/commit/6fb4ed44a04008a81f860fa24a63d444d70f56b6

Part of https://github.com/odoo/odoo/pull/49993

X-original-commit: 6aab08cbdbc3459d2cd2c1fb1f1f3b9f1bbaa4db
2020-04-22 16:50:44 +00:00
Benjamin Vray 22a1fa269b [FIX] web_editor: wrong position of top option icons
Restore the position of the icons in the top options so that they are
aligned horizontally and no longer vertically.

task-2162952

closes odoo/odoo#50021

X-original-commit: e4fcba353804d2be079b16aaad7dbe94b884e156
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 16:36:39 +00:00
Benjamin Vray 3920bb6fcf [FIX] web_editor: restore m2o widget in edit mode
Hide the button used to display the input and show the input
directly. Add a search icon into the input. Deactivate the browser
autocomplete. Improve and fix the layout. Keep the field selected
after choosing a result from the list.

This commit was only about making it work in the 13.0 left panel. It
will be improved further in master with our new left panel.

task-2187712

closes odoo/odoo#50024

X-original-commit: 6660ee960a3c643ae92448d7bdc37f6c780605b6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 16:53:06 +00:00
Nicolas Martinelli c22f99dd09 [FIX] account: do not set default account
Do not set a default `account_id` for section and note lines. Indeed,
when set the constraint `check_non_accountable_fields_null` will raise.

opw-2241575

closes odoo/odoo#50040

X-original-commit: 997a98d2d3d12caf554040922876164040de9efa
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-23 08:26:11 +00:00
jvm-odoo 9bcfb5c8d8 [FIX] project: prevent changing company_id of an analytic account
Issue

	- Have 2 company
	- Install Timesheet, Accounting, Project
	- Enable analytic accounting
	- Accounting > Settings > Analytic accounts
	- Remove the company_id of one of them
	  which is linked to a project
	- Timesheet > add a line for this project

	Error

Cause

	Timesheets lines are linked to a company and a project
	Removing the company_id of the project's analytic
	account create an inconsistency

Solution

	Prevent changing the company_id of an analytic account
	which is linked to a project.

OPW-2233266

closes odoo/odoo#50039

X-original-commit: 4895fb5029f492faf31b28b648e56ded8b3a83fb
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-04-23 08:23:49 +00:00
Martin Trigaux 2d00263127 [I18N] *: export saas-13.3 translations
closes odoo/odoo#50031

X-original-commit: 15a7a9f9d71a0b9c46d7caf2f4fbf09a5a4c63fe
Related: odoo/enterprise#10140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-23 07:13:48 +00:00
Nicolas Martinelli d5ecad2a36 [FIX] sale_stock: package with decimal values
Follow-up of f1e79c74a5c07d6be3154629f6f381ebaf907fb1

The issue still arises with:
8 % 1.6 = 1.5999999999999996

The modulo operator on float doesn't seem reliable for our use case,
therefore we use a combination of `float_round` and `float_compare` to
verify the quantity sold is a multiple of the quantity per package.

The rounding threshold is 0.01, meaning that the warning might not be
raised for some specific configurations. For example, 8.005 units with
a package of 1.6 won't return a warning. Since this is a non-blocking
warning, this should be enough for most cases.

opw-2241985

closes odoo/odoo#49983

X-original-commit: 3d48e2b49023eaf1b1dd0c8cb2b7723e41924a38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-22 13:00:06 +00:00
Andrea Grazioso (agr-odoo) 51d36ca373 [FIX] l10n_it_edi: fix bank info when credit note
Import an italian E-invoice of type TD04 (Nota di Credito).
The invoice type is marked as 'in_refund', but the bank information will
still be parsed from the contact info instead of taking the currenct
company info.
This will fail the check 'validate_partner_bank_id' and
the user will see the error 'The account selected for payment does not
belong to the same company as this invoice.'

Skipping the bank info when we have a credit note

opw-2239652

closes odoo/odoo#49949

X-original-commit: 6b5400b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-22 11:12:00 +00:00
Goffin Simon eadcfaeb57 [FIX] website_sale_delivery: Wrong shipping price displayed
Steps to reproduce the bug:

- Let's consider a company C in €
- Let's consider two selectable pricelists P1 in € and P2 in $
- The € rate is 1.0 and the $ rate is 0.5
- Configure a shipping method SM with a fixed price of 100€ and free if the price is
above 1000€.
- Configure a free delivery product P with sales price = 100€
- Go to the shop with P2 as pricelist and add in the cart any product which price is less
than 1000€ (in this case 500$)
- Process your order until the check out

Bug:

The price of SM was 25$ instead of 50$ because the function rate_shipment already computed
the price in the right currency

opw:2239117

closes odoo/odoo#49987

X-original-commit: 68b08164e5de353ea0c48de92d0c0e028b49bc52
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-04-22 13:30:22 +00:00
Martin Trigaux 6cd228c0b7 [IMP] base: prevent changing contact type of users
When a user is linked to a contact, the type should not be
modified. Otherwise, the res.partner type may become incompatible with
the res.user record (e.g. is set as a private address and a user no
longer has access to its own user)

Fixes odoo/odoo#48177

closes odoo/odoo#48590

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-06 06:05:18 +00:00
Damien Bouvy fff9d7dcee [FIX] website_sale: display payment error status when applicable
opw-2231276

closes odoo/odoo#50025

X-original-commit: 52f24423488fe919ddf40ee64c32e1c4818f2548
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-04-22 16:54:28 +00:00
Damien Bouvy 3b444b31d5 [FIX] payment_ingenico: disable CSRF for webhook route
X-original-commit: ac5bd76b2b226a1dc7d301b622c459569969b8b1
2020-04-22 16:54:27 +00:00
Damien Bouvy b1c81a6572 [FIX] payment_authorize: display errors to customers
Set the transaction to the state 'error' when Authorize.net responds
with that status, as it will display a message to the customer to detail
the problem.

opw-2231276

X-original-commit: 005607fce4a22394a9f67cc4eaa52f8bf89780f0
2020-04-22 16:54:27 +00:00
Damien Bouvy e3021499a4 [FIX] payment: handle tx in error in /website_payment/pay
opw-2231276

X-original-commit: 7b62c95d44c0abce9b53b476bb1e65fc873da24d
2020-04-22 16:54:27 +00:00
Julien Mougenot dd96271208 [FIX] web: handle empty notebooks in form views
Before this commit, when re-activating a previously active notebook tab, the form
renderer would assume that a tab was actually active. However this does not happen
if no tab is visible or defined and it results in a crash instead.

Now, if no active tab is found, a default active tab (0 = first) is set. This only
helps to prevent the crash and does not affect the current behaviour.

closes odoo/odoo#50006

X-original-commit: 73e0c0a1395ebd0e2b4ac7f857c863a0358c5e17
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-22 15:11:02 +00:00
Nicolas Lempereur 97bc3717ad [FIX] website_gengo: adapt to 12.3 translate classes
Adapt gengo to change on translator editor classes and assets.

opw-2234713
closes #49978

closes odoo/odoo#50004

X-original-commit: 4dba09388a3ba57f345c2634d7d37e268c6f1198
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-22 14:55:12 +00:00
Nicolas Lempereur 4f8ee9b4f7 [FIX] website_gengo: adapt source->src in 13.0
In 13.0 66ef641f33 the source field was removed.

This would cause an error when gengo is updating a existing
ir.translation record (eg. if we do two times gengo auto-translations).

opw-2234713
closes #49884

closes odoo/odoo#50001

X-original-commit: 527b3bfb2b17a821d6051a9010ec717a62c7c748
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-22 14:43:46 +00:00
qsm-odoo 9340f7460e [IMP] website, web: add "h" accesskey for home menu in community
Following the work on accesskeys on the website side with [1], there is
in fact no reason to have this in enterprise and not in community.

[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660

closes odoo/odoo#49717

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 12:48:31 +00:00
Nicolas Martinelli 6884d65572 [FIX] account: do not block user creation without CoA
Such a change breaks XML-RPC calls. Moreover, it allows the creation of
partners without the accounts set, which will cause inconsistencies
later on.

This reverts commit 29c362b7c3353c2be11ab117f454d04ed9853f75.

opw-2241875

closes odoo/odoo#49982

X-original-commit: f720602ac24246d29de4919f18ae7c32cce2ffc2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-22 12:56:06 +00:00
Kevin Baptiste 53954ad93e [IMP] project: ease stage deletion
Before this commit, deleting a stage with tasks, the user received an
error.

With this commit, when deleting a stage containing tasks, a wizard
offers the choice to move the tasks to another stage.

closes odoo/odoo#46410

Taskid: 1869030
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-22 08:29:51 +00:00
Jigar Vaghela 12acf49f15 [FIX] l10n_vn: remove _preserve_tag_on_taxes because of no more use in the current version
closes odoo/odoo#43096

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-14 13:16:51 +00:00
Helly kapatel f3f639157f [IMP] l10n_vn: Update COA and COA name convert to english
Add translation(po file) in Vietnamese(vi_VN)

task: 2054159
2020-04-14 13:16:51 +00:00
qsm-odoo a7455eaee0 [FIX] website: fix website menu lazy loading on hover
Small bug introduced by [1]: now the website menu is loaded on demand
to avoid useless page loading. This was done when hovering the toggle
which induced two problems: not loaded if the user was already over the
button when the JS is fully loaded and not loaded if the dropdown was
opened via the keyboard.

Also, the 'mouseover' event was used instead of the 'mouseenter' and the
RPC was not checked for already pending ones. Both issues could lead to
have the RPC performed multiple times for no reason.

[1]: https://github.com/odoo/odoo/commit/4206c1f225f5b1c54a0cdd4913e1d8224a2e7889

closes odoo/odoo#49986

X-original-commit: 7aebd7d88d1d0a0f81351b8a0e12a03964c8431a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 13:20:07 +00:00
Victor Feyens ba4f0679e8 [FIX] sale: correct product price when created inline
When sale_product_configurator is installed, products created/chosen on
sales order lines are product template and not product.product.

When creating a product on the fly, the context on the product_template_id
field is wrong because applied to the product.template AND the product.product.

Contrary to the automatic creation of a template when a product.product is created (orm-side),
we have custom code in product ensuring that when a template is created, product.product(s)
are created.  But this step doesn't clear the context like the orm does.

This means that the default_lst_price=0 in the context won't be applied for the
product.template creation, but will be for the product.product creation:

1) product.template created
2) product.product creation, based on product.template vals
  * in the create, the call to _add_missing_default_values will give a
  default value for lst_price.
  * this will trigger the inverse_related for the field, resetting the
  template price.

To avoid this problem, we modify the view to specify list_price instead of lst_price in the context,
because this field will be protected by the orm because it is inherited from the product.template.

closes odoo/odoo#49959

X-original-commit: 42fe38015796b1973245103c877357c14889bacc
Related: odoo/enterprise#10108
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-22 11:06:20 +00:00
Nicolas Martinelli 42ddda0023 [FIX] hr_holidays: duplicated id
2 record rules have the same id, which is typo.

opw-2242566

closes odoo/odoo#49938

X-original-commit: cdd0d02a160b10e90c8fc7569ff2ca99ea879f89
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-22 08:59:10 +00:00
Odoo's Mergebot a0f9ef563f [FIX] *: werkzeug 1.0 compat (and some other deprecation warnings)
Some more leftover deprecation warnings I missed in odoo/odoo#44164, which turned into errors when Werkzeug 1.0 was released, as well as a few other issues.

closes odoo/odoo#45931

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-22 14:51:44 +02:00
Xavier Morel 34f0866078 [FIX] core: disable werkzeug's merge_slashes
Werkzeug 1.0 adds a `merge_slashes` feature which calls rule.build()
*during match*[0] (= during dispatch).

However at this point our environment still contains an invalid /
placeholder UID, so `display_name` / `name_get()` fails dramatically.

One possibility would be to update the slugifying to not access the
record (outside of the id) if the environment is not "proper", an
other alternative is to just disable the feature since it seems to not
have been necessary so far.

The latter seems less hacky so do that for now, we can always swap the
solution later if we need to.

[0] https://github.com/pallets/werkzeug/blame/048cdfd9b969c0c3a133d7ff43b8ad1ad6a673ec/src/werkzeug/routing.py#L904
2020-04-22 11:31:20 +00:00
Xavier Morel 9a93d3db11 [FIX] *: collection.<ABC> is deprecated 2020-04-22 11:31:20 +00:00
Xavier Morel d9c685a757 [FIX] odoo_referral: werkzeug.url_encode removed from werkzeug 1.0 2020-04-22 11:31:20 +00:00
Xavier Morel c58c618833 [FIX] core: modules moved or removed in Werkzeug 1.0
Those were deprecations implemented in 0.15

* all middlewares have been moved from `werkzeug.wsgi` to
  `werkzeug.middleware`, including the `SharedDataMiddleware` we use
* ProxyFix was moved to werkzeug.middleware.proxy_fix, this had
  already been fixed but I forgot the import
* sessions support was moved to a separate package
  (`pallets/secure-cookies`), however while distros are starting to
  update werkzeug to 1.0 (e.g. done on Arch, and in Debian
  Experimental) they're not bundling secure-cookies so using a
  vendored version seems like the least bad thing we can do, even more
  so as conditional dependencies are not really a thing (e.g. even
  with just pip we can't depend on secure-cookie iff werkzeug >= 1.0)
2020-04-22 11:31:13 +00:00
Goffin Simon 5b80a301db [FIX] stock_account: User not allowed to update product cost
Steps to reproduce the bug:

- Login with demo user (no accounting app access)
- Go to any product with Update Cost button and try to update it

Bug:

Error message "You don't have the access rights to post an invoice" even if
the inventory valuation was manual.

opw:2240513

closes odoo/odoo#49950

X-original-commit: edc54cdf6d39d7689902903fa637df2a709b4396
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-04-22 10:06:12 +00:00
Arnold Moyaux 6825147ecb [FIX] purchase_stock: remove forgotten print
Remove forgotten debug print in test

closes odoo/odoo#49944

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-04-22 09:38:50 +00:00
Xavier Morel 9d4ee88263 [FIX] core: vendored sessions.py so it actually works
* remove SessionMiddleware we don't need as it's responsible for most
  imports
* fix relative imports to absolute imports from werkzeug
* remove py2/py3 compatibility imports, shims and conditions as we're
  P3 only
* remove deprecation warning (duh)
2020-04-22 09:28:14 +00:00
Xavier Morel 39fb7f9d31 [ADD] core: vendor werkzeug 0.16's sessions.py
In Werkzeug 1.0, sessions support was moved out and into a separate
package (secure-cookies). Issue is distros are already starting to
update werkzeug to 1.0, without necessarily adding
secure-cookies (e.g. arch, debian experimental). Plus secure-cookies
has some changes e.g. different filename & al. So just vendor the
"continuity" version which is the last werkzeug before removal.

This commit copies the original file as-is so we can track eventual
changes if necessary.
2020-04-22 09:28:14 +00:00
Xavier Morel 3f2a18b0f2 [FIX] core: improve warnings configuration
DeprecationWarning was configured as `once` which might be why I
missed some previously: `once` means the *filter* will only signal
once, meaning only one DeprecationWarning gets shown per run. Even if
there are 5 *completely different* warnings getting generated by the
codebase.

`default` should be more suitable, I think I'd originally
misunderstood it as "whatever the default is for this warning" but
what it *actually* means is "print once for each (module, lineno)".

An alternative could be `module` which would show the warning once per
module but wouldn't trigger from different warnings in the same module.
2020-04-22 09:27:29 +00:00
Arnold Moyaux 00114a4ee7 [FIX] stock: forecasted quantity incorrect
Usecase to reproduce:
- Install stock with demo data
- Go on drawer form view.
- The quantity forecasted and the report for forecasted quantity do not
indicate the same quantity

It happens because the quantity on forecast is wrong. It's due to the
part that select the quants. The condition wh IS NOT NULL remove all
the quants. Also using a not null on a table is probably not a good
practice.

Also complete the request is order to take quants in transit

closes odoo/odoo#49941

X-original-commit: 405522de1f97cfb7571d6096f727a4a2d03561d6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-04-22 09:21:45 +00:00
Xavier Morel 92b007cb89 [IMP] core: update werkzeug dep to 0.16
allows having DeprecationWarnings pop up on runbot
2020-04-22 06:41:43 +00:00
Xavier Morel 0655974d5a [IMP] safe_eval: opcodes blacklist & cleanup
There are bytecode operations we don't support because we've never
needed them, and there are bytecode operations we don't support
because they're vectors of security issues.

Currently no difference is being made between the two, so when looking
to add a new opcodes it's hard to know whether it's been considered
and rejected or whether it just hasn't been considered (or found
useful) yet.

Add an explicit blacklist, which is explicitly subtracted to all
opcodes lists, to allow motivating the bans of certain
opcodes. Opcodes listed in no lists are the "graylists" of opcodes we
either haven't yet considered or have not had a use for.

Also cleanup the existing lists of opcodes to remove long-gone (or
even never-existing) opcodes, and add a few missing opcodes:

* DUP_TOPX was removed from Python 3, replaced by DUP_TOP_TWO
* STORE_MAP was removed in Python 3.5
* BINARY_DIVIDE and INPLACE_DIVIDE were removed from Python 3 (they
  were used to invoke P2's integer division)
* the SLICE+<X> were removed from Python 3, which only uses
  BUILD_SLICE
* CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW were removed in Python
  3.6 and functionally replaced by CALL_FUNCTION_EX (bpo-27213)
* JUMP_IF_FALSE and JUMP_IF_TRUE were removed back in 2.7, replaced by
  POP_JUMP_* and JUMP_*_OR_POP (bpo-4715)
* various finally-related bytecode instructions were added to Python
  3.8 to improve and speed up the handling of return, break and
  continue (bpo-17611).
* INPLACE_REMAINDER, INPLACE_LEFTSHIFT and INPLACE_RIGHTSHIFT were
  mentioned in PEP 202 but never actually implemented: INPLACE_
  instructions were intended to mirror the BINARY_ instructions, these
  mnemonics didn't match the BINARY_ ones, so the actual mnemonics are
  INPLACE_MODULO, INPLACE_LSHIFT and INPLACE_RSHIFT
* while at it, BINARY_ and INPLACE_ mnemonics: as noted above they're
  mirrors of one another with different prefixes (except for SUBSCR
  which doesn't have an INPLACE version), we only supported a fraction
  of the INPLACE codes for unknown reason.

  Initially looked at simply aligning the BINARY and INPLACE mnemonics
  e.g.

       'BINARY_POWER',  'BINARY_MULTIPLY',  'BINARY_FLOOR_DIVIDE',
      'INPLACE_POWER', 'INPLACE_MULTIPLY', 'INPLACE_FLOOR_DIVIDE',
      ...

  so it would be easier to notice discrepancies, but it seems simpler
  and clearer to just move the suffixes to a single list and generate
  the BINARY_ and INPLACE_ mnemonics from that
* moved STORE_SUBSCR from EXPR to SAFE, I don't see how `foo[...] = 3`
  could be in an expression
* remove pseudo-graylist `_POSSIBLE_OPCODES_P3`, was intended as a
  list of new P3 opcodes we might want to add, but the purpose was
  hard to understand and a proper blacklist makes way more sense

closes odoo/odoo#41085

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-03-23 08:56:21 +00:00
Samuel Degueldre a39c90fd6d [FIX] web_unsplash: unsplash images added on website break on products
Before this commit, selecting an unsplash image on website, then going
on a product page and selecting that same image in the media-dialog
would not work, and upon saving, the image would be the image
placeholder.

A previous fix in odoo/odoo#31328 added handling so that you could
choose unsplash images for a product, but it failed to account for
unsplash images that had already been added on a public view (for
example on a website page), which the user can choose in the
media-dialog.

This was caused by the fix only searching for the unsplash attachment on
the current model, and not among public attachments, resulting in an
empty search result.

This commit fixes that by adding that the attachment we are looking for
should either be on the current model, or be a public attachment.

closes odoo/odoo#49937

X-original-commit: 196d6b1630fa443bc1d143f76f62f7a719ca4930
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 08:55:32 +00:00
Kevin Baptiste af70d19265 [FIX] fleet: properly display image on kanban
closes odoo/odoo#49936

Taskid: 2237599
X-original-commit: d650ca788c833389f8fb9cfcbdb73ba82044f94e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba-odoo@users.noreply.github.com>
2020-04-22 08:47:33 +00:00
Odoo's Mergebot a1641772aa [MERGE] test_mail: update test models and reorder addon
PURPOSE

Have a cleaner test_mail addons

SPECIFICATIONS

Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.

Split test mail models file to prepare some cleaning in those models and tests.

Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.

Split test mail models file to prepare some cleaning in those models and tests.

LINKS

Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-22 11:24:38 +02:00
Thibault DelavalléeandRémy Voet 42b5ec0384 [LNT] mail: lint and reorder mail_notification files
In this commit we order fields more logically to ease reading and prepare
future modifications. We also rename the class and some field strings to
be more user friendly.

LINKS

Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891

Co-Authored-By: Rémy Voet <ryv@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-04-22 08:40:04 +00:00
Thibault Delavallée 7c3a0daaa1 [REF] test_mail: sun is shining, no more umbrellas
PURPOSE

Have a cleaner test_mail addons

SPECIFICATIONS

Umbrella -> Container, easier to understand that we target a ticket / project
like model using mail.test.ticket and mail.test.container .

LINKS

Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
2020-04-22 08:40:03 +00:00
Thibault Delavallée ba068ee728 [REF] test_mail: rename test models to ease understanding
PURPOSE

Have a cleaner test_mail addons

SPECIFICATIONS

Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.

Split test mail models file to prepare some cleaning in those models and tests.

LINKS

Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
2020-04-22 08:39:46 +00:00
Kevin Baptiste 1b4767ee79 [IMP] hr_holidays: hide duplicated info on popover
The name of the employee and the dates were shown multiple times in the
popover. This commit aims at showing the relevant information only once.

closes odoo/odoo#49845

Taskid: 2227158
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-22 08:30:19 +00:00