Commit Graph
139066 Commits
Author SHA1 Message Date
Thanh Dodeur c8ed4697f6 [FIX] mail: inverts the zoom scroll direction of the attachment viewer
This commit inverts the zoom direction of the scroll wheel in the
attachment viewer to respect the behaviour of before the refactor.

part of task-2171884

closes odoo/odoo#60009

X-original-commit: 3d9e2e031ea2e92a50769cc69fe37741d32b6820
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 14:27:19 +00:00
Dharmraj Jhala aaa1f6c237 [FIX] crm: update 'Default Values' on alias while updating sales team
Whenever when change the 'Leads' of 'Pipeline' boolean field on sales team,
it should also update the linked alias. Mainly, if 'Lead' is checked, the
'Default Values' on the alias should also be updated.

It used to work before a recent refactoring (see commit [1] and [2] for more
information).

This commit adapts the changes done in refacotring and updates the alias values
while updating the sales team.

[1] - https://github.com/odoo/odoo/commit/7cfd364db54e88970ef51c798df3bd4df44222b3
[2] - https://github.com/odoo/odoo/commit/186cfb5ebd35d572d0f635cd7975de7cff0d1055

TaskId - 2357573

closes odoo/odoo#60008

X-original-commit: 0669ee36e195e8e0f98131219b59fcc5cba4cea7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-14 14:26:57 +00:00
Thanh Dodeur 461c3fa91b [FIX] mail: corrects wrong url formatting for attachment download
This commit changes the url formatting of the `services.navigate` in
the attachment viewer. Before this commit, the resulting URL was
erroneous which prevented download and lead to a 404 error.

part of task-2171884

closes odoo/odoo#60003

X-original-commit: b11535bb26ad9a1fd96ec616201eb67c89597cdc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 13:37:09 +00:00
Thibault Francois 3af61a49f4 [FIX] sms: fix name_search
Problem
-------

_search_is_mail_thread_sms is looking for ir.model
in the database and then fetch them from the registry
without verification. This can lead to key error
when a model is present in the database but not in
the python anymore. This situation can happen
after a migration.

Solution
--------
Check the model is present in the registry

closes odoo/odoo#60001

X-original-commit: 448626d86a1f06b9f8a7a88111f7cb01600488cd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-14 13:33:49 +00:00
Odoo's Mergebot 347f4413d1 [MERGE] web_editor,web,website,mass_mailing: new Jabberwock editor
This PR replaces Summernote by Odoo's new editor: [Jabberwock](https://github.com/odoo-dev/jabberwock).

closes odoo/odoo#59828

Related: odoo/enterprise#14012
Related: odoo/upgrade#1845
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-14 15:06:56 +02:00
Jorge Pinna Puissant d5242066bd [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.

fine-tuning of c22f99dd09

opw-2357415
opw-2355559
opw-2359283

closes odoo/odoo#59988

X-original-commit: b6791a5183ef1015b47312785501a99ed68e5718
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-14 11:24:34 +00:00
Sébastien Delafond 1767b6eedc [CLA] signature for sdelafond
closes odoo/odoo#59987

X-original-commit: 76ea1a25dd9db414f042f70ef68b8a375d6e7758
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-14 11:24:12 +00:00
Sébastien Delafond 43fb019fe3 [FIX] packaging: update debian file for 14.0.0 release
X-original-commit: af29d603d721c4a6960096abad9b971f65c998b8
2020-10-14 11:24:12 +00:00
JF Aubert 4e50999d87 [FIX] stock: uom in lot m2m with serial
Consider move uom different from serial product uom
to set up move lines with product uom

closes odoo/odoo#59986

X-original-commit: ee966998fa986936a0407676bb4d54f61c7fce1f
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-14 11:23:13 +00:00
Benjamin Vray 294142bdbf [FIX] website: disable overlay on arrows in gallery snippet
Before this commit it was possible to activate the overlay of the
arrows of the gallery snippet (with themes because of animation
options)

task-2312878

closes odoo/odoo#59973

X-original-commit: 81a00e3469f93cb4686c92db5695316db92eb84c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-14 10:34:53 +00:00
Swapnesh Shah 1cede5bcd4 [FIX] purchase: hide send reminder on unsaved record
Before this commit, Button to Send Sample reminder was always visible which doesn't makes sense as It would work on saved record only.

Now Button will be hidden on unsaved record.

Fixes #58744

closes odoo/odoo#59972

X-original-commit: 3cb26da782042ee391777ed15bcca4eef4a10677
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-14 10:34:13 +00:00
Anh Thao Pham (pta) 0d93827fdc [FIX] point_of_sale: fix decimal button in lang with not dot decimal
- Activate debug mode
- Go to Settings > Translations > Languages
- Activate and switch to a language that does not use dot (.) as decimal separator (i.e. French)
- Go to a POS session
- Select a Product, edit the price with a decimal via the Numpad widget
The decimal is not taken into account.

This is due to the fact that the entered input ('.') is not considered as the decimal point
in this language (i.e. ',') and is skipped.
The same issue happens for quantity and discount.

The dot in the Numpad widget has been replaced by the decimal separator of the language.
Also "field_utils.parse.float" has to be used instead of "parseFloat" because "parseFloat" only
recognizes a dot as separator. (i.e. "parseFloat" returns 12.00 for "12,99")
Howerver "parseFloat" is still useful for checking values as "field_utils.parse.float" returns
an error if its parameter is not a string or if the parsed result is not a number.

opw-2357848

closes odoo/odoo#59971

X-original-commit: a1543d2a283000e2955df5f8131bae5e25e110c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-14 10:33:49 +00:00
Priyanka Kakadiya 8d4393d834 [FIX] website_slides: properly display muted text in full-screen
Since a refactoring of the handling of the color system and the way the text
muted is handled, the text-muted isn't visible on the full-screen mode of a
course. That is becuase text-muted is based on the font color set for the body,
which in this case is quite similar to the background of left panel in
full-screen course content.

This commit fixes the issue by using `text-600` class that is suited for this
scenario (the background color is fixed here irrespective of the color-palette,
and so should be muted text-color) instead of `text-muted` for the left panel
of full-screen course content.

taskId - 2346013
closes #59390

closes odoo/odoo#59970

X-original-commit: 7f7f9c6c9165fc6697e90ed6616466d9684e28f2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-14 10:33:27 +00:00
c1c1381894 [ADD] web_editor: add new Jabberwock editor lib
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2020-10-14 10:29:11 +00:00
6d6f42f489 [REF] website: adapt to new jabberwock editor
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2020-10-14 10:29:11 +00:00
Gorash 3dc721ab71 [REF] mass_mailing: adapt to new jabberwock editor 2020-10-14 10:29:10 +00:00
95d0ca4b2c [REF] web_editor,web: adapt to new jabberwock editor
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2020-10-14 10:29:09 +00:00
Goaman c469e9bc5d [REM] web_editor,website: empty summernote files
Summernote will be replaced by the new Jabberwock editor.
2020-10-14 10:29:06 +00:00
nie 19d4b71d52 [FIX] sale_timesheet_enterprise: Timesheet date not respecting timezone
Steps to reproduce the bug:
- Set the timezone of the user to Australia/Melbourne
- Set the country of the company to Australia
- Set the time of the system to 20:00 UTC
- Have Project and Sales installed
- Enable Timesheet and Timesheet Timer on project (A)
- Create a task in project (A)
- Click Start and then Stop
- Confirm the wizard

Bug:
The date of the new timesheet line is set to yesterday.

opw:2351204

Original PR: odoo/enterprise#14023

closes odoo/odoo#59966

X-original-commit: b85a5fc39887660992b5dd0f49ca331e38dd6030
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-10-14 10:25:22 +00:00
IEL 1bb2ed9623 [FIX] website_sale_digital: allow download without reconciliation
TLDR: after installation accounting app, invoices paid online get status "In Payment" until
reconciliation; this commit allows to download digital content without waiting
reconciliation which may take days or week

Steps:

* Install Accounting app
* Install website_sale_digital
* Create Digital product (Product Type: Service + use Digital Files smart button
to upload a file)
* Setup payment acquirer (e.g. Paypal)
* Buy digital product online and pay
* Open the Sale Order in Portal

Before:

* No "Downloads" button near to product name

After

* User can download files after purchasing

Notes

* In Odoo 13.0 it worked via "post_at" option, which is removed in Odoo 14. See
https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074:

  > - Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
  >     With invoicing, the payment will do that so the "in_payment" state should never be shown up.
  >     With accounting, only the statement lines have the power to move an invoice to the "paid" state.

---

opw-2353064

closes odoo/odoo#59959

X-original-commit: 103abd3284cea1723adc0e4b90e57961a4fac2a0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-14 09:48:04 +00:00
Samuel Degueldre 57154071c0 [FIX] web_editor: fix dimensionless SVGs in media-dialog on firefox
Previously, dimensionless SVGs (SVGs with no intrinsic width or height)
were rendered with a width of 0 in the media-dialog on firefox. This is
caused by the fact that firefox reports a naturalWidth and naturalHeight
of 0 for dimensionless images, which we were relying on to compute the
image's aspect ratio. See:
https://github.com/whatwg/html/issues/3510#issuecomment-369982529
for more details on the way browsers handle dimensionless images.

This commit fixes that by giving the image a width, letting the browser
render the image, and reading the height of the rendered image to
compute the aspect ratio in the cases where the naturalHeight of the
image is 0.

task-2345120

closes odoo/odoo#59958

X-original-commit: 616c78e00e6d2760e1cf3425fc7247792f2ceb61
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-14 09:47:39 +00:00
Thibault Francois 6ce289606f [FIX] crm: don't bypass access right to find partner:
Problem
-------

Sales people can have restriction on partner they can see
Private addresses, multi company, ....

When they convert a lead to opportunity, it's currently possible
that the wizard will find and link a partner that the current user
cannot see.

Solution
--------
Field that are now computed store field, that were previously
normal field with onchange, should not be computed as sudo
to respect the record rule

closes odoo/odoo#59957

X-original-commit: 182fa38d7f28a92e7171c4ee3a42c8f73217b765
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-14 09:47:12 +00:00
Xavier ALT af2eaae941 [FIX] core: add UPDATE as valid many2many command in SSF
This commit fix the "Unsupported M2M command 1" raised `Form` helper.

The `onchange()` method will in fact emit UPDATE command for many2many
fields when the value submitted an the one in database has changed
(this is the case for example for nested m2m in form views)

OPW-2044631

closes odoo/odoo#59943

X-original-commit: 76bd8208a416cefab6becff9f2d7204c7d196201
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Xavier ALT <xavieralt@users.noreply.github.com>
2020-10-14 08:23:22 +00:00
Jeremy Kersten 550d2935bd [IMP] website: support generic website for dynamic snippet filters
Made the website_id non mandatory on website snippet filters and adapted
the fetching route so that it interprets an unspecified website_id as
the filter being available on any website.

Before this commit website snippet filters had to be limited to one
single website.

After this commit website snippet filters can be made available on all
websites by setting their website_id to no value (this is the new
default of the pre-defined filters).

https://github.com/odoo/odoo/pull/59831
task-2355369

closes odoo/odoo#59831

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-13 13:09:45 +00:00
IEL 6aa8e7b51d [FIX] delivery: choose delivery method by partner_shipping_id
Steps:

* Create a delivery method (1) restricted to Spain (any country would do)
* Create a delivery method (2) restricted to Madagascar (same)
* Create a partner, main company, whose country is Spain and the default
delivery method is the first one.
* Create a delivery address for that customer with Madagascar as country and the
default delivery method as the second one.
* Now place a new quotation with such partner and set the delivery address to
the one of Madagascar (multiple addresses setting must be on).

Before:

* The delivery method for the quotation is set to the one restricted to Spain
although we're sending it to Madagascar.

After:

* The delivery method for the quotation is set to the one restricted to
Madagascar.

---

opw-2348336

closes odoo/odoo#59890

X-original-commit: 535d429960a0347d01c528c2440c2b8e9ff2fb51
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-13 15:11:47 +00:00
Victor Feyens 4841e5c690 [REV] base: revert 9f7f1db5add5b8a940e53707091133c0bcadd350
Revert commit
"[FIX] base: clearer message in case of conflict for no_gap sequences"

This commit changed the error returned in case of SQL conflict for no_gap
sequences, wrongly disabling the automatic retry (service/model.py) in case
of such errors.

Also adds a comment in the dedicated test to ensure the behavior is explained
and the automatic retry isn't broken once again by the same kind of change.

closes odoo/odoo#59928

X-original-commit: 811cd40fe427c28f9eb244f78ae23c4d3fb42cc8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-14 00:18:35 +00:00
Antoine Prieels ad7ef0800d [FIX] pos_adyen: Adyen for Platforms fixes
- The Adyen sync cron didn't call the function to sync terminals

- Do not specify the merchantAccount when creating a store, the proxy
will add it itself.

closes odoo/odoo#59868

X-original-commit: d5b456a1f75320c8fdf1e989afad91fc74ec9ef3
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-13 13:58:38 +00:00
yhu-odoo c8d1042d33 [IMP] mrp: search bom by reference
When select a BOM in the field, now we only search by the finished
product name. In this commit, we will also match the reference of the
BOM.

Task 2326786
PR #57945

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-14 07:23:19 +00:00
qsm-odoo fb1c4f12c5 [FIX] web_editor: remove useless code breaking the editor scrolling
Since the editor panel is placed on the right, the content was not
possible to scroll when in a iframe, like for mass mailing. This was
because of some strange code introduced with [1]. As the problem the
mentioned commit says fixing is still fixed without that code, I see
no reason to keep this... especially since it may introduce difference
between readonly and editmode content.

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

closes odoo/odoo#59927

X-original-commit: 58ade8c0e17be14fb5bf9cef592c9b9225d21b6d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-14 00:18:12 +00:00
Raphael Collet 7a1e0b2ada [FIX] core: assignment of binary field on new record with origin
The assignment of a binary field on a new record with origin did
actually modify the attachment storing the value of the field on the
origin record!  The fix is simply to avoid messing up with attachments
when updating new records.

closes odoo/odoo#59919

X-original-commit: 6778c4c10fa68c46bde6fae176f547f905e9c02f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-10-13 17:28:48 +00:00
Raphael Collet 11d521d918 [FIX] core: assignment of size to new records
Upon onchange, the web client sends unchanged image fields on one2many
lines as "bin size" values, while changed image fields are sent as their
full value.  As the value is not base64-encoded, the assignment of that
value crashes.

Fix it by making assignment on new records not crash when decoding the
image: the value is simply not assigned to the field.  In the situation
described above, the record being assigned is a new record with a real
record as origin.  Because the field is actually not assigned, its value
is implicitly the value of the field on the origin record, which is
consistent with the fact that the field was not modified in the form.

X-original-commit: 4442d6f0f29a2bf6e992515cd535c88215855a36
2020-10-13 17:28:48 +00:00
Nicolas Lempereur f0ba2dbfa5 [FIX] web: no safari issue with DST at midnight
On safari with apple device in belgium timezone, this code:

```
x = new Date(2020, 2, 28, 2)
x.setDate(29)
```

returns:

> Sat Mar 28 2020 02:00:00 GMT+0100 (CET)
> Sun Mar 29 2020 01:00:00 GMT+0100 (CET)

This is not consistent with any other combination of OS and browser
tested, where this code would return eg. for chrome on macOS:

> Sat Mar 28 2020 02:00:00 GMT+0100 (Central European Standard Time)
> Sun Mar 29 2020 03:00:00 GMT+0200 (Central European Summer Time)

In most instance, this is not an issue, but for country with midnight as
Daylight Saving Time (DST) change, this is an issue, because the Tempus
Dominus calendar widget will have a duplicated day which might eg. make
a month totally not usable.

This issue can eg. be reproduced in Lebanon timezone at this address:

https://tempusdominus.github.io/bootstrap-4/Usage/

Going to the month of April 2020, an error happen  because to get the
first day of the week of 1st April, we do:

```
this._viewDate.clone().startOf('M').startOf('w').startOf('d');
// .startOf('M') => Apr 01 00:00:00
// .startOf('w') => Mar 28 23:00:00 (safari bug)
// .startOf('d') => Mar 28 00:00:00
```

which gives us the wrong day (28 instead of 29) which causes an error.

Other report of the issue:

- https://www.donedone.com/timezone-specific-browser-specific-datetime-bug-2014/
- https://github.com/date-fns/date-fns : issue 571
- https://forum.mobiscroll.com/t/issue-with-invalid-dates-range-script/108

opw-2271482
closes #59786

closes odoo/odoo#59908

X-original-commit: 112267d62544c56acfdcef96727c32c314c15f16
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-10-13 16:16:45 +00:00
Andrea Grazioso (agr-odoo) 066f4ec97c [FIX] sale: fix quantity non visible in portal
This commit fix the fw port https://github.com/odoo/odoo/pull/58149
which does not work in all scenario

Create a sale order
Put an optional product with long description (no line break)
Save and confirm
Log in the portal with the receiving user, add the optional product to
the order.

The customer can't see the quantity of the optional product.
The number is not showing in the quantity adjustment widet.

opw-2350879

closes odoo/odoo#59801

X-original-commit: 9a91fe7d6064475bc949a5c2aee883ea2f419930
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-12 17:01:02 +00:00
Lucas Perais (lpe) 54260b1dd0 [FIX] web: fetching reference fields' name_get batched in grouped list
Commit e10fd34682 introduced batched reference fields name_gets
across groups but was also buggy as follows:

Have a grouped list view showing at least 2 groups
Have a reference field with different values showed in the list for each record

Before this commit, the name_get of those reference fiels were fetched only for the last group

After this commit, the name_get are fetched in a batched fashion (by model) for each group
and display correctly

closes odoo/odoo#59910

X-original-commit: bbb608a1eff638040f0fc7b951fedf1579cc15b2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-10-13 16:21:34 +00:00
Nasreddin (bon) 3ae6c043c5 [FIX] website_slides: Google drive does not start (error message)
Issue

	- Install "Elearning" module
	- Activate "Drive" credidentials in settings
	- Go to any course and edit it.
	- In "Content" tab, click on "Add Content"
	- Select `Video` as 'Type'
	- Copy/Paste the Google Drive video link in "Document URL" field
	- Wait for other field to be computed then "Save & Close"
	- Save the course
	- Go to the website to watch this new content

	Youtube error message

Cause

	'mime_type' field is readonly. When saving the course (slide.channel),
	the slide is not saved yet, and therefore drop the 'mime_type' value.
	When generating the `embed url`, it verify if a mime_type is set: if not,
	it will generate an iframe with youtube.com as domain, else,
	a drive.google.com domain.

Solution

	Add `force_save="1"` on `mime_type` field.

opw-2294344

closes odoo/odoo#59917

X-original-commit: 987b9bf408cf5ba2deded7e2015caa6faeb65a87
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-13 16:57:41 +00:00
xO-Tx 04be44fa47 [FIX] website: fix theme loader opacity
The goal of this commit is to prevent the theme install/update
loader from inheriting the opacity property from container by
setting a background-color with level of transparency.

task-2312878

closes odoo/odoo#59887

X-original-commit: 1e7424579ba7b59c9bc7a4972b10403610f720cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-13 14:59:08 +00:00
Nicolás Mac Rouillon f3014587e7 [FIX] l10n_ar: Previous verify for the partner property fpos then use auto_apply.
The problem here is before this changes, the fiscal position only take into account if them has "auto_apply" True, and for the cases that the partner has their property fiscal position configurate for a company this is not taking into account.

After this changes we evaluate for the property fiscal position for the partner and then if non result we seek a fiscal position with the auto apply and the responsability of afip.
So this the same as the original method do.

closes odoo/odoo#59875

X-original-commit: 5ddcad3cb1d6063b7be89e4f0bd35b89885f746b
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-10-13 14:19:24 +00:00
Denis Ledoux 885977da13 [FIX] phone_validation: assign mobile_blacklisted and phone_blacklisted
Make sure to assign a value to the computed fields
`mobile_blacklisted` and `phone_blacklisted`
in their compute method for all record included in `self`

Otherwise, not assigning a value for one record included
in `self` can result in a cache missing error.

```
Traceback (most recent call last):
  File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 143, in crawl_menu
    self.mock_action(action_vals)
  File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 212, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
  File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 238, in mock_view_form
    [data] = record.read(fields_list)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3001, in read
    return self._read_format(fnames=fields, load=load)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3021, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5620, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 980, in __get__
    raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
ValueError: Compute method failed to assign crm.lead(974,).phone_blacklisted
```

closes odoo/odoo#59870

X-original-commit: 55d7b9d3304f75aa2089c32c4a907066da4dc4b8
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-10-13 13:59:31 +00:00
Thibault Delavallée bb2cd89f00 [FIX] crm: fix query counters due to some runbot errors
To investigate a bit. Sometimes a few extra queries are generated.

Task ID-2359847

closes odoo/odoo#59869

X-original-commit: 36bb56a5e9704c76e84960ec84588524b52406f8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 13:59:03 +00:00
oco-odoo 270716c8a2 [FIX] account: tests: remove the default taxes from the invoices created by init_invoice helper
closes odoo/odoo#59798

X-original-commit: f3bb7e12823d13967b32a1f762c3589e5c7aa26c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-10-13 12:02:11 +00:00
oco-odoo 00504fe7e7 [FIX] account: cash basis taxis: allow full reconciliation of tax lines on cash basis final account without full payment of the invoice
To reproduce the issue before this fix:

1. Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other

2. Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%

3. Create invoice B, account_id = Tax B, unit_price = 1000, Valide invoice,

4. Register a payment of 600 for invoice B (so, that's half the invoice, when including the taxes). The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.

5. Create a mis operation MISC TVA, like this:
line 1 : account_id = ACC TAX A, credit = 100
line 2 : account_id = 401100, debit = 100

6. Reconcile the following move lines:
line of MISC A with account ACC TAX A (100)
line of MISC TVA with account ACC TAX A (100)

==> The lines should be fully reconciled

To solve that without breaking the fix made here https://github.com/odoo/odoo/commit/c43acc34b873dc70cf792675fe1d58d8b0e116b1 , we rely on the tax_exigible field of account move lines. When all the reconcile lines are exigible, it means we're not reconciling the transition line of a cash basis entry, and so we can directly full reconcile.

Fixes https://github.com/odoo/odoo/issues/58996
OPW 2350494

X-original-commit: b8ab3c78ff9354091f5154bb03a716c32a609de2
2020-10-13 12:02:11 +00:00
Laurent Smet 07b407822c [FIX] account,l10n_lu: Fix default suspense account generation
closes odoo/odoo#59660

X-original-commit: fa5231983d1af929a26c83f5d64461cf657fc88a
Related: odoo/enterprise#13964
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-10-13 08:09:15 +00:00
Achraf (abz) b2cf9a643d [FIX] point_of_sale: Send invoice by email with qr_code
Issue

    - Install "Point of Sale"
    - Enable "Qr Code" in Invoicing
    - Open new POS session
    - Set random customer
    - Try to send the invoice by email

Cause

    The 'qr_code_urls' doesnt exist in the dictionary.

Solution

    Add 'qr_code_urls' with all generated qr code urls to the dictionary in report.point_of_sale.report_invoice

    EDIT:
      use `_get_report_values` function of report.account.report_invoice instead of generate all qr code urls

opw-2357088

closes odoo/odoo#59847

X-original-commit: 4bc17f78f46ac2c9bc0bc97bc1a29b3da3f26563
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-13 11:03:30 +00:00
Benjamin Vray f937e602a7 [FIX] website: fix menu direction of header dropdowns
Before this commit, the menu direction of header dropdowns was
related to the window width but it was wrong because of the right
panel. We also enable it in editor mode.

task-2312878

closes odoo/odoo#59846

X-original-commit: ced500e9bcbb5c84033463689d135ad4c7dc4f39
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-13 11:03:06 +00:00
std-odoo 0a0b40c3c0 [FIX] digest: send the digest tips 2 hours after the database creation
PURPOSE

We want to send the digest tips 2 hours after the database creation.
It can not be done directly on the digest itself because its field
is a date and not a datetime.

So we change the "Next Run Date" of the digest to now, and we run
the digest CRON 2 hours after its creation.

LINKS

Task 2351561
Internal odoo/internal/pull/1051

closes odoo/odoo#59844

X-original-commit: d2e3c03f89c6c62dc06e05f5fe06104205245e20
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 11:01:36 +00:00
Achraf (abz) 0927466ed9 [FIX] manufacture: Automation rules raise traceback
Issue

    - Install `Manufacture` and `Purchase`
    - Go to `Manufacture`
    - Enable Studio
    - Create new rules
    - Select `Purchase Order` model
    - Try to select autocomplete proposition with `Deliver to` field

    Traceback raised.

Cause

    The _search function does not return indexable value.

Solution

  Cast _search to a list.

  PS: search can be used (instead of _search) to get iterable value.

opw-2357391

closes odoo/odoo#59832

X-original-commit: 8af2dbb06723213163ee3ad617e5c9309099b4bc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-13 09:29:02 +00:00
Goffin Simon 5d5c460784 [FIX] account: Updating currency on Vendor bill
Steps to reproduce the bug:

- Enable Multi-Currencies and Multi-Companies
- Create a vendor bill
- Remove the default journal
- Set an other currencies

Bug:

A traceback was raised

opw:2350490

closes odoo/odoo#59546

X-original-commit: d9f8efcc330bc7454411aad3546de663424724f7
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-10-13 07:51:27 +00:00
Nicolas Lempereur b2be7e7193 [FIX] sale: default on product change in configurator
When a product is set on a line and we change product with the product
configurator wizard, we will use the attributes values of the previous
product.

But then since the attributes are the ones of wrong product, not
attribute is selected and if eg. we have radio button with one option
and custom value, it will never be selectable (because the radio button
is hidden and unselected).

In this commit, we do not use the current variant values when we change
product in the product configurator wizard.

note: this commit also increases the limit of (custom values) inside the
product configurator wizard, for an arbitrary 10000 limit. Without this
change, each opening of the wizard would only keep 40 customs values and
discard the other ones.

opw-2333091
closes #59016

closes odoo/odoo#59803

X-original-commit: e9c54f6b3d5c36b658308e1900ab68dcc9de0357
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-10-12 17:40:07 +00:00
Xavier Morel a183f2102b [FIX] core: make --test-file work with symlinked modules
While individual addons paths are normalised, module and resource
paths are not.

As a result, when symlinking modules into directories on the
addons path, the path of test modules is only half-normalized: it's
normalised up to the addon path (which likely did not need it in that
setup) but not above that.

This is an issue when using `--test-file`, because that path is fully
normalised, and so the path of the provided test file and that of the
corresponding test module will not match, leading to the tests
unexpectedly not getting run.

Normalize the test module's path before the comparison, using the same
routing used for --test-file.

closes odoo/odoo#59822

X-original-commit: 536809662e542994451be793cd09e87adbf31776
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-10-13 07:25:13 +00:00
Tiffany Chang (tic) 11c710d990 [FIX] delivery: add barcode app check into package wizard
Because the barcode app bypasses the detailed operations for receipts
(with default settings set), an error was being thrown when doing "put
in pack" when a carrier is set (saving during the delivery package
wizard) because the picking move lines are incorrectly selected. This
commit adds in a check for when the wizard is accessed via the barcode
app so that the error does not occur and the same behavior as when no
carrier is assigned is followed.

Related Enterprise PR: odoo/enterprise#9808

closes odoo/odoo#59792

Task: 2039720
X-original-commit: 945b5f6791ae890498ef9a34828eaf91dc1457e2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-12 16:17:20 +00:00