Commit Graph
142090 Commits
Author SHA1 Message Date
David Beguin a888b8ee4a [IMP] survey: allow host to go to previous question in session
PURPOSE
=======
For now, the host can't go back to the previous screen on a live session.
Why would he want to go back? Misclick, want to display again the result, other

SPECIFICATION
=============
On a live session, let the host go back to the previous screen.
Do not "restart" the questions but display the graph with the results.
This back capability is independant of the "back button" survey option.
Even if the back button is disabled on the survey configuration, the host must
still be able to go back during a session.

Task ID: 2351759

closes odoo/odoo#59659

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-09 11:47:20 +00:00
Achraf (abz) 832125bd8c [FIX] purchase: Update correctly the price according to UoM
What are the steps to reproduce your issue ?

    1. Create Product with Purchase Vendor(s) set
    2. Create Units of Measure that are bigger than (10kg/50kg in tests)

What is currently happening ?

    If you put a vendor that is listed in product form, when changing purchase unit from kg to 10/50kg price is updated
    If you put a vendor not listed, it gives cost price which is correct, but does not update price according to unit of measure.

What are you expecting to happen ?

    Update correctly the unit of measure when the vendor is not listed

opw-2494769

closes odoo/odoo#69196

X-original-commit: d531e8a5e4d84fe6daa9110d076b0fc601a0b4d9
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-04-13 15:52:08 +00:00
Nicolas Bayet da435ceff1 [FIX] web_editor: update toolbar
closes odoo/odoo#69194

X-original-commit: 82072abe8f22a2326c32905c7d8b827aebadb4bb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-13 15:46:28 +00:00
Nicolas Bayet b10b77b7c2 [FIX] web_editor: update call of applyColor
X-original-commit: f1c34a15fb1bf78ea745ca915065ccdb75ae0a8e
2021-04-13 15:46:28 +00:00
Nicolas Bayet 4e34a17575 [FIX] web_editor: update odoo-editor lib to commit 2d94352
X-original-commit: 201ef89c07adcbed0dd16b7553f804b793ef8224
2021-04-13 15:46:27 +00:00
dht-odoo 4a98c0d59c [FIX] {test_}mail: properly handle deletion of mail notif from composer
Before this commit:
When someone sends mail with help of mail_composer(mail.compose.message)
without having a mail template set, mail is not deleted after being sent
(and causes unwanted/unexpected burden on DB). This bug was introduced
with commit[1], where auto deletion was disabled if template is not set
on the composer.

After this commit:
If there is no mail template set on the composer, or if the template is
set and 'auto_delete' is enabled on that template, the mail sent from
composer will be deleted after being sent successfully.

A context key is added to allow controlling this behavior. It is notably use
to check query counters differences.

commit[1] - https://github.com/odoo/odoo/commit/8a026e26c6ae25e3fdb5369a7fa3343d70fab782#diff-898a3d5c08a567c1a7b82c026a213d796e850e376cbdb1c9e7936409f440d37aR257

Task id: 2484915
PR odoo/odoo#68870

Original Pr #68403

closes odoo/odoo#69203

X-original-commit: d54973ee1b4457e3d1c0c8d9bf226928530d8b30
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-13 16:41:53 +00:00
William Henrotin 62dcc193fe [FIX] stock_account: get unit_cost in sudo mode
Commit ad5ac19218 adds a sudo() in the
test condition but not inside the condition.

Close #69144

closes odoo/odoo#69197

X-original-commit: 7cd23a2cd464ccdfcb028b4f2c948654634b973c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-13 15:53:36 +00:00
Thibault Delavallée b7c3bfa5b3 [FIX] calendar_sms: fix double version number in manifest
closes odoo/odoo#69187

X-original-commit: aef40635c09adf6d32a7da6770fb9b40dc49e949
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-13 14:51:25 +00:00
Antoine Guenet 386875cf3d [FIX] web_editor: prevent traceback on select image
Trying to select the contents of a content-less element should select
the element itself instead.

closes odoo/odoo#69173

X-original-commit: 6905eaad2ccaa782e3dce99b9581ed0194c37db9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-13 12:30:39 +00:00
Antoine Guenet 500ebb0687 [FIX] web_editor: ensure editor's floating toolbar is visible in modals
Bootstrap sets a z-index of 1050 for modals while the editor's floating
toolbar has no set z-index and is therefore invisible in modals. This
ensures the visibility of the toolbar in bootstrap modals.

closes odoo/odoo#69160

X-original-commit: 9cd4eb6db072fd55d47240260e63fd5923b3bddb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-13 10:08:32 +00:00
Antoine Guenet 4a1d776243 [REF] web_editor: prevent duplicate code in LinkDialog and LinkTools
LinkTools were recently introduced to provide a new UI from link editing
within a sidebar where there is one. It was implemented separately from
the existing LinkDialog despite them having a lot of code in common. In
order to prevent future discrepancies between them, this commit
introduces the Link widget which contains the common logic for link
editing, to be extended by LinkTools and LinkDialog (via an intermediary
widget).

closes odoo/odoo#69137

X-original-commit: 5415ea46f8d3ee4732111a21b0cd9fa8bdb9526e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-12 16:11:14 +00:00
Ivan Yelizariev 0a2f1a1176 [FIX] stock_account: decrease number of queries in _run_fifo_vacuum
_run_fifo_vacuum may take significant time. This will slow down any operations
related to stock (Inventory Adjustment, POS Session closing, etc.) or even
block them due to timeout error. So, decreasing execution time is quite
desirable. This commit is doing it by decreasing number queries:

1. prefetch all_candidates before for-loop to avoid using `search` in each
iteration
2. move code about updating standard_price after the for-loop

---

opw-2499032

closes odoo/odoo#69112

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-12 12:28:36 +00:00
Josse Colpaert f986a0e4c5 [FIX] l10n_pe: add electronica to the report name as it is a legal obligation
See also #17550 in enterprise

closes odoo/odoo#69051

X-original-commit: 68ca0884d07854ca227a20427d53068e2fcce3f5
Related: odoo/enterprise#17591
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-09 14:35:31 +00:00
Andrea Grazioso (agr-odoo) 1cf1445d3b [FIX] account: count in dashboard statement lines marked 'to_check'
1. Reconcile of a bank statement, checking the "To
check" box on the manual operation before validation
2. Go to accounting dashboard

The statement line will not be counted in the "to check" action.
This occur because the action only filter on reconciled moves

This reverts commit 6b0017ffda.

opw-2475663

closes odoo/odoo#69135

X-original-commit: 4f2ba741af913c36dd944070b6cbe5aaf682ced6
Related: odoo/enterprise#17637
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-12 15:57:22 +00:00
Ivan Yelizariev 5ddf7c6fde [IMP] doc: replace pyflame with py-spy
pyflame is archived and not maintained since July 2018
https://github.com/uber-archive/pyflame/commits/master

closes odoo/odoo#69128

X-original-commit: 9864fb6a159f5f145421b4e51b6125e25a69e7c9
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-04-12 13:51:16 +00:00
JF Aubert b71a62b515 [IMP] purchase: Purchase order portal view
Show the purchase orders which are in state "RFQ sent" on the portal
using two separate blocks (Requests for Quotation & Purchase Orders)
as done in Sales (Quotations & Sales Orders)

closes odoo/odoo#61035

Task: 2035476
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-07 13:49:46 +00:00
Arnold Moyaux 51d612fa3c [FIX] stock: inventory adjustement for user
Fix the access for stock user to stock.quant.
Since the inventory adjustement feature has been moved on
the stock.quant. The user should be able to write on them to
make their count. However we kept that a stock user can't validate
an inventory nor modify quantities on product

closes odoo/odoo#69006

X-original-commit: 6b8d40ec494dfbcaaef0da438692c76d0088f671
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-08 17:52:44 +00:00
Florent de Labarre e98d75c883 [FIX] stock : show complete name of location
closes odoo/odoo#69005

X-original-commit: d4206d4a4a4cc527351a1c9cea0af0cf53dfd500
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-08 17:42:10 +00:00
Odoo's Mergebot 4a3f68b817 [FW][MERGE] (website_)event: improve Online features display and use
PURPOSE

Add a few minor usability features as well as a few layout adjustments for the
'event' modules.

SPECIFICATIONS

Add "Hide and show" feature for the tracks.

Add a dynamic countdown for the tracks.

Provide various changes and improvements on frontend layout display
next to intensive user testing and feedback.

See underlying commits for more details.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

closes odoo/odoo#69117

Forward-port-of: odoo/odoo#69102
Related: odoo/enterprise#17621
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-12 14:05:18 +02:00
Julien Banken 0f50285cf6 [IMP] website_event_track[_live]: add visual & usability improvements to event.tracks
PURPOSE

This commit adds several minor visual improvements to the event.tracks
frontend and backend views as well as a few quality of life changes to
ease usability.

SPECS

- Add "hide and show" feature for tracks

In the event homepage, all the tracks of the selected event will be
displayed. As the tracks are grouped by day, some sections will only
contain tracks that have already taken place. If there are a lot of
tracks, it might be better to fold these sections to reduce the payload
of the page. That way, the user will be able to see the upcoming tracks
more easily.

With these changes, a new chevron icon will be added above each section.
When the user clicks on it, the user can fold and unfold a section.
By default, the section containing tracks that have already taken place
will be initially folded.

- Add partner tag line

The user may need to know more about the speaker before attending a
talk. The user may wonder: Who will give the talk ? What is his/her
field of expertise ? Where the speaker comes from ? To answer these
questions, we will display: the name, the job position and
the company name of the speaker.

- Add replay suggestion when no suggestion can be provided

When a video ends and no suggestion can be provided, the player will
display an empty cover to hide the Youtube suggestions. With these new
changes, the cover will now suggest the user to replay the video when
no suggestion can be provided.

- Dynamic count down for incoming tracks

When the user accesses a track that will start in several hours, an alert
will indicate the remaining time before the beginning of the track.
Unfortunately, this alert is not dynamic: If the user keeps the page in
a tab and come back later, the alert will not be updated and will display
an incorrect estimation.

The changes address this issue: The timer will now be updated dynamically
as the time goes on. When the countdown reaches 0, the alert will
automatically be removed from the dom.

- Fix links of the agenda view

In the agenda, the title of a track can be a link. When the user hover
it, the cursor of the user will now turn into a clickable hand only if
the track is accessible.

- Remove the default date for the new tracks.
- Set a default duration of half an hour for the new tracks.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 6804b8a92c03db09c2694150f968d8056492a1d4
2021-04-12 10:39:58 +00:00
Julien Banken 98f46907c2 [IMP] website_event[_track|_meet|_exhibitor]: improve various frontend event layouts
PURPOSE

This commit generally improves some of the event application layouts.

SPECS

- Add new rules to handle long text properly.
- Set a maximum height for the dropdown menu.
- Minor margin and padding adjustments.
- Reduce border radius of status badge.
- Remove the rounded corners of the cards.
- Remove the "wishlist" terminology.
- Fix the href attribute of the event name.
- Fix image distortion of the sponsor cards (backend).
- Hide viewer count when there is no viewer.
- Limiting the expansion of the meeting room aside block.
- Various other minor changes coming from user testing

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: cfbe1096ec34411a7abe9a9510dc4289e15db1cb
2021-04-12 10:39:58 +00:00
Julien Banken c2b099ef76 [IMP] event: remove the dates from the urls and the default name of the events
PURPOSE

Previously, the url of the events contained the start and end date of
the event. This link can be sent by email. If an administrator changes
the start or the end date of the event, the event will still be accessible
via the provided link. However, the user can be misled because the dates
of the url will no longer match with those set on the event. To avoid
confusion, the start and the end date will be removed from the url.

SPECS

- Remove the start date and the end date of the event from: (1) the urls
  and (2) the default name of the events.

NOTE

Note that URLs are backward compatible as only the ID is really used to
find a record through routes.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 60be7bb337804f2fa59003d6e5dc70ecc9750427
2021-04-12 10:39:57 +00:00
Julien Banken 17edf6712d [IMP] website_event_track: ask for notifications when favoriting a track
PURPOSE

When a user adds a track to his/her favorites, we really want to make
sure that the notifications are activated so that he/she can be
notified when a track is about to start.

The "Set Favorite" button of the tracks will now propagate a new event
that will notify the notification manager that a new push notification
request should be issued immediately.

SPECS

- Trigger a new event when the user adds a tracks to his/her favorite.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 0e28bfdea3938b1d76cb62223b84f155a6ce75d7
2021-04-12 10:39:57 +00:00
Aurélien Warnon b7b7ca38c4 [FIX] website_event_track: put partner_biography back on track proposal
Small oversight of #60847 where the "partner_biography" field was mistakenly
removed from the frontend track proposal form.

This commit simply re-introduces the field back into the form and saves it when
submitting the event.track proposal.

Task-2500455

closes odoo/odoo#69116

X-original-commit: cef6d91190de0c305c2f7a45b87717db28a9c7db
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-04-12 10:39:39 +00:00
Benjamin Frantzen (bfr) 6af91e0f92 [FIX] account_edi_ubl: remove wrong move creation when importing xml
The move was created before its type was determined and the type was ignored. This could cause an issue when this method was called directly if 'default_move_type' was not set in the context (the move would therefore be an entry).
Thankfully, this shadowed another bug: when determining the type of the invoice, the context was ignored, and therefore if the file was imported as an invoice, the type determined was 'in_invoice' instead of 'out_invoice', this didn't cause any problem since the type was ignored. This commit fixes that also.

closes odoo/odoo#69110

X-original-commit: cba93b5b300ade03940c3737c5ad231f163c322c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-04-12 08:53:05 +00:00
Michael Mattiello (mcm) b73545ff2a [FIX] web: no bounce button form field/label click
Since commit [1], a delay was added to "debounce" the quick edit to
check if the user did a click or a select.
Because of this delay, the edit button now bounces when clicking on
a field or label.

In this commit, we check if the user clicks on a "quick editable"
field or a label to prevent bouncing.

[1] https://github.com/odoo/odoo/commit/2939ea4dd4736e659cc3e4df2226a3b08ac8ec48

closes odoo/odoo#68835

X-original-commit: 755a02135049f22e1e8db356169b5224f00c1f92
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-06 13:50:07 +00:00
Raf Geens 0a62fce86e [FIX] base: Report which PDFs can't be read
PyPDF2 can't read some PDFs due to bugs, lack of fault-tolerance and not
supporting some encryption schemes. When invoices are uploaded directly
through the Invoices / Accounting app, that will fail for those files
because it will try to read part of them. When invoices are uploaded
through the Documents app, they're not read, which means the customer
can end up in a situation where read and merge operations (like when
printing a selection of original vendor bills) will fail.

The structural solution for this is to replace PyPDF2 with a more capable
 library, like pikepdf: https://github.com/odoo/odoo/pull/64356 .

This change is too impactful for stable, and there are compatibility
concerns as well.

A possible workaround is merging the PDFs we can and bundling the rest
together in a zip file. This is possible on the level of just
_merge_pdfs, but the PDF extension and mimetype are pretty hard-coded
and the changes required to switch them to ZIP based on what happens in
_merge_pdfs seem too impactful.

Instead, this fix detects as early as possible if the PDFs can't be
read and reports it to the user. The excluded PDFs can still be
downloaded individually. In this way the user has a workaround
and does not need to resort to trial and error to figure out which PDFs
are causing the problem.

Related tickets: 2359929, 2389679

closes odoo/odoo#69082

X-original-commit: e935cf55975e4bbffcfe29dcfe51b3a91dd0aeab
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-09 18:55:54 +00:00
Odoo's Mergebot 43ff49dc19 [FW][MERGE] (test_/mass_)mail: improve composer and mailing tests
Purpose of this merge is to

  * merge and clean mail.compose.message related tests currently located
    in two files;
  * improve those tests and add more detailed checks about generated
    mail.mail and sent emails;
  * add some docstrings and parameter explanation in mail helpers, tools
    and asserts;
  * test sent emails in mass mailing and marketing automation tests in
    addition to traces and mail.mail;

This merge targets 14 to have a coherent test suite for mail_* features
through 14+ versions.

Task ID-2500615
Prepares Task ID-2484296 (improve markers use in Jinja)
Prepares Task ID-27033 (support QWeb in templates)
Prepares Task ID-2377974 (clean trace and status management in mass mailing)

closes odoo/odoo#69052

Forward-port-of: odoo/odoo#69004
Forward-port-of: odoo/odoo#68874
Related: odoo/enterprise#17593
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-12 10:55:18 +02:00
Nicolas LempereurandKamen Zhekov 38464f5aaf [FIX] web_editor: have transcoder apply text-decoration
The transcoder (transforming CSS rules into inline CSS for mail clients)
was not working for text-decoration property because it would transform
text-decoration values in:

{'text-decoration-thickness': 'normal', 'text-decoration': none}

And the regex that ensures we don't add duplicates check if there is:

"(^|;)\s*text-decoration"

so if there is text-decoration-thickness, text-decoration is not added.

The regexp could be changed to:

"(^|;)\s*text-decoration[^\w-]"

but we already have special case for other text-decoration-* properties.

With this change we should get text-decoration applied in:

- edit mode (was already the case)
- readonly mode (new)
- mail client (only if mail client does not override it)

As a side note: text-decoration-thickness seems to be rather new[^1] so
at one point in time there was probably no issue.

[^1]: https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness

opw-2496490

closes odoo/odoo#69078

X-original-commit: f4f1b890e15e98d9a7e72586faf73327d3f7b716
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Kamen Zhekov <kzh@odoo.com>
2021-04-09 18:24:21 +00:00
Thibault Delavallée a4a5bb45b5 [IMP] mail, (test_)mass_mailing: also check sent emails if possible
When using assertMailMailWEmails custom assert we now check that a sent
mail.mail matches a sent email. It allows to have a complete check from
mailing traces to sent emails.

Task ID-2500615
COM PR odoo/odoo#68874
ENT PR odoo/enterprise#17558

X-original-commit: 59da8627e0d732b12fb98faa6e66e43b8c75dc9c
2021-04-09 14:39:14 +00:00
Thibault Delavallée 344c5ef072 [IMP] mail: add tests and docstrings for rendering mixin tools (jinja / qweb)
PURPOSE

Add some tests for ``mail.render.mixin`` in order to assert its base behavior.

SPECIFICATIONS

Add tests for

  * jinja rendering tools;
  * QWeb rendering tools;
  * translation support;

Also add tests for jinja markers: block, variable and line statement markers
should be tested.

Also improve docstrings of tool methods. Add notably explanation of parameters
and better explain methods purpose.

LINKS

Task ID-2500615
Prepares Task ID-2484296 (improve markers use in Jinja)
Prepares Task ID-27033 (support QWeb in templates)
COM PR odoo/odoo#68874

X-original-commit: f3dba8e020a0be72321427ed839b80ad77386946
2021-04-09 14:39:14 +00:00
Thibault Delavallée 4c2ad37709 [IMP] event, mail, mass_mailing, sms, test_mail: clean some mail tests tools helpers and parameters
In this commit we backport some of 14.1+ improvements done in mail tools
in order to keep a coherent definition through sub versions. We also
improve docstring and add some explanations on available toold and asserts.

Task ID-2500615
COM PR odoo/odoo#68874

X-original-commit: d44c47697389866603f28ff2d5da60a97574ec5f
2021-04-09 14:39:13 +00:00
Thibault Delavallée 80224b7c57 [MOV] mail, test_mail: merge and improve composer tests
This commits is a bit a followup of odoo/odoo#62061 where new composer tests
were added. This commit finalize this work by merging all composer related
tests within the same file. It also backports some of tooling update done
in odoo/odoo#64459 or odoo/odoo#63677 in order to have coherent naming
through 14+ versions.

Some additional or deeper tests are added. Notably it now more cleanly
uses asserts for created mail.mail and sent emails.

Task ID-2500615
COM PR odoo/odoo#68874

X-Original-Commit odoo/odoo@67f31cbfcd

X-original-commit: e147ca2eb51a7008251f20f134bd021a1ae3705c
2021-04-09 14:39:11 +00:00
Thibault Libioulle b1f0e1a42a [REV] project: following a private project no longer required
This reverts commit odoo/odoo@7059b17.

This commit translates tests introduced in this reverted commit to be
aligned with the current workflow.

This commit reverts functionality or business logic linked to the
reverted commit :
- odoo/odoo#47248 : You no longer have to be an allowed user to see the
timesheets but only a message partner.
- odoo/odoo#49021 : We no longer deal with allowed_user_ids or
allowed_portal_user_ids
- odoo/odoo@f2a1a00 : We no longer deal with the allowed users lists.

This commit removes the button project_privacy_visibility for functional
reasons.

Closes: #65367
task-2439329

Related: odoo/upgrade#2128
Related: odoo/enterprise#16067
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-09 12:12:54 +00:00
Bonis Modi d00a381ece [FIX] hr_expense: create expense report without creating record
Currently, When we create expense report from expense it will
directly create a expense report record so discard button on
top is misleading.

So in this commit, when creating the expense report from the expense
it will not create an record but set the default value in editable
form view with auto computed name based on expense.

Also create report action coming to the two places
1) in top action menu
2) on tree header

So in this commit, removed 'create report' menu from top
action bar.

Added the depends on can_reset and can_approve to compute
the value for displaying the button when record is not saved
from the 'create Expense report' button and default in submit state.
also fix the attachment_number field because expense.id is
NewId_X while passing in default_get of expense_line_ids so count was
0 without saving the expense sheet.

closes odoo/odoo#65104

Taskid: 2359834
Related: odoo/upgrade#1875
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-06 09:19:44 +00:00
Achraf (abz) 7c9afd09b8 [FIX] base: Traceback with address layout in reports
What are the steps to reproduce your issue ?

    1. Go to Contacts > Configuration > Localization > Countries > Select a country
    2. Edit the 'Layout in reports' (enable debug mode) and add an invalid field
    3. Create a Quotation and search for a customer from the country you edited.

What is currently happening ?

    Traceback is raised and you can't select the customer anymore

Why is this happening ?

    Because the key is not defined.

How to fix the bug ?

    Handle KeyError to detect if the user put an undefined key
    Handle ValueError to detect if the user put an invalid format key

opw-2447078

closes odoo/odoo#69014

X-original-commit: 675feb254ed3448571818a77c920012cbd066c8b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-04-09 07:19:15 +00:00
emilkholod 207c4dda5c [FIX] account : Fix error on search_read for account.move.line
* If `where_clause` is empty, then there will be an error. This commit fixes that.

closes odoo/odoo#69100

X-original-commit: f0a1bb3692e17334850fed4f22444f47992adb78
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-11 11:56:15 +00:00
emilkholod 3d5101fa18 [CLA] Signature for emilkholod
X-original-commit: 58649ef6ab7476b90c7deb5a9a2acc2553e1bb62
2021-04-11 11:56:14 +00:00
Romain Derie 60d6498d7c [FIX] website: better helper for domain in settings
If the user type his website URL as suggested by the helper, and he redirects
his `http` to `https` (nginx, cloudflare..), then his canonical url won't ever
be reachable.
Most critical issue will be that we won't display the `alternate/hreflang` tag,
which basically tells the search engines what and where is our translated
content.

opw-2486918

closes odoo/odoo#69093

X-original-commit: 15bf30b7b5312a943772ece20303e215b1ed6f6c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-04-10 19:17:46 +00:00
qsm-odoo 6a5a47ee82 [FIX] website: restore scroll effects in custom code
The website scroll effects using the `AnimationEffect` Odoo API were not
working anymore if custom code enforces the html element as the
scrolling element. Indeed in that case the scroll event handlers were
now attached to the html element itself while it needs to be the window
in that case.

This may be something to fix at the source (the `getScrollingElement`
method). This will be checked later.

closes odoo/odoo#69087

X-original-commit: 21650ce342d0329c5385acf1181be154abbec550
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-10 16:54:12 +00:00
Andrea Grazioso (agr-odoo) 82e4c19947 [FIX] l10n_it_edi: only send e-invoice in IT companies
Have 2 companies, one in FR (with l10n_fr), one in IT (with l10n_it_edi)
From the French company create an invoice for a french customer.
Confirm.

The message ' E-Invoice check failed. You can modify the
invoice, and resend it.' related to italian e-invoicing will appear

opw-2481035

closes odoo/odoo#69050

X-original-commit: d5075308131f82020702c6650a1869ffd93fb85e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-09 14:34:15 +00:00
Djamel (otd) 40e03c8f12 [FIX] l10n_id_efaktur: fix the “_onchange_l10n_id_tax_number” method
Steps to follow to reproduce the bug:
- Create an Indonesian company
- Go to Invoicing settings / in “Fiscal Localization” / install Indonesian-Accounting “ l10n_id”
- Go to Invoicing / Vendors / bills
- Create a new bill / add a vendor / go to “other info” / add a valid Indonesian Tax Number, for example :  “0112345678912345”
- An error is triggered

Problem:
In the “_onchange_l10n_id_tax_number” method, we try to access “record.type”, but in v14 the field "type" was replaced by "move_type” in the "account.move" model.

opw-2492530

closes odoo/odoo#69064

X-original-commit: 7cac0104625ea2bedf02a6c47801ccdb930ab939
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-04-09 15:33:27 +00:00
Mathias Markl 543f0a26d3 [FIX] base: force_storage on every attachment
When searching on attachment a (res_field, =, False) domain is
automatically added in the domain in the _search override.
The force_storage method was skipping the attachments linked to a
field and was also applying on fields of type url

closes odoo/odoo#58086

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-04-09 13:27:10 +00:00
Romain Derie c33766ded0 [FIX] website: show domain in settings even if no multi-website
Without this commit, a database with only one website would not see the domain
field in the res settings.
But the domain field is useful to set even if there is only one website.

For instance, if no domain is specified, the web.base.url ICP will be used
instead to generate links, but it might be the wrong url as it is the last
domain used to login as the admin (unless web.base.url.freeze is set).

Also, one might want to unset the `localhost` domain that was set by default
in xml data (now removed with 1f0edacdf)

closes odoo/odoo#69038

X-original-commit: 0650862c7adcbe4113e071778a66053b88e004ef
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-09 12:23:16 +00:00
Bruno Zanotti (ADHOC) 9cb959e952 [FIX] l10n_ar: partner with not handled responsibility type
If a partner has a not handled responsibility type return an empty list
as possibles document types instead of raising an error.

closes odoo/odoo#69010

X-original-commit: abcba544043b08de4cffcf5affd12b08afec188f
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-08 19:24:09 +00:00
Bruno Zanotti (ADHOC) 2d8fb8991c [FIX] l10n_ar: Responsibility type "IVA No Alcanzado"
- Add a new responsibility type "IVA No Alcanzado"
 - Update the partner "AFIP" with that responsibility

X-original-commit: e3e20fdccc2ad7bf0015d4c0a67c7ab803a97bd8
2021-04-08 19:24:09 +00:00
Sébastien Geelen (sge) ef83c6af8f [FIX] web_editor: re-implement focus method
Focus is sometimes called on the Wysiwyg class in Note.
When the user use TAB to select the next field.

Implementation was missing.

closes odoo/odoo#69033

X-original-commit: 720c1f38a17ef54cf30e0a52bab5bceed70c2144
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-09 10:48:31 +00:00
Sébastien Geelen (sge) d7c4362319 [FIX] web_editor: update odoo-editor lib to commit 68108b2a
X-original-commit: d3c17baf260d962eb620c77e03afccea8c16c1d1
2021-04-09 10:48:30 +00:00
Meet Patel c0ca736193 [FIX] hr: correctly link work address to admin employee
Currently, when we install Employee App, the Administrator work address
is linked to a new res.partner (Administrator).

So after this commit, Administrator work address will be linked to
the res.partner of company when Employee App is installed.

closes odoo/odoo#67910

Taskid: 2479958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-16 07:13:53 +00:00
lejeune quentin 6a2b568d63 [FIX] point_of_sale: Fix wifi firmware for IoT
With the new OS RaspiOS the firmware for the wifi card are unstable.
We need to keep a specific version of firmware-brcm80211 to keep
a stable and usable wifi connection.

So we fallback on a previous version of Buster and hold the
version of the package firmware-brcm80211 before the upgrade when
we build the box.

closes odoo/odoo#69022

Id: 2499855
X-original-commit: 04c58aa229781ad165492765414483ae8e8d6693
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2021-04-09 08:56:07 +00:00