Commit Graph
152865 Commits
Author SHA1 Message Date
Lucas Perais 00fff80858 [FIX] web: one2many in kanban can remove a new record
Have a one2many in a form view. It displays its records with a kanban.
Add a record, now click on that new record.

Before this commit, there was not "Remove" button, preventing to effectively
remove a new (virtual at this point) record from the one2many.

Aftet this commit, there is a remove button that effectively removes the
record from the one2many.

closes odoo/odoo#97775

Signed-off-by: FrancoisGe <fge@odoo.com>
2022-08-10 14:43:45 +02:00
tsm-odoo d5234c314e [IMP] bus, calendar: remove longpolling polls in tests
In order to prepare the ground/reduce the noise in the PR
introducing the websockets in Odoo, the mocks of the longpolling
route in tests is replaced by calls to sendone/sendmany.
This will allow to keep the same code while changing the underlying
technology.

task-2053917

closes odoo/odoo#97771

Related: odoo/enterprise#30244
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-10 14:43:41 +02:00
tsm-odoo 75007b578e [MOV] bus, *: move startServer test helper to the bus module
*: calendar, hr, hr_holidays, im_livechat, note, rating, snailmail,
test_mail, test_mail_full, website_livechat, website_slides.

Part-of: odoo/odoo#97771
2022-08-10 14:43:41 +02:00
Rémy Voet (ryv) bfc2e76af2 [IMP] base: add index on key of ir_ui_view
The `key` field is often (`_get_view_id`/`_get_specific_views`) used to
find an ir_ui_view. Because `key` doesn't have index, PostgreSQL will
always do a SeqScan. Because the table is small, it doesn't create a
huge performance bottleneck, but it still not very efficient.

closes odoo/odoo#97478

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-08-10 14:43:26 +02:00
Brieuc-brd 6cc7f6bf09 [IMP] gamification: fine tune layout
This commit improves the layout to keep consistency.

task-2938963

closes odoo/odoo#97192

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-10 14:43:23 +02:00
Brieuc-brd c86d2fe419 [REF] gamification: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2938963

Part-of: odoo/odoo#97192
2022-08-10 14:43:22 +02:00
Morgane (morm) eb71a1baa1 [IMP] purchase: scss revamp
Prior to this commit, the dashboard was a table and there was
unnecessary scss.
This commit changes the table into the new bs5 grids
and clean the scss files.
In the portal view, a class(orders_label_text_align) that didn't affect
the design was removed.

task-2906527

closes odoo/odoo#95902

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-10 14:43:12 +02:00
Morgane (morm) 6f68fe2e02 [IMP] web: enable Bootstrap 5.1 CSS Grid classes
Part-of: odoo/odoo#95902
2022-08-10 14:43:12 +02:00
Rémy Voet (ryv) 63b2790eac [IMP] core: improve compilation result of qweb
`content = self._compile_to_str(content)` is done twice in the compiled
method of qweb. Remove it once.

closes odoo/odoo#95755

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-08-10 14:43:07 +02:00
Rémy Voet (ryv) ef35a33300 [FIX] web: never cache the CSRF token
"website.layout" inherit of "portal.frontend_layout" which inherit of
"web.layout" which contains the creation of the CSRF token.
Add because "website.layout" add a t-cache key, the CSRF token is under
this cache key. But the CSRF token should be always generated,
then add t-nocache on CSRF token t-set.

Part-of: odoo/odoo#95755
2022-08-10 14:43:07 +02:00
Jeremy Kersten 75e1d93344 [IMP] google_calendar: rename google_cal[endar]_account_id
Rename from google_cal_account_id to google_calendar_account_id, to have
the complete 'service' name into the field and allow to use it from a
generic way in oauth2callback from google_account e.g.

task-2497212
pr-95744

closes odoo/odoo#95744

Related: odoo/upgrade#3673
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-08-10 14:43:02 +02:00
Jeremy Kersten 05b409f8f1 [REF] google_account, google_calendar: clean and make it overridable
This commit removes outdated method no more used since we delete oog
apps like gdrive.
This commit remove the logging of sensitive infos.
This commit allows to override easily api key.

task-2497212
pr-95744

Part-of: odoo/odoo#95744
2022-08-10 14:43:01 +02:00
Nguyen Hong Quang 034b72fe79 [FIX] base_setup: replace id for module_microsoft_calendar in
configuration

Currently, Outlook and Google calendar having same container `id`.
This PR will fix that problem

closes odoo/odoo#97858

X-original-commit: 757cf027afb5eaa1ac831b8dda6664edd45c6a69
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-10 13:23:56 +02:00
Ahmad Khanalizadeh ea4ee4e7ef [IMP] point_of_sale: better error message for identify customer failure
Before this commit if Identify Customer option was enabled for a
payment method in point of sale but no customer was set for an order,
we get a SQL constraint error that has no hints on where the problem
comes from.

This process can be improved by a better error message that directly
points out the problem.

opw-2907152

closes odoo/odoo#97566

X-original-commit: 06c8765d362f81aa92f25029cb5d4e9d4069b3d3
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-08-10 13:23:53 +02:00
Dardenne Florent (dafl) 22133a01be [IMP] web: add cumulative line chart
The cumulative option on line chart is useful for displaying
cumulative information graphically.

closes odoo/odoo#97394

Task-id: 2146487
Signed-off-by: FrancoisGe <fge@odoo.com>
2022-08-10 12:07:19 +02:00
Dardenne Florent (dafl) cef8cf87b4 [REF] web: eslint syntax applied on views/graph
Part-of: odoo/odoo#97394
2022-08-10 12:07:19 +02:00
Samuel Degueldre 8676fed6a7 [FIX] survey: fix broken questions in form view
With the conversion to the new views, legacy x2many fields go through a
thin and incomplete compatibility layer to talk to the new model. This
compatibility layer is not very robust and as such most custom x2many
fields are broken in this configuration, in this case the field
"question_page_one2many".

The proper fix is to convert this field widget, but in the mean time,
the simple fix is to force this view to keep using the legacy view
instead of the new view.

closes odoo/odoo#97868

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-08-10 09:21:28 +02:00
Jinjiu Liu 371ccb5ddb [FIX] website_slides: add style to the side bar container
Reproduction:
1. Install Website and eLearning
2. Add new language Dutch
3. Modify the course responsible’s name as “Gertjan Kleinbloesem” in
eLearning
4. Open the course page in the website app and switch to Dutch, the
responsible name is over flowed

Reason: The background container doesn’t adapt to the length of the text

Fix: Add text break to the responsible's name so it won't break the
style

opw-2862250

closes odoo/odoo#97839

X-original-commit: bb2045f77ee7383af85b2d65c015d91f92b20647
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2022-08-10 09:21:25 +02:00
Benoit Socias 19e4f1a856 [REV] web_editor: not add a zero-width space on top of color palettes
Since [1] a zero-width space is added inside all `we-selection-items`.
This breaks the layout of color palettes because zero-width spaces
still have a height, and are not considered as empty text.

This reverts commit e59ad49cb9f32240d8ca3c89fc20ab200e291adc.

based on:

https://github.com/odoo/odoo/pull/97382#issuecomment-1208015098

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

task-2919573

closes odoo/odoo#97829

X-original-commit: 2091bce403368003add4b01eaafaea051c758e27
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-10 09:21:19 +02:00
Antoine Guenet 696f4dc753 [IMP] web_editor: prevent crash with wrongly defined commands
The Powerbox crashed whenever a command was wrongly defined. That's a
bit too brutal so this sets defaults instead.

closes odoo/odoo#97794

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-10 09:21:16 +02:00
Antoine Guenet 9263db52a1 [FIX] web_editor: properly define the signature command
The signature command was using the wrong property names, leading to the
Powerbox crashing.

Part-of: odoo/odoo#97794
2022-08-10 09:21:15 +02:00
Swapnesh e5eb93f36b [CLA] add swapnesh to Mainframe Monkey's contributors
closes odoo/odoo#97856

X-original-commit: 02238b06cf6759d68637dbcc10b0021be9403ffe
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-10 08:09:56 +02:00
Jeremy Kersten 2e170ca07b [FIX] website_sale_autocomplete: fix alignment logo powered
pull-right is not standard Bootstrap 3.

closes odoo/odoo#97851

X-original-commit: 1098377b4e8fff4400c03da405903d9ba246dbd8
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-08-10 04:27:42 +02:00
Martin Trigaux b821961236 [I18N] *: sync fr_BE translation terms
Only for terms containing Credit Note and expenses

closes odoo/odoo#97840

X-original-commit: 1754b094a66476a0bdb29fe60dc5583c03336c3f
Related: odoo/enterprise#30262
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-10 03:11:53 +02:00
Pierre Masereel 10142fc0d8 [FIX] account: display invoice lines
When you print or preview an invoice, the lines with the product are not
displayed. Before changes made in PR: https://github.com/odoo/odoo/pull/96134
the lines containing products didin't have a display_type.

Since those recent changes, their type is product, so we are now
checking that they are of display_type 'prodcuct' instead of having the
display_type to false

closes odoo/odoo#97862

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-08-10 01:59:54 +02:00
Pierre Masereel e149bdcd4b [FIX] account: remove useless attribute start in sum
Using named attribute 'start' in sum function is not compatible with
python 3.7, it is also set as 'start=0' which is useless as it is the
default value of start argument.

Part-of: odoo/odoo#97862
2022-08-10 01:59:53 +02:00
Pierre Masereel 7a4dea6e10 [FIX] account: fix lru_cache call
lru_cach must be called to properly work with python 3.7, so we call it
as it is in other lru_cach decorators.

As explained here in python 3.8 changes: https://docs.python.org/3/whatsnew/3.8.html#functools

Part-of: odoo/odoo#97862
2022-08-10 01:59:53 +02:00
Hubert Van de Walle (huvw) a5752e1e65 [FIX] web: parseMonetary with NBSP as a thousands separator and no currency
Steps to reproduce:

  - Switch language to french
  - Refresh the page
  - Create a new payment
  - Select a partner
  - Enter an amount of 100000,00
  - Save the record
  -> The following field is incorrect: amount

Cause of the issue:

 Since https://github.com/odoo/odoo/pull/97425 ,
 `parseMonetary` wrongly assumed that a currency was always passed in
 the parameters

opw-2937403

closes odoo/odoo#97861

X-original-commit: 9d518f847d2204fc5159a92bc4e4de655acf88fa
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-08-10 01:59:48 +02:00
Lucas Perais be4b211ffe [FIX] web: ask to save new record before translating
Fixup for 4caa9596bc, where a rebase went bad.

Have a translatable field in a form view.
Create a new record with that form view.
Click on the button to open translations for that field.

Before this commit, the record was not before opening the translation dialog, hence
changing the translations could not work properly.

After this commit, this feature is back, and we ask to save a new record before
opening the translation dialog.

closes odoo/odoo#97824

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 22:48:53 +02:00
mafo-odoo 076ef38282 [FIX] website_sale_delivery: no carrier change if there is a valid transaction
Issue:
Customers can use Mollie and lower the price on a quotation through changing the
delivery method, if they have two pages "/shop/payment" and proceed with payment
on one they can still change the carrier on the second. Although the quotation is
not confirmed because of mismatching amount, a confirmation email is still sent
and a bank payment is still created. Please see the following test video.

Solution:
We add a check so that changing a carrier can only be done when a no active/done
transaction is linked to the sale order.

opw-2925673

closes odoo/odoo#97818

X-original-commit: 151edb7d088ec9e5ea10fa8f184c7cb3a030a6ab
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-09 22:48:50 +02:00
Aurélien Warnon bdf06ed3a3 [FIX] website_event_track: avoid showing an empty agenda
Oversight of: 129b91027700313066db0305876adcf9b2a3817d

If the view is not up to date, it will not display any agenda locations.
We need to keep the 'locations' key into the returned values for code
retro-compatibility.

Task-2942630

closes odoo/odoo#97751

X-original-commit: 6c72297e72e0936e5564f175dcb1716057e0ac4b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-08-09 11:32:17 +02:00
Benoit Socias 5ad3451b37 [FIX] website: avoid double-escape of pages search results
Since [1] when the search bar was refactored, a search facility was
added on website pages and the rendering of those search results did
not correctly handle the HTML escaping.

This is related to the fact that the `ir_ui_view`'s `arch_db` field is
stored with this double escaping on text nodes, which is done by
`wysiwyg.js` through the `_getEscapedElement` method since [2].

This commit unescapes the last layer of `&amp;` before extracting the
page's text for generating the search results.

Steps to reproduce:
- Add some "&", "<" or ">" characters in a page.
- Use the search snippet to lookup for the page.
=> The results in both autocomplete and the results pages display the
content with an extra unwanted escaping (&amp;...)

[1]: https://github.com/odoo/odoo/commit/9f9c4bb7e40233e633f97c60fb00ae191e9077af
[2]: https://github.com/odoo/odoo/commit/f5acea7f9ce232773ec3adf1828a3d18bbedee1e

opw-2908645

closes odoo/odoo#97748

X-original-commit: 2b95dcdb0d8b49bac8ee38a8d062112468124012
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-08-09 11:32:14 +02:00
Elisabeth Dickinson 7b370d28f7 [IMP] mass_mailing: amend icons alignment
Since removing the "Styles" option and the CSS that went with it, 
there is an issue with the center alignment on icons. 
Indeed, having a fixed width/height value on `fa.rounded` allowed the 
icon to be centered along with its background. 
By removing the fixed with/height values, the center alignment 
(using `.mx-auto` and `.d-block`) would center the icon but stretch the 
background color to the full width of the parent.

To achieve the same result, the cheat is to set the
default value of the wrapping block to text-center and remove 
`.mx-auto` and `.d-block`.

closes odoo/odoo#95974

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-09 11:32:08 +02:00
Elisabeth Dickinson 907211dce2 [IMP] mass_mailing_themes: replace theme_tech static image with shape
This theme was using a static image which was designed in a triangle
shape but could not be edited with the `Shapes` option.

In order for the user to be able to change the shape of this image,
much like in the previous commit, a square version of the image is used
as an `original-src`, and the triangle version of it is used as `src`
in the theme.

task-2836942

Part-of: odoo/odoo#95974
2022-08-09 11:32:07 +02:00
Elisabeth Dickinson f4995f5600 [IMP] mass_mailing: adapt snippets with rounded images
As mentioned in the previous commit, the circle in the `Styles` option
has been replaced by a shape.
Previously we used `.rounded-circle` on images to make them round,
now we use the new circle shape from the `Shapes` option to achieve
the same effect.
This change has been applied on the snippets' images.
Snippets containing icons with these options have also been modified.

In the builder, the `Shapes` option generates a second image (circle)
from an original source (square image) and applies various
data-attributes.
In order for the option to function correctly on snippets,
the different data-attributes such as `data-original-src` and
`data-shape` have been added manually to the snippet's images.
This creates a need for an original image and a shaped version of the
image in the repo.

task-2836942

Part-of: odoo/odoo#95974
2022-08-09 11:32:07 +02:00
Elisabeth Dickinson 24a4c7f897 [IMP] mass_mailing, web_editor: add basic img shapes, remove img Style
The `Styles` option contains styles which are unsupported in
emails. The few that are supported can be replaced by other options.
- Shadows: unsupported;
- Rounded rectangle: (unsupported in Outlook)
is replaced by the `Border` options which allows to customize the
border's radius more than the current option.
- Thumbnail: can be done with a combination of `Border` and `Padding`
- Circle: can be done with a shape
(which has been added along with other new shapes)

This option could be found on images and icons and has now been removed.
CSS styles in the `theme_default` file have also been removed since
they are no longer needed.

Three basic shapes (circle, triangle, "slanted" rectangle) have been
added to the `web_editor`'s `Basics` shapes page.
A condition was previously set on the page to avoid showing an empty
page. The condition is moved to each of its buttons instead, so that
new shapes added via xpath from `mass_mailing` to this page are now
visible.

task-2836942

Part-of: odoo/odoo#95974
2022-08-09 11:32:07 +02:00
Younn Olivier 5504c3f983 [FIX] test_website, web_editor: fix test_image_upload_progress tour
Before this commit, the tour test_image_upload_progress was failing
inconsistently at the step "check that the file was correctly uploaded"
during the upload of a single image.

[1] adapted the upload progress toast to owl, but it used a state
variable isVisible, updated with a useEffect hook called on change of
the file props. This was not optimal: the visibility could be updated
directly through a reactive variable from the upload service. Instead of
automanaging its visibility, the component is completely driven by the
upload service.

This small optimization is useful in regards of the implementation of
the TourService.
As it is implemented now, the TourService works this way:
When it completed a step, it will check for the tooltip of the next
step, in the next javascript call stack.
If it does not find it in the DOM at that time, it will listen to the
mutations and wait for 750ms after the last one to check again.

Here, as the progress toast was rendered visible not directly when
uploading a file, but after another render, after the useEffect was
executed, the progress toast was sometimes not found directly after
playing the step sending the 'change' event. Then, the TourService was
waiting for all the mutations to execute (the progress toast appears,
the media dialog closes itself, the toast hides itself) and check again
after a delay. But by then the toast was already hidden.

With that, the tour steps are rewritten to follow the flow:
- Open the media dialog in single upload mode
- Upload an image
- The toast is shown
- The media dialog is closed
- The toast with "The file has been uploaded" is still there
- The toast autohides

Also, the file input value is reset after uploading files, otherwise it
was not possible to upload the same file twice (the 'change' event was
not triggered).

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

runbot-4117

closes odoo/odoo#95890

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-09 11:31:59 +02:00
Younn Olivier 1a191357e3 [FIX] website: fix backend_dashboard tour
The tour .test_03_backend_dashboard was failing inconsistently with a
"failed to fetch" error (which happens when fetching the frontend
assets, from the iframe).

The test is adapted to start directly in the backend, which seems to
prevent that error from happening.
It is also adapted to [1] which was merged during the investigation of
that error.

[1]: https://github.com/odoo/odoo/commit/985e49bdb5e22fa197ba267aa41d7a8ba7e50550

runbot-4418
runbot-4003

Part-of: odoo/odoo#95890
2022-08-09 11:31:59 +02:00
dbkosky a3bcc3b666 [FIX] l10n_it_edi: duplicate acc_number import
An error occurs when importing the Italian edi xml it the partner bank
account number is defined and the database is configured in such a way
that one partner has multiple res.partner.bank records, with the same
acc_number. This is possible in V14, since the constraint is:
'unique(sanitized_acc_number, company_id)'
meaning that the same bank account on the same partner can occur
multiple times (with different company_ids).
Since the domain of the search performed in the import function didn't
specify the company id or a limit, upon assigning the partner_bank_id
with the values from the search, an expected singleton error occurs.

This has been solved by altering the search domain to include only
partner bank accounts where the company id matches that of the invoice
or where the company id is None (which is technically possible, though
unlikely). A limit of one has been added to the search, and the results
are ordered by company_id, which will result in the res.partner.bank
with a company_id being selected before the one with no id.

This relates to a ticket:

closes odoo/odoo#92881

Task-id: 2854284
X-original-commit: 8cf535a240dea12a5a8b1e0ef3b5b82698379bf1
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-08-09 11:31:54 +02:00
ikapasi 751201f0d6 [CLA] sign the Odoo CLA for Nitrokey
closes odoo/odoo#97755

X-original-commit: 0ab9d3405d7ba09dd43abe4a7c25ace6dc07151d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-09 10:15:59 +02:00
Stefan-Calin Crainiciuc (stcc) 5c0a75a63d [FIX] google_gmail, *: Changed client secret field type to password
*: microsoft_outlook, website_twitter

Steps to reproduce:
- install the google_gmail, microsoft_outlook and website_twitter
modules
- go to Settings > General settings > Discuss > External email servers
- for the twitter module go to Settings > Website > Features > Twitter
roller
- the client secret fields are visible

This commit changes the fields types into 'password'.

opw-2936506

closes odoo/odoo#97722

X-original-commit: 18a792ee21441a2e07cef5997368e6d1a268f46c
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-09 10:15:55 +02:00
Florian(flg) 61cefffadc [FIX] l10n_be: change tab to space
This old file is indented with tabs instead of spaces.
This is a problem because the file is using as template to
write new localization.

closes odoo/odoo#97718

X-original-commit: abedeb1fe4705c8e4d36cf7f9d61c61ca2b924dd
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-08-09 10:15:52 +02:00
FrancoisGe bd6b98a65f [FIX] web: save a record with an invisible required field
Before this commit, it was impossible to correctly save a record
containing an invisible required field in its template.

Problem:
When a record tries to be saved or switched to readonly, it will check
the validity of all its fields and if any of them are invalid, it will
cancel the save or switch to readonly. In our case, we have an invisible
required field. If this field is invalid, it is impossible for the user
to modify it because it is invisible. So he cannot make it valid. So it
is not possible to save this record or to switch it to readonly mode.

Solution:
We no longer check the validity of invisible fields.

How to reproduce:
- Go into a list view with a template containing a field that is
    invisible and required
- Click on Create
- Click on Save after editing the record

Before this commit:
    The record doesn't save itself and doesn't go into readonly mode
After this commit:
    The record is saved and in readonly mode

We have the same problem in the form view.

closes odoo/odoo#97610

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 10:15:48 +02:00
Thibault Delavallée 384434f00d [FIX] calendar_sms: fix bad default value
Fix a typo in a default / field name for SMS composer.

Task-2613245 (Server actions mail update / cleaning

closes odoo/odoo#97757

X-original-commit: 835c68e574ebae5980f57c53dc3c9fd1cd1707c1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-09 09:00:20 +02:00
Arnaud Joset 60c362ae7f [FIX] product: add product_tmpl_id to allow easy view inherit
Before this commit, the product_tmpl_id field was present in the
product_pricelist_view but not the product_pricelist_view_inherit.

This changes allows to have a simple solution to modify the product_tmpl_id attributes
in other modules.

closes odoo/odoo#97721

Taskid: 2886054
X-original-commit: 312107060f1b6d7aaa907792ee18c9ef22a47cd9
Related: odoo/enterprise#30211
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-08-09 09:00:16 +02:00
Lucas Perais 1814888a7f [FIX] mail: text emojis field should remove its dropdown on destroy
Have a field with widget text_emojis.
Click Edit on the form view.
Click Save.

Before this commit, the button that opens the dropdown was still present in the dom in readonly mode.

After this commit, it is correctly removed.

closes odoo/odoo#97704

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 09:00:10 +02:00
Ahmad Khanalizadeh 9f1241b84c [FIX] point_of_sale: use taxed prices in discount comparison
Before this commit, If "Show public price & discount to the customer"
discount display policy is selected, taxed prices in the pricelist with
discounts are compared with untaxed prices in the public pricelist,
which leads to not showing the discounted values when the pricelist
value is less than untaxed list price, but the taxed value is more than
untaxed list price.

Steps to reproduce:

1. Create a product, add it to a pricelist with a lower price in a way
 that if the tax is added the price is more than its sale price, add a
 tax option to the product
2. Set the pricelist discount display policy as `Show public price &
discount to the customer`
3. Set the PoS to use tax-included prices, and to use the discounted
pricelist
4. start the PoS session, add the product, you will see that the
public price isn't shown (with a strike-through)

To fix, we can use a different function that computes the taxed public
price, so it could be compared with the pricelist price.

opw-2919734

closes odoo/odoo#97698

X-original-commit: bbada7911ab59ca20c97fd152112116cab0bf398
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-08-09 09:00:06 +02:00
Jorge Pinna Puissant 34ddcab07f [IMP] web: Tooltip UX on touch-enable devices
Before this commit, in a touch device the behaviour was a
"tap-hold-to-show” which let the user see the Tooltip by pressing the
element, and letting it disappear when the pressure ends.

This commit allows choosing between the previous "tap-hold-to-show"
behaviour and a new "tap-to-show" which let the user see the Tooltip by
pressing the element, and keep it open until it press something else.
This behaviour is more adapted when the tooltip is on a specific icon,
as is the case for the labels, since : f981c5f8f0

closes odoo/odoo#97680

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 09:00:02 +02:00
Lucas Perais 4caa9596bc [FIX] web: ask to save new record before translating
Have a translatable field in a form view.
Create a new record with that form view.
Click on the button to open translations for that field.

Before this commit, the record was not saved before opening the translation dialog, hence
changing the translations could not work properly.

After this commit, this feature is back, and we ask to save a new record before
opening the translation dialog.

closes odoo/odoo#97608

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 08:59:57 +02:00
Lucas Perais 63eb7fc023 [FIX] web: record's images correctly cached by the browser
Before this commit, images' url where just built upon the record's id and model.
Since the browser caches GET requests by url, the same record would always have the same image url.
Hence it appeared that when changing a record's image in form view, and going back
to the kanban, the image displayed was the old one.

A good enough approximation to solve this (and was actually solved in legacy code), is to use
the record's __last_update field, which basically tells the browser to re-fetch
a record's image when then record go through any modification.

After this commit, images are correctly updated in kanban and form views.

closes odoo/odoo#97544

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 08:59:53 +02:00