Commit Graph
152511 Commits
Author SHA1 Message Date
shsa-odoo 528ee16956 [FIX] web_editor: preventing traceback on quote icon click
Before this commit:

Onclicking quote icon of BlockQuote generates traceback

After this commit:

Now on clicking quote icon doesnot generate traceback

Task-2920794

closes odoo/odoo#96944

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-28 21:01:44 +02:00
PNO 72ea4d57d2 [FIX] mrp: Wrong replenishment order notification
On the commit 69dcdd4, the order='create_date desc'
 was removed and the way of getting the MO for the notification changed. Now, the context is used, it should be written_after instead of written_date.
In addition, the now declaration should be at the beginning of the method action_replenish.
(The MO created is correct, only the notification is wrong)

Should be forwarded
OPW-2877457

closes odoo/odoo#96986

X-original-commit: 029da238a2baaf59bdf9ae828a4739ee4a9f3ede
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-07-28 18:01:25 +02:00
Louis Wicket (wil) 072756d9b1 [IMP] mail: remove Record/get
closes odoo/odoo#96984

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 18:01:22 +02:00
Romain Estievenart 5c00f30307 [FIX] web: forms inside dialog misaligned
Due to the refactor of the form view, `display:block` wasn't apply on
`o_form_nosheet` anymore; This is due to the fact that `d-flex flex-nowrap`
are now directly set in the DOM and thus has !important by default.

We now only use flex when this is not a `o_form_nosheet` element.

Steps to reproduce:
1. Open Sign
2. Click on "Send"
-> the style of the dialog form content is broken

task-2871070

Link:
https://github.com/odoo/odoo/commit/28200c5ad584e9b7f51ffcf7902c8d366b93e2de#diff-26a45bff860d45f36003c55996b92ced0762c62dcd94d5d79bf7b5e4094a1ee0R191

closes odoo/odoo#96964

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 16:40:35 +02:00
tsm-odoo ecd4cba040 [FIX] mail: runbot error accessing messaging on undefined
This PR fixes the 4427 runbot error.

closes odoo/odoo#96966

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 15:03:54 +02:00
Pierre Paridans 171d9cffc7 [FIX] web: weird modal effect on backdrop click
Since BS5 migration, clicking on the backdrop of a "static" modal
triggers a weird scaling-up/down effect on the modal.

Steps to reproduce:
- Open Livechat Channels
- Open a channel
- Click on operator which opens a modal
- click on backdrop
=> scale-up/down effect

This commit fixes it by disabling the scaling transform effect on
modals.

closes odoo/odoo#96958

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 15:03:51 +02:00
Bastien Dosimont 3958d15086 [IMP] website_sale : llow bulk uploading of images from frontend
This commit adds more functionalities to the web editor when editing a
product's page in order to make it more user friendly to add change or
resequence the many images a product may have.

TaskId-2692189

closes odoo/odoo#85686

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-28 15:03:48 +02:00
frc-odoo 8821fb0641 [FIX] web_editor: adds missing not null check
closes odoo/odoo#96975

X-original-commit: c2f6be56a09e3dd627922036c6deaa22aa2238dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-28 13:21:33 +02:00
FrancoisGe 4b7b89b040 [FIX] web: duplicate blank option in selection field
Before this commit, in a field selection, it was possible to have two
blank options.

To reproduce this problem, you need to have a non required selection
field and one of the selection sent by the server has the value false.

Our solution is to ignore the false selection returned by the server
and add the false option only if the field is not required.

closes odoo/odoo#96951

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 13:21:25 +02:00
tsm-odoo 8a04a0297a [IMP] mail, im_livechat: remove createComposerComponent
task-2871066

closes odoo/odoo#96886

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 13:21:22 +02:00
FrancoisGe 19c2bbfa3a [FIX] web: KanbanView multi edit
Before this commit, in a kanban view, if you try to create a new record
while another one is being saved, then a crash is displayed.

To avoid this problem, when we create a new record in quickCreate mode,
we will first wait until the first one has finished saving before
creating the new one.

closes odoo/odoo#96826

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 13:21:18 +02:00
qsm-odoo a234b8b9b6 [FIX] website_crm: remove useless confusing contact form option
Follow-up of [1].

With [2], the contact us page was made entirely static to ease and allow
more things in its customization. The customize_show option of the
website_crm app which added the possibility to switch between sending
emails or creating opportunities was to be removed to rather be done via
the standard edit-mode option, by clicking on the form itself. Part of
this option view was however kept (the auto-fill of some more values)...
but it was not supposed to be kept as a customize_show view. With this,
a customize_show option with the same name "Contact Form (Opportunity)"
still appeared and gave the illusion that this is the way to make the
form create opportunities instead of sending emails. In master with [3],
the customize_show was removed but refactored to appear in the editor
panel.

After this commit, we remove the editor panel option that was converted
by mistake.
We also re-enable the view automatically via the 16.0 migration scripts.

[1]: https://github.com/odoo/odoo/pull/69888#discussion_r921081562
[2]: https://github.com/odoo/odoo/commit/417138b44311a05aa206b6e2e38bb67863843c74
[3]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

Related to task-2462993

closes odoo/odoo#96145

X-original-commit: 8620c3bc71183b5ebd7801c139eab1736070d846
Related: odoo/upgrade#3690
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-28 11:54:24 +02:00
Rahul Prajapati fda3a48e94 [IMP] mail: move oncomponentupdate from discuss_view to thread
PURPOSE:

The whole process depends on `thread_view` render, not `discuss`. So, it's
unnecessarily making `discuss_view` observe and rerender on a lot of useless
values.

SPECIFICATION:

Remove method from `discuss_view`. Make some onChange methods for handling
the functionality.

Task-2869417

closes odoo/odoo#94147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 11:54:21 +02:00
Eleftherios Kritsotakis aee820510d [IMP] point_of_sale: responsive ClosePosPopup
In this commit, we adapt our design
to match the needs of smaller screens.

closes odoo/odoo#88006

Related: odoo/enterprise#25910
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-28 11:54:09 +02:00
Eleftherios Kritsotakis b3067091ca [IMP] point_of_sale: download/print saleDetailsReport from closePosPopup
In this commit we make it possible for a user to
download/print the Sales Report of the current
session by clicking at the "download"/"printer"
icon at the lower right corner of the closing pos
popup. This is a commonly used feature. Thus, we
make the UI more usable.

In general, the sales report can be generated by two
different ways:

- either by providing a start and end time (products
within that time span will be included).

- or by providing a session_id (products that are sold
during this specific pos_session will be included) which
is used in some localisation modules (e.g. pos_l10n_se).

To achieve this, we generalized the `_get_report_values`
function to consider both possibilities. As a result,
the inherited version of the function at the
pos_l10n_se module was made reduntant, so we deleted
it.

NOTE: the "Printer" button will be displayed only when
a printer is connected to the IoT box.

task-2755384

Part-of: odoo/odoo#88006
2022-07-28 11:54:09 +02:00
Eleftherios Kritsotakis 201e782dfb [IMP] point_of_sale: usability of ClosePosPopup
In this commit we modify the ClosePosPopup
so that we make it more usable.

For this reason we expose less info in order
to keep it simple for the user and we rename
the footer buttons respecting the Odoo standards.

Finally, since we want to make it more obvious
to the user and avoid unwanted acceptance of the
payment difference, we show ConfirmPopup with the
relevant information.

task-2755384
subtask of task-2669747

Part-of: odoo/odoo#88006
2022-07-28 11:54:09 +02:00
Nshimiyimana Séna 679fed2c52 [FIX] web_editor: translate editor commands
Steps to reproduce:
- switch to any language other than English
- go to a page where you can use the text editor,
  for instance you can try to edit a project's description.
- type `/` in the editor

You should see that some commands are not translated.

Some files modified in this commit are located in the
web_editor/static/lib/web-editor directory.
However, only the JS code located into /static/src/ is considered for
export of translations. This is done to avoid polluting translations for
code not managed by Odoo.

We have to update the .pot file manually. A good workaround is to copy
the web-editor folder inside to static/src, export the
translations and then delete the copy folder.

However, this means that those updates to the .pot file will be lost in
the next translation export.

opw-2918128

closes odoo/odoo#96939

X-original-commit: 0cc5505b27f29d44c25af83653b09b1b49cfec79
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-07-28 10:28:06 +02:00
Alvaro Fuentes 27854c787a [IMP] test_base: test add/remove implied groups
Given a recordset R of (at least two) groups, and a group A.
We want to ensure that:
* `R._apply_group(A)` adds A to the list of implied groups of _all_
  groups in R.
* `R._remove_group(A)` removes A from the list of implied groups of
  _all_ groups in R

This is especially problematic for config settings of the form
```
class MyConfig(models.TransientModel):
    _inherit = 'res.config.settings'
    group_imply_A = fields.Boolean('x',implied_group='A',group='B1,B2')
```
since activating the implication via `group_imply_A=True` currently
fails in case only one of B1,B2 already implies A.

opw-2832741

closes odoo/odoo#96928

X-original-commit: 81dc64740ba46355462ed2169e57fc0ce694ccdb
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
2022-07-28 10:28:03 +02:00
Alvaro Fuentes af886f3673 [FIX] base: correctly apply implied groups
If one of the groups in `self` implies the group `implied_group` then
the rest won't be updated.

This also contradicts the way the settings are later checked (which is
correct) on
https://github.com/odoo/odoo/blob/f2c214e227db7c9ec2340ef87644f2f7c2e370c5/odoo/addons/base/models/res_config.py#L508

See 4f19f29a

opw-2832741
upg-356843

X-original-commit: 1754c744c8d00925d40c44742de3600389f7af47
Part-of: odoo/odoo#96928
2022-07-28 10:28:02 +02:00
Lin WenwenandJulien Castiaux c06cee44fe [FIX] base: serialization bug when acquiring cron
Start Odoo with multiple cron threads (e.g. --max-cron-threads=4),
trigger many crons at once, there is a chance one of the cron thread
fails due to a serialization error.

Inside of the `_acquire_one_job` function, the query evaluates many rows
to find one that fit multiple requirements. Two of those requirements
are (1) that the `nextcall` of the row is in the past or (2) that it
exists a cron trigger for that cron with a `call_at` in the past.

In case the `nextcall` of one of those rows is modified or the cron
triggers are removed by another transaction then there can be a
serialisation failure in the current transaction. This serialisation
error is important, it prevents the current cron worker from acquiring a
cron job that has been processed in another cron worker.

The problem is that that postgres doesn't tell which row was modified by
the other transaction (=processed by another worker cron) so it is not
possible to just skip that cron and continue with the others.

Our solution is to limit the WHERE clause of the `_acquire_one_job`
function to a single row. In case there is a serialization failure we
know the cron was processed in another job and we can skip it.

Closes #96584

closes odoo/odoo#96926

X-original-commit: 684750a0c2c83acffb32e555bd3140a2c76d7219
Signed-off-by: Julien Castiaux <juc@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2022-07-28 10:27:58 +02:00
Victor Feyens d3c935ff27 [CLN] payment: unnecessary csrf token
The csrf token given to the assignTokenRoute is not necessary
and will trigger warnings in the logs.

closes odoo/odoo#94020

Related: odoo/enterprise#28595
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-07-28 10:27:55 +02:00
Victor Feyens 5e2d675149 [IMP] payment: provide the access token to the assign route
to be able to safely check the user is allowed to modify the specified
portal record.

Part-of: odoo/odoo#94020
2022-07-28 10:27:54 +02:00
Nguyen Hong Quang 869f933252 [FIX] account:'Journal Entry' being hidden by their container
Currently, button 'Journal Entry' not wrap with classes `.o_stat_info
.o_stat_text` which make this
text being hidden by their own container.

This PR will fix this problem.

closes odoo/odoo#96927

X-original-commit: 8b7d548cdab9d9e6169553c2b8cde5a4e68004dd
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-07-28 09:14:53 +02:00
Florian Damhaut 3009863bc5 [FIX] sale_coupon: Apply taxes to fixed_price discount
Step to reproduce:

    Create a promotion with fixed price discount
    Create a SO where the promotion can apply with taxes on the
    products
    Trigger the computation of the taxes

Current behaviour:

    No taxes are applied on the fixed price discount

Behaviour after PR:

    Taxes are applied on the fixed price based on their
    proportion to the total amount.

opw-2806780

--------------

FW port of #88393

closes odoo/odoo#96923

X-original-commit: 43b34e9a38f1291db7b85521dee3266541812dd6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-28 09:14:50 +02:00
sofiagvaladze edcda35087 [FIX] hr_expense: set quantity to 1 when choosing 0-cost-product
Scenario:

Open expense, choose product with cost, set quantity to 5, now choose
any 0-cost product. Save the expense.

Behavior: quantity is 5

Expected behavior: quantity should be set to 1

Implications: As a result, in the list view on expenses, we see incorrect quantity.
Moreover, in SO, price_unit will be incorrectly computed.

task - 2867723

closes odoo/odoo#96732

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-28 09:14:47 +02:00
Lucas Perais cea8a6adaf [FIX] views: fields: one2many open record containing another one2many
Have a form view with a one2many list with one record inside.
Click on it to open it. The form view that will open must also have a one2many list

Before this commit, there was a crash because the information of the main record's view
was not propagated to the form view of the opened record. Generally speaking, env.config was lost.

After this commit, we propagate correctly the config.

closes odoo/odoo#96618

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 09:14:43 +02:00
Lucas Perais 6eb2238294 [FIX] tests: views: helpers: the view's env is not the global env
Before this commit in tests, when creating a view with makeView, the same env was shared for services, view and
main_components_container. This is rather wrong as bugs in prod could not be reproduced in tests.

For example: env.config was present in the env for every services and components, this is wrong as
only View must receive it in its env.

After this commit, makeView separates the env for services and top-level components from the one dedicated for View.

Part-of: odoo/odoo#96618
2022-07-28 09:14:43 +02:00
Simon Genin (ges) 6ab02de109 [REF] base_setup: convert module to new js framework
convert res_config_dev_tool widget
convert res_config_edition widget
convert res_config_invite_users widget

closes odoo/odoo#96615

Related: odoo/enterprise#29804
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 08:10:45 +02:00
Jorge Pinna Puissant cd624c891f [IMP] web: focus trap on the dialog
This commit will trap the focus on the dialog, this will avoid modifying
a background record when a dialog is open. Trapping the focus on the
dialog is a well-known technique for modals (dialog).

closes odoo/odoo#96361

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 08:10:42 +02:00
John Laterre (jol) e55196375a [FIX] account: prevent tracebacks from PDF read errors
Until now, an invalid PDF file would generate a traceback
during the export, which is not very user friendly.

The export happens when on the vendor bills list view,
by selecting one or more bill(s) that were generated
by the OCR (via the 'Upload' button),
clicking on 'Print' then 'Original Bills'.

The goal here is simply to catch those errors and display
a slightly more helpful message.

closes odoo/odoo#96935

X-original-commit: 7e7bd50403b6f5e2dabc39caf5fddb57d7052ebc
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-07-28 05:05:04 +02:00
Nshimiyimana Séna 3aee7a8cc8 [FIX] stock: count request sets the wrong user
Steps to reproduce:
- go to Inventory > Operations > Inventory Adjustments
- Select at least one product
- Click on Request a count; A dialog box containing a form should appear
- Select a user other than the current user
- Make sure to check "Set Current Value"
- Click "Confirm"

You should see that the user you selected is not the one assigned for
the count. Instead, the count is assigned to the current user.

This is happening because currently, calling
`action_set_inventory_quantity` also sets the user as the current one
if the quantity is not already set.

opw-2924694

closes odoo/odoo#96914

X-original-commit: f2b79bc4c6198aacca33eea8905fd62c629706a1
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-07-28 05:04:57 +02:00
momegahed 270a78b89f [REV] point_of_sale: res.partner doesn't belong to a specific company
This reverts commit 3aa03eb65d431cb9749a2b31a9a09d6b41cd34a4.

based on:

https://github.com/odoo/odoo/pull/94153#issuecomment-1194580295

closes odoo/odoo#96909

X-original-commit: a1eb4049a40a6ff198c8222083715b474b094f82
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-28 05:04:54 +02:00
tsm-odoo 4b1b981a93 [IMP] mail: remove create composer suggestion view
task-2871066

closes odoo/odoo#96899

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 05:04:48 +02:00
Vincent Schippefilt ac10137220 [FIX] hr_appraisal: cache miss as demo user
Since eb67feb5 we had to redo the hack to read fields from public user and set them in hr_employee.
However in this hack we used `_read`, which doesn't fill the cache with fields that are not stored,
which caused a cache miss when reading the field `avatar_128` from hr.employee, to display the image of
the manager in the kanban view of hr_appraisal.

This fix uses `read` instead.

closes odoo/odoo#96889

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-07-28 05:04:42 +02:00
Jorge Pinna Puissant 84a96c1838 [FIX] web: default class for buttons in a button_box
Before this commit, the buttons without classes in a button_box were
assigned the default btn-secondary.

Now, the default class for the buttons without classes in a button_box
is the class oe_stat_button

closes odoo/odoo#96881

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 05:04:39 +02:00
Samuel Degueldre c5e63850dd [FIX] web: fix tooltip rendering crashing because of lack of env
With the merge of the new views, we introduced an owl directive which is
t-call-context, that allows a t-call to execute in a controlled context
that is not the context of the component itself. In doing so, we forgot
that some existing templates rely on the presence of the env in the
rendering context for things like knowing if we are in debug mode or if
the device is small/mobile.

This commit fixes that by simply adding the env to the rendering context
of tooltuips.

closes odoo/odoo#96875

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 05:04:35 +02:00
Thanh Dodeur 2cbad9a3f7 [REF] mail: separate the tile model based on the parent view
Before this commit, the `callParticipantCard` model was used separately
for both the main session and the multi-tile views
(`CallSidebarView`/`CallMainView`), this commit makes so that each
multi-tile view has its own list of tiles.

part of task-2692836

closes odoo/odoo#96868

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 05:04:29 +02:00
PNO 33ed562cab [FIX] mrp: Wrong replenishment order notification
On the commit 69dcdd4, the order='create_date desc'
 was removed and the way of getting the MO for the notification changed. Now, the context is used, it should be written_after instead of written_date.
(The MO created is correct, only the notification is wrong)

OPW-2877457

closes odoo/odoo#96856

X-original-commit: b80287b265a4c01babedcbb58459c35d36a48066
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-07-28 05:04:26 +02:00
Sébastien Theys 13245211a1 [IMP] mail: move mark_all_as_read into message_fetch
This removes an extra request, targets fetched messages more reliably and
simplifies the code.

task-2847909

closes odoo/odoo#96840

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-28 03:51:33 +02:00
luvi f62acbe3c1 [FIX] web: StateSelectionField style
Previously, unnecessary space was present horizontally
around the status circle. This space has been adapted
to improve the style of the widget in views.

closes odoo/odoo#96831

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-28 03:51:29 +02:00
vishal padhiyar b68890dc5f [FIX] web_editor: add p in each td
Before this commit:

When we put the text direct in td  and try to color it with design toolbar with
text color then text in normal should change the color.

After this commit:

When we enter the text direct and try to change the color  with design toolbar
then it will change the text with defined color.

Task-2843065

closes odoo/odoo#96830

X-original-commit: 76fd633ab78d5cb47c990063040d6d1e9708df2d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-28 03:51:26 +02:00
luvi b77cd5ee20 [FIX] web: ImageUrlField without value
This commit fixes an issue with the ImageUrlField
widget. When no value was given, the image displayed
a broken file instead of being empty. A test
has been added.

closes odoo/odoo#96820

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-28 03:51:17 +02:00
Aaron Bohy 5134eac428 [FIX] web: do not display control panel in form views in dialogs
Form views in dialogs should not display a control panel. Before
this commit, they did. To fix the issue, we reworked a bit how we
pass to the Layout component its "display" information (e.g.
whether it should display a control panel, and which parts of it).
Before this commit, it retrieved this info from the searchModel, in
the env. This doesn't allow a specific view to override it, for
instance the form view when it's in a dialog. To ease this, we
changed the Layout component s.t. it now takes a "display" props,
and no longer looks in the searchModel. Each view thus needs to
pass this as props.

closes odoo/odoo#96818

Related: odoo/enterprise#29857
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 03:51:11 +02:00
Samuel Degueldre b2ec55cc32 [FIX] web: fix form view crash when notebook has name attribute
Previously, when the name attribute was set on a notebook in a form view
arch, we would pass that as a prop to the Notebook component, but this
prop is not supported by the component, so it would crash in debug mode
when validating the props. This commit fixes that by simply not copying
this attribute to a prop as it is useless.

closes odoo/odoo#96814

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 03:51:08 +02:00
Benoit Socias 11572f0f20 [FIX] web_editor, *: prevent dropping unsafe snippets in model fields
*: website, website_mass_mailing, website_payment

When an unsafe snippet is dropped into a sanitized HTML model field, its
unsafe content gets removed on save.
We need a way to mark snippets as being (in)compatible with
sanitization. It cannot be automatic, as, for example, the snippet
introduced at [1] contains an iframe but is compatible with
sanitization.
In 13.0, we will temporarily set up an automatic mechanism that marks
existing snippets containing forms as being incompatible with
sanitization.
In 14.0 a distinction between full sanitization and form-tolerant
sanitization introduced at [2] is added with this forward-ported commit.

This commit prevents unsafe snippets from being dropped into sanitized
HTML model fields.
The "Form Builder", "Product Search" and "Product Search Input" blocks
are now prevented from being dropped or moved into form-sanitized HTML
fields.

To do this, this commit introduces a new `t-forbid-sanitize` attribute
on the `t-snippet` tag. It can have the value `true` to prevent it from
being dropped into any sanitize fields, or `form` to specifically limit
to form-sanitized fields.

Steps to reproduce (in 13.0):
- Go to a product page
- Drop a "Product Search" snippet into the product-specific section of
the
product
- Save
=> The form was removed.

[1]: https://github.com/odoo/odoo/commit/c2e9bd0e60014b6a42931cf300e0f89f8cf7c225
[2]: https://github.com/odoo/odoo/commit/388c222c6c4bb7e2fe3e67009b248359ae0fd3db

task-2829961

closes odoo/odoo#96812

X-original-commit: 9eaba23781766730b06e936dbd9c5d0c28c909c6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-28 03:51:04 +02:00
mafo-odoo 73481b6c86 [FIX] sale(_*): wrong translation for SOL variant description
_* sale_management,sale_stock

Steps to reproduce:
- Install eCommerce
- Enable at least one more language
- Get an attribute with translations done (creation mode : never)
- Get a product with this attribute
- Go to the shop and add the product to the cart
- Go to the summary page and change the language
- Attributes fields aren't translated

Explanation:
This commit reverts the fix commit 47777ce1a7ee189c9328f53143abe492e861779e
that set the language of this description variants in function
of the order partner lang. We move where the language is added
in the context so that other cases like website_sale still have
the right translations.

opw-2790240

closes odoo/odoo#96811

X-original-commit: 9d3ffc9a1d817313764bc4b94f75711fd753fbc3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-07-28 03:50:57 +02:00
Nasreddin Boulif (bon) 1ebba3ea27 [FIX] website: fix test_01_get_current_website_id
Cause:

  The test fails because there is some demo data that added additional
  website(s) and when trying to retrieve the current website without
  domain, it might retrieve the wrong one.

Solution:

    Unlink unused website(s).

opw-2899680

closes odoo/odoo#96810

X-original-commit: 45dfbae7301effe0d96163d67218a7854c3bde6f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-28 03:50:53 +02:00
luvi 37d7247df5 [REF] web: changes to the Notebook API
This commit fixes the API of the Notebook component
that mixed props of page templates with its attributes
(isVisible, title and index). Mixing page props and
attributes was confusing. Tests have been adapted
to reflect those changes.

closes odoo/odoo#96807

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-07-28 03:50:50 +02:00
Romain Derie 80fa805867 [IMP] web_editor: add "hide controls" option to vimeo video
Only youtube and dailymotion were able to add this property to their
video. Maybe it was not supported by vimeo back then, but it seems to be
supported now.

It improves the vimeo youtube in two ways:
1. For background video, the controls are now hidden. There were visible
   for a few seconds before this PR which is not ideal
2. For non background video, there were no way to hide the controls
   which might be problematic to some users as in mobile there is the
   controls display but also an ugly "Tap to unmute" in the middle of
   the video.

Step to reproduce (background video):
- Drag & drop a "Text - Image" snippet and add it the biggest possible
  padding, also add padding to the image (so you see the full video and
  not just part of it)
- Double click on the image, then on the video tab insert a vimeo url
- Save, you will see the controls for a few seconds (progress bar, video
  title, link to vimeo, etc)

Step to reproduce (non background video):
- Drag & drop a "Text - Image" snippet and double click on the image
- On the video tab, insert a vimeo url
- Select "Auto Play"
- Save and go to mobile, you will see the controls and an ugly "Tap to
  mute" in the middle of the video.

The "Tap to mute" is a browser feature, not a vimeo feature. Browsers
are muting video by default when auto play.

Still, some people want to have a nice auto play video shown to users
without sounds and don't want that overlay/controls.

opw-2901256

closes odoo/odoo#96804

X-original-commit: 7128e4080511b5f224da3dce6d88ba8bcf9a0d47
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-28 03:50:47 +02:00
Jinjiu Liu 25930728bd [FIX] stock: display the customer address instead of the delivery address
Reproduction:
1. Install Inventory and Sales, enable customer address in the setting
of Sale
2. Create a quotation, choose a customer which has different contact
address and delivery address, add a storable product.
3. Confirm the order and click the delivery in the status bar
4. Click print->delivery slip, the Customer Address and Delivery Address
are the same

Reason: The Customer Address isn’t correct in the template

Fix: replace the partner setting in the customer address part as either
the partner or its parent partner_id, e.g. the commercial_partner_id

opw-2851158

closes odoo/odoo#96800

X-original-commit: 500687e45e83a8bf7c4ab31e659c7eb9dc83aa4c
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2022-07-28 02:40:26 +02:00