Commit Graph
142121 Commits
Author SHA1 Message Date
Jérémy Hennecart 7630b837b2 [IMP] hr(_work_entry)_holidays: increases queries count
Adapt queries count to the changes applied with the previous commits.

task-2196775
COM PR: odoo/odoo#55190
ENT PR: odoo/enterprise#12196
UPG PR: odoo/upgrade#1532
2021-04-15 16:07:12 +00:00
Jérémy Hennecart ac13964244 [IMP] calendar: improve the way calendar event are displayed
With this commit we try to improve the way the events are displayed
to the user. Now, an event is displayed for each attendee of the event
that are selected in the filter. These events are displayed correctly
based on the status of the attendee in the event.
The colors displayed for the events now represent the attendees and not the
organizer.

If an attendee edit an event, it is edited for all others attendees.
Also, when an attendee that is not the organizer try to delete the event,
then the event is now declined in place of being deleted. If the organizer
delete the event, it is deleted for all attendees.

In case of an event where all attendees have declined it but the organizer,
the organizer see now a danger icon before the name of the event and it's
outlined and not filled with color, no matter of the actual status of the
organizer in the event.

task-2196775
COM PR: odoo/odoo#55190
ENT PR: odoo/enterprise#12196
UPG PR: odoo/upgrade#1532
2021-04-15 16:07:12 +00:00
Jérémy HennecartandSimon Genin f8b6d2f17d [IMP] calendar: save filters of the calendar view for the user
- We now save the status of each filters to avoid the user to do the
same operations, if he go elsewhere in the meantime.

Task ID 2196775
COM PR: odoo/odoo#55190
ENT PR: odoo/enterprise#12196
UPG PR: odoo/upgrade#1532

Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: jeh-odoo <jeh@odoo.com>
2021-04-15 14:16:04 +00:00
Jérémy HennecartandSimon Genin a901d65550 [IMP] calendar: improve the quality of the calendar app
- Remove organisers filter from the sidebar

- Responsible becomes Organizer

Task ID 2196775
COM PR: odoo/odoo#55190
ENT PR: odoo/enterprise#12196
UPG PR: odoo/upgrade#1532

Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: jeh-odoo <jeh@odoo.com>
2021-04-15 14:15:44 +00:00
Simon Genin (ges)andjeh-odoo 0774459f5d [IMP] web: prepare calendar view to ease modifications
The calendar renderer used a template for events.
Now moved as a configurable template to ease futur calendar changes.

This commit adds also a custom event to the calendar renderer so that custom
implementations have a way to re-render the event items within the calendar
after making internal changes to the event records.

We introduce also a new option for a field "filter_field" which allows to specify
the field of the model in which we will save the status of a filter.

This is preliminary changes in order to make the calendar view able to modify
the attendance status of a meeting and refresh the events to visually display
if the user is attending or not.

Task ID 2196775
COM PR: odoo/odoo#55190
ENT PR: odoo/enterprise#12196
UPG PR: odoo/upgrade#1532

Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: jeh-odoo <jeh@odoo.com>
2021-04-15 14:05:10 +00:00
Anh Thao Pham (pta) 55eb75d949 [FIX] web: do not use default en_US lang when loading translations from session
When loading translations from Session, if no lang is defined in context or html,
it is loading translations of en_US lang by default.
No default should be used to fallback on the language of the current user.

opw-2501708

closes odoo/odoo#69336

X-original-commit: 0b9ab4efcf66d4c5099a9f33d2fb1b4dd814eb5c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-04-15 16:23:20 +00:00
Francois (fge) 27da86a138 [FIX] base: Catastrophic Backtracking in js_transpiler
This commit is to fix two problems when transpiling an @odoo-module file.

1. When a file exports an object with a long name, the regex EXPORT_FROM_RE will cause catastrophic backtracking. The regex will take a long time to resolve.
Example:
```js
    export {a, aReallyVeryLongNameElement};
```

2.  When a file exports an object without ending the line with ';'. The regex EXPORT_OBJECT_RE will remove spaces and line breaks that follow this kind of export.
Example:
Input:
```js
    export {a}

    xxx
```

Output:
```js
    Object.assign(__export, {a})xxx
```

Output after this commit:
```js
    Object.assign(__export, {a})

    xxx
```

closes odoo/odoo#68868

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-04-15 13:40:02 +00:00
Raf Geens fc41a4a6c9 [FIX] account: Traceback on multiple auto-validation candidates
When an auto-validating reconciliation model is defined for matching
bank statement lines to invoices, it was possible to get a traceback
when the bank statement lines were in a certain order and matched in a
certain way.

In particular, if the first bank statement line is priority 3
(communication_flag True) and the amount is an exact match with the
invoice, it will be instantly reconciled. If there's a second line
that's a priority 5 match, it crashed because _filter_candidates didn't
take into account that candidates_by_priority could be empty if the
candidates were already reconciled.

Instead we just return an empty list of candidates and priorities when
this happens.

closes odoo/odoo#69331

Ticket: 2507189
X-original-commit: e9538d9cee092e034b85187a2eae857349f42ce7
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-15 15:07:21 +00:00
Antoine Guenet 65800bcfa5 [FIX] web_editor, mass_mailing: restore missing html edition feature
closes odoo/odoo#69324

X-original-commit: 8e4d0c43eac15718df45b32738d7eb46be426652
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-15 14:00:39 +00:00
Nicolas Pierre 1355c9694e [FIX] mrp: archive operations when deactivating WO
When we deactivate the work orders in the settings, new MOs still
use operations that were assigned to the BoM, it just does not show the
Operations tab. We fix that by archiving the operations when work orders
are deactivated in the settings.

closes odoo/odoo#66108

Related: odoo/upgrade#2344
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-14 07:48:16 +00:00
Julien CHEVREAU (JCU) d5270c1c8a [IMP] account: check non reconcilable accounts for configured journals
Beforehand, users could configure an account as non reconcilable
even when it was configured as a payment credit or debit account
in a journal. This prevented journal items to be reconciled

Now, when a user tries to set an account as non reconcilable,
we check if there is no journal with a payment credit or debit account
set to this particular account. If there is at least one journal,
then we display an error message stating the journals names and ids
that the user would have to modify before changing the account
configuration.

closes odoo/odoo#69317

X-original-commit: 87c207f3a408abb93d9b8378ef4aa1744935d86d
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Julien CHEVREAU <Julien-CHEVREAU@users.noreply.github.com>
2021-04-15 12:40:17 +00:00
Nicolas Seinlet b2a3471293 [FIX] project: fix count for task with NULL project_id
This commit fixes a regression introduced in #62577 .

Tasks are only taken into account iff their project_id is in self.ids.

closes odoo/odoo#69303

X-original-commit: 5be4970ddec2d9052d3b044e6e156aef94442c9a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-15 10:48:43 +00:00
Goffin Simon 88957afca0 [FIX] mail: Wrong signature of function export_data
Steps to reproduce the bug:

- Go to Settings > Technical > Messages
- Select some records and export it

Bug:

A traceback was raised because

PS: When exporting data, the function export_date is called from web/controllers/main.py
with the attribute raw_data

opw:2504763

closes odoo/odoo#69308

X-original-commit: 69b27ac3f778b99a7d583ee6a9e8607a36d0a3b2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-04-15 11:35:03 +00:00
Ivan Yelizariev 900373a237 [FIX] sale_timesheet: speed up computing is_service on installation
on large database module installation may be aborted because of timeout error.

---

opw-2475335

closes odoo/odoo#69298

X-original-commit: f66fc7b9c410e60ab08ccb3882d39631e4d1eccc
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-04-15 09:58:31 +00:00
d1b54c2edd [FIX] base: assets cannot load on Windows
Assets can not be loaded on Windows due to the OS path separator
character ´\´.

This commit fixes it.

Specifically:

- `os.path.split` needed to get changed because it only serves to split
  the last part of the path (equivalent to `str.rsplit(os.path.sep, 1)`).
  What we want instead is to replace all `os.path.sep` by `"/"`.

- for a template file, when verifying that the path is safe we were
  trying to determine if it was including the string `{addon}/static/`.
  It should have been converted to the correct OS representation of a
  path. Now it is.

- `_get_paths` method should return the OS-style paths for the template
  files and the web-style path for others.

closes odoo/odoo#69290

X-original-commit: e8e724ad6c754484bc5f03ce3262d2337e476d42
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
2021-04-15 08:52:36 +00:00
Ravi Gohil 27e72a9bbd [IMP] l10n_ch: added English and updated translation
- records in XML files are now in English language instead of French
- translation for the same will be loaded through *.po files for French, German and Italian
- improved translation for French, German and Italian languages

closes odoo/odoo#67512

Task: 2391988
Related: #67512
Related: odoo/enterprise#16944
Enterprise: https://github.com/odoo/enterprise/pull/16944
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-15 08:58:16 +00:00
Goffin Simon f0e1da98a6 [FIX] account_edi_ubl: payment_reference not available in efff format
Inspired from http://www.datypic.com/sc/ubl21/e-cac_PaymentMeans.html

opw:2468492

closes odoo/odoo#69267

X-original-commit: e4a657e46cd189bc7ffcf3f94f26f942e6f99d57
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-14 16:05:26 +00:00
Nasreddin (bon) e8f6256141 [FIX] portal: display discounts on quotation pdf for portal user
Issue

	- Install "Sale" app
	- Acivate "Discounts" feature in settings
	- Create a quotation to a portal user (ex: Joel Willis)
	- Add a product with a discount then send
	- Logout then login as 'Joel Willis'
	- Go to 'My account' then 'Quotations'
	- Select the quotation just created and print it

	Discount not display in pdf file.

Cause

	The current env.user when rendering pdf is the portal user.
	To display discount, current env.user must have group
	'product.group_discount_per_so_line' who is not the case
	even when using sudo() on report template.

Solution

	Since Odoo 13.0, the sudo() function does not return the
	superuser by default but instead the current user
	with a bypass on access rights.
	Therefore, must add `.with_user(SUPERUSER_ID)` on report.

opw-2501337

closes odoo/odoo#69272

X-original-commit: 5dde19c92ecee8ac0238bb5c8e71263840534c28
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-04-14 16:51:12 +00:00
William Henrotin 67e575e6fd [FIX] mrp_account: copy extra_cost to backorder
In a subcontracting flow, a production order is created to reflect the
subcontractor work. An extra cost is set on this production order
corresponding to the purchase order line price unit. If the
subcontracting product is tracked, we may create some backorder to save
all the lot/serial numbers. As the extra_cost is not copied, the first
lot/serial number will have the corresponding stock valuation layer with
the correct quantity. The following ones will only have the cost of the
components as value.

closes odoo/odoo#69245

Opw: 2487450
X-original-commit: 262c2ba8773c698ccde499b095794ab0fc780699
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-14 15:05:37 +00:00
Munaf Khan 82526e8a1f [FIX] fetchmail: prevent onchange for erasing server name
currently, in fetchmail while create an incoming
mail server, Set a server name while being in POP
or IMAP server type and Switch to "Local" server type
the server name is erased.

with this commit, the value of the server name
should not be erased with onchange.

closes odoo/odoo#69250

Taskid: 2258523
X-original-commit: cf102783b43a44a38565768129ef414758a71fc6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-14 11:57:14 +00:00
qmo-odoo bcb3edd35b [FIX] calendar: Invalid leaf in join route
This commit fixes an invalid leaf in join route
Follows up: https://github.com/odoo/odoo/pull/68022

LINKS:

closes odoo/odoo#69242

Taskid: 2499471
Pr: #69103
X-original-commit: 9e4cba257d0d44fa52d6783e67a363e5cf6b7735
Related: odoo/enterprise#17677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-14 10:28:18 +00:00
JF Aubert 6f182eeeab [FIX] stock: allow change of reference unit of measure
closes odoo/odoo#57485

Related: odoo/enterprise#17365
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-14 13:14:10 +00:00
oco-odoo eaf5d86fe7 [FIX] base_vat: patch orm limitation
https://github.com/odoo/odoo/pull/68253 fixed a bug in check_vat that caused it not to run any check when called on a partner with no country.

However, doing this caused another issue because of an ORM limitation: when writing vat and country_id with a single write() on the res.company, two distinct write are triggered on the related res.partner, one for each field. Both those write trigger the check_vat constraint.

Depending on the order in which the keys of the dictionnary passed to res.company's write were ordered, country_id could or could not be written before vat. If vat was written first and did not start with a country code, the write() on res.partner failed the constraint, because country_id wasn't set yet. This was wrong, but used to pass as there was no country_id on the partner, before https://github.com/odoo/odoo/pull/68253 fixed that.

To circumvent the issue, we now allow entering any vat number without performing any check if it does not start with a country code and no country_id is set on the partner.

closes odoo/odoo#69243

X-original-commit: 7036b671228fdb5986b4f62a610a2e4d4132b8b1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-14 10:29:00 +00:00
Julien Castiaux ee7287430f [REF] base: ir_ui_view get_view_arch_from_file
I had troubles understanding how was the function working, I decided to
rework it a bit, ended up rewritting much of it. I hope this new
implementation is easier to understand.

closes odoo/odoo#69233

Task: 2463632
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-04-14 11:19:33 +00:00
Aaron Bohy facd78d5f3 [FIX] web: onchange: send correct nested x2manys values
Commit [1] recently fixed an issue with nested x2many fields and
onchanges: in some cases, all field values weren't sent to the
server as they should.

However, there is a small issue with this fix. We didn't correctly
apply the default value to option `changesOnly`: when not given,
it was considered false, whereas in this particular function it
should have been true.

It caused an issue in the following scenario:

Have a form view with an x2many field (say A) displayed as a list.
In the list, there is another x2many field (say B), and (whatever
its type) a field C with an onchange. When the user changes C, the
onchange is performed, and we send to the server the value of all
fields. In particular, in the row, we send the value for the
many2one field pointing to the main record (the inverse field of
the x2many relation). The value for that field is basically the
whole record, containing itself field A. For field A, the value is
a list of commands, and for the updated record, it is a command 1.
Before this commit, in the values sent for this command, field B
was the empty array, even if it wasn't empty.

This issue was reproducible in account.move, on an existing record
having already a line in invoice_line_ids (this is field A). In
that line, tax_ids (this is field B) must have a tax which is
included in the price. When changing the quantity of the product,
the subtotal wasn't correctly computed.

[1] https://github.com/odoo/odoo/commit/a8b43d02066b2299ac2f4b88056c37725e9ce6cd
opw~2489755

closes odoo/odoo#69227

X-original-commit: 3f54ca3e29d1537f66c6a3b56494dc065d9230e9
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-04-14 09:01:34 +00:00
Antoine Guenet fef5c6eff7 [ADD] website: tour adding a megamenu item to top menu
closes odoo/odoo#69223

X-original-commit: 480986ad21b0df4e1ca63bd6e5ef97c6d7f7bf29
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-14 08:28:05 +00:00
Antoine Guenet 46ff93fdab [FIX] website, web_editor: properly init and save new menu entries
X-original-commit: 31063c117a46cb77efe9e4d2ad3d8bd19940dc2f
2021-04-14 08:28:05 +00:00
Julien CHEVREAU (JCU) 0cf8df4f3f [FIX] account: Check Move Status Before Posting
Beforehand, if two users independently opened a draft
invoice on their respective sessions, then both of them
clicked on the "Post" button, then the invoice was
posted twice.
On a more general aspect, the view currently "prevents" users
from posting moves several times, but technically speaking,
nothing stops users from posting moves several times.

Now, after checking that the user indeed has the right to post
a move, the next check is about verifying that the move is
not already posted.

opw-2479201

closes odoo/odoo#69178

X-original-commit: b7db7db283d7b9d167201b791e6282b022d59c40
Related: odoo/enterprise#17658
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Julien CHEVREAU <Julien-CHEVREAU@users.noreply.github.com>
2021-04-14 08:37:32 +00:00
wan fcdbb3c2f8 [FIX] l10n_lu: add taxes for ATN
Necessary Corrections for benefit in kind (ATN 17%) & Tax Report

task-2500543

closes odoo/odoo#69165

X-original-commit: 9c573d09a5f935d6cec5776c2dfc90a04732847c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-13 10:28:14 +00:00
Sunil Shrimali 612845686c [IMP] crm: add probability on lead tree view
Currently, in crm probability field is not displaying
in lead tree view. with the removal of lead scores,
the probability is now the tool we want users to see
as their "quality indicator" for their leads.

With this commit, we now display probability field
(optional="hide") in lead tree view, also probabilty
label changes to "Probability (%)" in Leads and Pipeline
Tree view.

closes odoo/odoo#68680

Taskid: 2496347
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-12 14:07:52 +00:00
Josse Colpaert 241c758bbc [FIX] account_edi: disable prediction when importing invoices.
closes odoo/odoo#69177

X-original-commit: 1502612c5d7f7516091e7e9dd2dba47cb0fccf25
Related: odoo/enterprise#17605
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-13 12:49:45 +00:00
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