Commit Graph
147705 Commits
Author SHA1 Message Date
luvi da8ff3d087 [IMP] web: t-ref instead of this.el in the CommandPalette
The commit adapts the CommandPalette to use a t-ref to a node
in the template instead of a this.el.querySelector("...") in
the component to query an element. This will improve the
compatibility with Owl 2.

closes odoo/odoo#82752

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-14 11:15:18 +00:00
Antoine Guenet dc17e84778 [IMP] web_editor: prevent icon and text tools in stars widget
When clicking, double clicking or triple clicking in the stars widget of
the Powerbox, we don't want to see the regular options of icons or text.
This prevents them from showing.

task-2575449

closes odoo/odoo#81920

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-14 10:21:31 +00:00
Antoine Guenet d6688ca759 [ADD] web_editor: allow rating with stars in readonly fields
Similar to checklists, this allows the user to click the powerbox stars
widget even in readonly mode, so as to change a rating without going in
edit mode.

task-2575449

Part-of: odoo/odoo#81920
2022-01-14 10:21:30 +00:00
Antoine Guenet 199874c963 [REF] web_editor: change field html widget to modern module
This adapts the html field widget so it uses the modern import system
rather than the old `require`.

Part-of: odoo/odoo#81920
2022-01-14 10:21:30 +00:00
Antoine Guenet 41e98ccbe4 [FIX] web_editor: check/uncheck checkboxes in readonly fields
When a checklist is present in an html field, there is a feature that
allows us to check/uncheck its boxes without going through edit mode.
That feature was broken due to a dead callback in wysiwyg.js, which is
hereby restored.
Meanwhile, the behaviour of checklists had changed but the python code
handling the readonly checking/unchecking hadn't so this brings it up to
date[1].
Finally, the code managing checklist ids was unnecessarily complicated
as it was trying to keep the ids consecutive for no particular reason.
This refactors it to simply use unique ids based on date stamps.

[1] It used to be that checking a box checked all the children of that
box but it was in the meantime decided not to do that anymore.

Part-of: odoo/odoo#81920
2022-01-14 10:21:30 +00:00
Antoine Guenet 8266b978e1 [ADD] web_editor: two new powerbox widgets to rate with 3 or 5 stars
This adds two new widgets to the powerbox, which allow the user to
quickly insert 3 or 5 stars, then click on them to color them gold.

task-2575449

Part-of: odoo/odoo#81920
2022-01-14 10:21:29 +00:00
Nicolas Bayet 89c215983b [REF] web_editor: remove dead code
closes odoo/odoo#82742

X-original-commit: a101ead524148825c99a4032a50138140527365a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-14 09:25:50 +00:00
Juan Jose Scarafia cbfaa94e8f [FIX] l10n_ar: vat inclusion on invoice report
Prior to this commit the line amounts on the invoice report where including the VAT always. With this change we only include VAT if invoice needs to include it (_l10n_ar_include_vat)

closes odoo/odoo#82740

X-original-commit: 47996fdd4e8c79f876d669f73b18c6046a83c95e
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-01-14 09:25:46 +00:00
Nicolas Bayet f4b76e99ef [FIX] web_editor, mass_mailing: create link in new tab
In mass_mailing, creating a link from the linktool in mass mailing
generated link that would not create a new tab when clicked.

Task-2734760

closes odoo/odoo#82735

X-original-commit: c6b7556a35182174c3384c2069256826205bba22
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-14 09:25:42 +00:00
luvi 741b79cfcc [IMP] web: trim keywords in the search bar
When the search field is used to query an element, the value is
trimmed to remove unnecessary spaces before and after the actual
keywords. This eliminates the annoyance of a search having no
result because of a space that was left (for example when copy-
pasting some text). A test has been added to check if a value
has been trimmed when the text input contains spaces.

closes odoo/odoo#82193

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-14 07:47:08 +00:00
Didier (did) 493908f7d0 [IMP] mail: remove the file uploader component
Before this PR the only purpose of the file_uploader component was to inject a
`<input type="file">` inside the DOM.
We can now create this input directly inside the FileUploader model without
register a component.

task-2727815

closes odoo/odoo#82213

Related: odoo/enterprise#23261
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-13 19:04:53 +00:00
Odoo's Mergebot 45e5aca8e5 [FW][FIX] l10n_ar: demo install together with sale_timesheet
Create a demo database installing l10n_ar and sale_timesheet, something like: `odoo -i l10n_ar,sale_timesheet`

Current behavior:
We get the error
`- 'Hotel Accommodation' belongs to company 'YourCompany' and 'Partner' (partner_id: 'YourCompany, Marc Demo') belongs to another company.
`

Desired behavior:
Everything fine.
There is no need to set company_id = responsable inscripto for partner demo and admin

closes odoo/odoo#82737

Forward-port-of: odoo/odoo#80489
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-13 19:15:48 +01:00
Juan Jose Scarafia 2362d04586 [REM] l10n_ar: change of company_id on root user
Changing company_id on root user was not a good idea. We make all the changes needed to make it work without that change.

X-original-commit: 9d4145da94284b9346d4fd5bec2dd35143ec1ba7
Part-of: odoo/odoo#82737
2022-01-13 18:15:47 +00:00
Juan Jose Scarafia 82293606ad [FIX] l10n_ar: demo install together with sale_timesheet
X-original-commit: f6c0a8be17400035726388e3a6070a415f31e471
Part-of: odoo/odoo#82737
2022-01-13 18:15:47 +00:00
Victor Feyens 7d9e0968ad [REM] website_sale_blog: leftover POT file
closes odoo/odoo#82732

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-13 17:24:02 +00:00
diagnoza f7b957f611 [FIX] website: ensure unicity of find
Before https://github.com/odoo/odoo/commit/254d40ffcc21f56a80a1814da7f6355d44e5670b it was possible that when a user cropped an image
using the crop tool, a copy of the original image was created that
had both original_id and theme_template_id carried over, therefore
find could be multi-record. We strengthen that search by adding
original_id=False, which ensures we always fetch the record of the
original image and not also its copies. In addition, databases that
happen to have this issue of corrupted data will be fixed
during an upgrade with https://github.com/odoo/upgrade/pull/3110.

closes odoo/odoo#82725

X-original-commit: e4bb0cd4466404e2fba62ae2d3bbaebd831fbcb2
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-01-13 17:23:58 +00:00
Julien Mougenot 95e075ea28 [FIX] base: Correct server version when assets change
Before this commit, the server version used to detect whether the client
assets are outdated relied on the `odoo.release.version` string directly
imported at the root of the `assetsbundle.py` file.

The problem is that this string is altered by web_enterprise and we must
wait for these changes before using the string.

This commit dynamically imports the `release.version` string to use its
final version.

closes odoo/odoo#82705

X-original-commit: 9eccbd884853fddab8a17d28779d670e7d48bbc3
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-01-13 16:26:40 +00:00
Odoo's Mergebot 08be3aef88 [MERGE][IMP] sale: clean data & demo xml content
* indentation
* group records by models
  * products records (& attributes, values, ...) in the `product_demo.xml` file
  * group SO & SOL records together
  * group SO's confirmation in one place
  * ...
* move `model_sale_order_action_share` server action to the correct `views` folder
* remove useless nodes/indentation
* split security files by models

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#82719

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-13 16:30:05 +01:00
Victor Feyens c8b2a648e1 [IMP] sale: split sale_security.xml (2)
Part-of: odoo/odoo#82719
2022-01-13 15:30:03 +00:00
Victor Feyens dd12e2edf0 [IMP] sale: split sale_security.xml (1)
Part-of: odoo/odoo#82719
2022-01-13 15:30:03 +00:00
Victor Feyens 0703ad235b [IMP] sale: remaining views cleanup
* remove useless nodes/tags
* coherent attributes order (id before model)
* indentation

Part-of: odoo/odoo#82719
2022-01-13 15:30:02 +00:00
Victor Feyens d71eb19fb4 [IMP] sale: clean data/demo files
* indentation
* group all product demo data in the same file
* move one action to the views folder
* ...

Part-of: odoo/odoo#82719
2022-01-13 15:30:02 +00:00
Jairo Llopis cba2ca9003 [CLA] Remove Jairo Llopis from Tecnativa
closes odoo/odoo#82715

X-original-commit: 804fdc0b3a0eb38b821f26ffd4c30c56f6f900f0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-01-13 15:29:54 +00:00
John Laterre (jol) d87b8e7685 [REV] l10n_be: remove duplicate tax
This reverts commit 11fd24856e436136236d67f01dd88acc00105e9b.

Removing the "21% S." tax made sense for Belgium,
but created an issue for the mapping fiscal positions.
A task is being created to use the tax_scope instead (in master).

closes odoo/odoo#82713

X-original-commit: 136808203545eb5d7056d941f3fc250f2871f95b
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2022-01-13 14:35:57 +00:00
Xavier Morel b01a190a97 [FIX] base: incorrect UserError initialisation
Apparently a migration error in
0fd773a486, probably never noticed
because nobody ever tries to copy config objects since there's a
bespoke widget, and it's specifically forbidden.

Also fix the signature of the method itself to match the normal one.

closes odoo/odoo#82711

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-01-13 14:35:51 +00:00
Sébastien Theys b532db523d [IMP] mail: uniformize components localId prop
task-2732017

closes odoo/odoo#82699

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-13 13:40:42 +00:00
Nicolas Bayet 45cc8fa5a1 [FIX] web_editor: postprocess snippet once added through powerbox
Whenever adding a snippet from the powerbox, the postprocessing was not
made. This could result in unexpected behavior of the snippet.

Task-2601600

closes odoo/odoo#82694

X-original-commit: bcbf8e59c83200cb079ef15cb1fa5f7783023d88
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-13 12:47:12 +00:00
Benoit Socias bb015c4bdb [FIX] web_editor: disable command hints on navigation items
Before this commit a "List" command hint was set as placeholder in
navigation items without content upon selection of the header menu. This
showed up when using the sidebar template of the header menu.

After this commit the command hints are blacklisted for nav-items in
website.

task-2677310

closes odoo/odoo#82693

X-original-commit: e0cc23b44d798a5bf79d3e8f7e183f5e8a3c6901
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-13 12:47:08 +00:00
William Braeckman 556c1237a2 [IMP] fleet: reorder/reword fuel types
There was some confusion about all the types of hybrid vehicles.
Also changes the order in which they are displayed.

TaskId-2629318

closes odoo/odoo#82672

X-original-commit: 73171da60059c85355e8675061db485e84aedb05
Related: odoo/enterprise#23460
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-13 09:30:56 +00:00
Touati Djamel (otd) f203edd374 [FIX] stock_picking_batch: compute the state of all the batches
Steps to reproduce the bug:
- Create two batches, one with picking and one without
- Try to compute their state together with an RPC call

Problem:
If the first has no picking, the second batch does not compute state because we use `”return”` instead of `”continue”`

opw-2725988

closes odoo/odoo#82671

X-original-commit: 0242fcee2618425bd87846d818cffcd368c25121
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-01-13 09:30:52 +00:00
Xavier-Do 37227ad2cb [IMP] tests: avoid double logs on build page
Since auto-retry, real errors will lead to doubled errors on runbot.
This can be noisy and hard to understand.

This commit will help with this by using a lower log level on the first
execution. Log 25 are kepts.

closes odoo/odoo#80378

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-01-13 09:30:42 +00:00
Jérôme Vanhaudenard 59bdc60ef1 [FIX] mail: typo in action_save_as_template
Traceback on the ticket:
https://pastebin.com/mCAFJVWG

A browse should take an id or a list of ids as parameter.
```python
record = env['mail.compose.message'].browse(1)
attachments = env['ir.attachment'].sudo().browse(record.attachment_ids)
print(attachments)
attachments = env['ir.attachment'].sudo().browse(record.attachment_ids.ids)
print(attachments)
```

OPW-2728748

closes odoo/odoo#82664

X-original-commit: 74cfe2bc95827b52232995cd075757f54041d289
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-13 07:44:42 +00:00
Alvaro Fuentes bc3a01b325 [FIX] maintenance: MemoryError on compute
When computing the todo fields of maintenance requests, we could get a
`MemoryError` since we are fetching more fields that we actually need.

Here we rework the way the compute is done in order to avoid too much
prefetch.

closes odoo/odoo#82662

X-original-commit: 510831013ba081edd83191a01d562485b6ceca38
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-01-12 18:24:48 +00:00
Sylvain LE GALandvfe-odoo 4e31e23cc2 [REF] product : add a function that makes easy to add other related fields between product.template and product.product models (like barcode)
closes odoo/odoo#82642

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: vfe-odoo <Feyensv@users.noreply.github.com>
2022-01-12 17:33:59 +00:00
Didier (did) cfd5adbb2e [IMP] mail: create model view for activity popover
task-2579306

closes odoo/odoo#81859

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-12 17:33:52 +00:00
Victor Feyens 33f58b2824 [IMP] sale_*: clean order line name computation
* make sure full content is translated in partner language
* drop useless product param (use line product_id field instead)
* delegate order lines name computation to computes for ecommerce carts

closes odoo/odoo#82620

Related: odoo/enterprise#23432
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-12 16:43:37 +00:00
Audric Onockx (auon) 2933d5eb5b [FIX] resource : compute the correct default dates when planning a shift
Steps :
- Install Planning
- Users > Mitchell Admin > Preferences > Timezone :
	Europe/Brussels
- Settings > Employees > Company Working Hours > Timezone :
	Japan
- Planning > Gantt View > Week > Mitchell Admin x Friday > Click "+" button

Issue :
- Start date is set by default to Thursday 05:00
	whereas it is expected to be set on Friday 00:00

Cause :
- When we want to plan a shift on a day,
	we look into the 00:00 to 23:59 range for this day in calendar's tz
	to get the closest work time inside of it.
- Yet, this doesn't take the "resource user" into account.

Fix :
- Set these limits for the day in resource's tz.

opw-2678221

closes odoo/odoo#82555

X-original-commit: 1b248ebd58e0a57b070ebf7d67c6da78351a720a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-12 16:43:24 +00:00
Thibault Delavallée 37db926fe8 [REF] various: remove usage and dependency on html2text library
We have our own html2plaintext, already used in lot of use cases instead of
just a few for the html2txt library.

Notably for emails: most emails going through Odoo stack use our simple
html2plaintext to format the body alternative. When no body alternative
is given to ``build_email`` an alternative is built using the library to
remove. Using our own parser allows to have the same results compared to
using ``MailMail.send()``. Difference lies in spaces and new lines as well
as markdown. Our html2plaintext is a bit simple and does not try to generate
Markdown but generates a simple plaintext version.

This also helps solving some issues with depending on that library.

Task-2702034

closes odoo/odoo#82486

X-original-commit: b3b9627b655cd7cb928925affed6cc8d92661e8d
Related: odoo/enterprise#23364
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-12 16:43:16 +00:00
Thibault Delavallée be878f5d6a [IMP] base: test body alternative done in build_email
Purpose of this commit is to add some tests about body alternative done
in build_email when none is given. It uses a library we are about to
remove and testing it is therefore necessary.

Task-2702034

X-original-commit: 92b102c87bbdb9073f794a414a41460e4146acd2
Part-of: odoo/odoo#82486
2022-01-12 16:43:16 +00:00
Bayarkhuu Bataa f22d6be9d8 [FIX] hr_recruitment: provide address_id in the action
Creating employee from applicant was not providing the default
home_address_id

closes odoo/odoo#81121

X-original-commit: 68cdf057a9e769071fab6726eaf3b37d16959bf1
Related: odoo/enterprise#23443
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-12 16:43:08 +00:00
Bayarkhuu Bataa 574900eb96 [CLA] signature for BayarkhuuBataa
X-original-commit: 8f77c11b7a482c7093f190cb301ca65e67646cdc
Part-of: odoo/odoo#81121
2022-01-12 16:43:08 +00:00
Alvaro Fuentes 1f163eed03 [FIX] maintenance: set noupdate for stages
It's useless to trigger the udpate of the stages during module (or whole
DB) upgrade if these stages do not change. It's been the same since at
least 12.0. Updating the stage triggers a series of computes that may
end up in MemoryError during upgrade.
https://github.com/odoo/odoo/blob/7b3b623cf3359ac1eea537177f7f963e81403a01/addons/maintenance/models/maintenance.py#L434-L441

closes odoo/odoo#82651

X-original-commit: 387bc337930e55511d336351db3ce3ddd80f524c
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-01-12 15:49:39 +00:00
Kartik Chavda 5b751d36db [FIX] project: ensure email alias field is visible event if empty
This commit show alias_name field span in read only, whether it is emtpy
or not. The field is displayed in bold if not empty.

task-2722863

closes odoo/odoo#82649

Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: bbc4ff1059d161414ef4338981eb015871ac46c5
Related: odoo/enterprise#23445
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 15:49:31 +00:00
Kartik Chavda a942000c2a [FIX] project: fix 'Blocking' stat button for project update
The purpose of this commit is to:

    - Open the form view if there is only 1 blocking task.
    - Prevent the project update button to show in the view opened
      through the action_dependent_tasks action.

task-2722863

Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: 22078a6a0ee0f059db8aef3a283485bc192ce0a1
Part-of: odoo/odoo#82649
2022-01-12 15:49:31 +00:00
Kartik Chavda 960e79f843 [FIX] project: display Gross Margin button if analytic_account_id is set
The purpose of this commit is to only show 'Gross Margin' stat button
in right side panel of project update when analytic account is set
on that project.

So, in this commit we add a condition in order to only show that stat button
if an analytic account is set on that project.

task-2722863

Closes: https://github.com/odoo/odoo/pull/82065
X-original-commit: 95c1deb34330db98e24f70fceae85038d47217e7
Part-of: odoo/odoo#82649
2022-01-12 15:49:30 +00:00
Florent de LabarreandRaphael Collet 09985fd42a [FIX] stock: Exception are not correctly logged
Il during the scheduler an exception append, the error is not correctly logged.
This PR allow to catch the error with logger analyser (like sentry).

closes odoo/odoo#82648

X-original-commit: c68e1d1c13d116bda6b91fcbbcd61a26739a9894
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2022-01-12 15:49:20 +00:00
roen-odoo 6a46d5e50a [FIX] point_of_sale: Spanish decimalSeparator
Current behavior:
When using spanish language in PoS the "," decimal separator was ignored

Steps to reproduce:
- Create a sale order with a discount
- Change profile language in spanish
- Open PoS and load the order created before in the PoS
- The discount is not correct, for example 18.2 will become 100

opw-2718260

closes odoo/odoo#82593

X-original-commit: ac4d985c35109b82df4f095bfe84627b290d185d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-12 15:49:16 +00:00
Cedric Prieels (cpr) e9bc5b9f36 [IMP] {planning}: add demo data
Some demo data have been added on the planning module.

task-2677949o

closes odoo/odoo#80439

Related: odoo/enterprise#22536
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 15:49:12 +00:00
Kartik Chavda 9398542cf2 [FIX] project: hide rating warning when customer ratings is disbled
Purpose of this commit to hide rating warning in project task
stage form view.

So, in this commit add customer ratings group to rating warning
div.

task-2696911

closes odoo/odoo#80232

Related: odoo/enterprise#22470
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 15:49:00 +00:00
Victor Feyens c1709fe33e [FIX] sale_stock: query counter
closes odoo/odoo#82645

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-12 14:55:11 +00:00