38 Commits
Author SHA1 Message Date
visp-odoo c028578a6a [FIX] website, website_hr_recruitment: action should not be undefined
Step to reproduce:
- Go to /jobs (install website_hr_recruitment)
- Go on a job offer
- Click on the "Apply" button
- Edit the form

Purpose:

Since the implementation of commit [1], our system employs alerts
resembling `this field 'partner_name' is mandatory for the action
'actionName'`. However, this alteration has led to a bug where in
certain forms exhibit an undefined action name value, particularly
evident when users attempt to modify specific forms containing required
fields. The bug manifests when an alert is triggered, and the action
name becomes undefined due to the condition `this.modelCantChange`
evaluating to `true` within the `willStart` function. Consequently,
invoking `_super` results in the return of `willStart` without assigning
a value to `currentActionName`.

After this commit:

Now, before returning the function, it sets a value for
`currentActionName` and then proceeds with the necessary steps. This
prevents the issue where an action was `undefined`.

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

task-3680483

closes odoo/odoo#162468

X-original-commit: 3626e36a9c4995286be48206b0d927f1de51e295
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2024-04-23 15:32:52 +00:00
visp-odoo 591658ea67 [FIX] web_editor: show toaster notification error on uploading folder
Steps to reproduce:

OS: Ubuntu 20.04.4 LTS with nautilus
Browser: Google Chrome Version 123.0.6312.58

- type /file command in knowledge
- select a folder and click on open
- traceback occurs

Before this commit:

When a user attempts to upload a folder using /file command, the
processing begins, but the folder is not actually uploaded because the
`getDataURLFromFile` return promise which is not fulfiled. Additionally,
there is no indication of any warnings or errors during the folder
upload process.

After this commit:

If a user attempts to upload a folder instead of a file using the /file
command, it results in a error message in toaster notification.

task-3690847

closes odoo/odoo#159755

X-original-commit: 0b27ac02e499bf15d9f011beda17ab202c1f7a42
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
2024-03-29 12:38:06 +00:00
visp-odoo fb3ce4fc9e [FIX] web_editor: table should not preserve its height and width
Before this commit:

When you increase the height or width of cells in a table and subsequently
delete a row or column, the adjacent rows or columns experience an increase in
their height or width. This happens because the table preserves its overall
dimensions even after resizing individual cells.

After this commit:

Now, the table no longer preserves its height or width. When resizing the table,
the height or width of its rows or columns does not increase.

task-3636212

closes odoo/odoo#158256

X-original-commit: 9940bf3e153714022785b50cb423e52634c99202
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2024-03-22 11:20:08 +00:00
visp-odoo 078bf75f1d [FIX] mass_mailing: should not apply default text color to span
Before this commit:

When we apply a text color and change its font size, the text color defaults to
black. This occurs because the default black color is applied to a span within
`o_basic_theme.o_layout`.

After this commit:

Now, when applying text color and adjusting its font size, the color of the text
remains unchanged.

task-3770351

closes odoo/odoo#156602

X-original-commit: 6c305ee13ad56ce99e3146a162d28094554b92d7
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-12 11:55:39 +00:00
visp-odoo 974903c3d0 [IMP] web: convert condition into function
With this commit, overriding the `onWindowClick` function from `dropdown.js`
becomes much simpler. Previously, it necessitated overriding the entire function,
but now it can be done with minimal effort by just overriding this specific part.

task-3717014

closes odoo/odoo#155326

X-original-commit: edf3c7f5c566f530bed2f243a6f78fcf7d1196d2
Related: odoo/enterprise#57471
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2024-02-27 14:41:47 +00:00
visp-odoo 1c7528887a [FIX] mass_mailing: white bg on coupen code
Before this commit:

- When coupen code template is selected and we drag text block then
  text will not be visible because of bg color as the background color
  and text color are same.

After this commit:

- Now in coupen code  we can see text in text block.

task-3514347

closes odoo/odoo#154137

X-original-commit: 6cf35c7e192eacdffcec08b176325504e51b2aa2
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-02-16 08:58:20 +00:00
visp-odoo 91fe7a664a [FIX] web_editor: convert p into span in li
Before this commit:

if you have <p> within <li>,sometimes removing the <p> will result in the loss
of all classes.

After this commit:

Replace p inside li with span while preserving classes.

task-3546209

opw-3602047

closes odoo/odoo#152104

X-original-commit: e396a1097463d014a1aba553022451365b31f5f3
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-02-01 09:49:56 +00:00
visp-odoo afb95a62a8 [FIX] web_editor: correct invalid link notification
Before this commit:

Clicking on invalid link results in a blank and bizarre notification because
we are accessing wrong parameter in wysiwyg.js.

After this commit:

After correcting parameters clicking on an invalid link triggers a notification
displaying an invalid URL message.

task-3563345

closes odoo/odoo#139301

Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-01-26 10:34:59 +00:00
visp-odoo 0818a8497f [FIX] web_editor: sometimes bullet list is not working properly
Before this commit:

Sometimes applying bulletlist does not produce the expected bullet list
formatting .This issue arises when the selection is on an emptyTextNode(""), and
the traversal of nodes using getTraverseNodes results in the same
emptyTextNode(""). In the toggleList function, we typically remove the
emptyTextNode(""), leaving no appropriate node for creating a bullet list.

After this commit:

Now it will create bullet list because we move the selection to its parent when
it is on an emptyTextNode(""), similar to what we have done with the "BR" element.

task-3547574

closes odoo/odoo#150854

X-original-commit: d5380742b05c64ced7eee92fcf520f208e33819e
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-01-24 14:02:19 +00:00
visp-odoo 47ce4a3623 [FIX] web_editor: wrong time in history of changes
Before this commit:

When a user edits an article and selects the restore button to revert to a
previous version, the displayed time is incorrect because it shows universal
time instead of the user's timezone.

After this commit:

When a user edits an article and utilizes the restore button to revert to a
previous version, the timestamp will now reflect the time in the user's current
timezone.

task-3641579

closes odoo/odoo#149177

Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-01-23 19:49:34 +00:00
visp-odoo 2bb2349e49 [FIX] web_editor: can't get out of inline code block
Before this commit:

If we entered text within a inline-code block and pressed the backspace key,the
zero-width space (zws) at the end of the inline-code block would be deleted.
Consequently, there was no way to exit the inline-code block.

After this commit:

Users can now navigate out of the inline-code block by using the right or left
arrow keys when inside an inline-code block.

task-3613340

closes odoo/odoo#150453

X-original-commit: 31c73e9dd53fa0f7379d87e9c9970b2788e454cd
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2024-01-23 09:47:22 +00:00
visp-odoo 68d3db616c [FIX] web_editor: unable to delete table row in firefox
Before this commit:

Attempting to delete a selected table row does not result in the removal of the
row in Firefox.

After this commit:

Now deleting a selected table row results in removal of the row in FIrefox.

task-3610789

closes odoo/odoo#150167

X-original-commit: 5dd99a02fc3cce99969e696b5cf428afaa27ba78
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2024-01-22 07:57:06 +00:00
visp-odoo ff8ee482b8 [FIX] web_editor: tab outside link hides linkpopover
Before this commit:

Tab on link moves link table but the link popover stucks.

After this commit:

Tab outsided the link hides the linkpopover.

task-3389015

closes odoo/odoo#145297

X-original-commit: e9ada60cb1f6986a578e17ddce1f5ae6a6fe95dc
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-12-07 08:30:19 +00:00
visp-odoo dd5f01d5d2 [FIX] web_editor: table colored borders scrolling with viewport
Before this commit:

The table menu is appended directly to the body, causing issues when scrolling.
This results in the table menu toggler scrolling through the navbar, and the
position of the table menu toggler does not update on during scrolling.

After this commit:

The table UI and the editor are siblings, it eliminate's any z-index
issues. Additionally, the position of the table menu toggler is updated during
scroll.

task-3429097

closes odoo/odoo#144863

X-original-commit: f88d190a0de6328cd8dc8872be07c51f76935c3a
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-12-05 21:15:19 +00:00
vishal padhiyar 4dc2e99772 [FIX] web_editor: tableUiMenu border stuck after deleting table
Before this commit:

When tableUiMenu is visible and we try to delete the table then tableUiMenu
stuck after table deletion.

After this commit:

Now after table deletion tableUiMenu also hide.

task-3429097

X-original-commit: 951dc35e17dfa9fbbb8906afbec82216c63e7d11
Part-of: odoo/odoo#144863
2023-12-05 21:15:19 +00:00
vishal padhiyar 52a0a0899e [FIX] web_editor: selection collapse on enter
Before this commit:

Pressing Enter after selecting text does not remove the selected text.

After this commit:

Now pressing enter after selecting text removes text.

task-3541359

closes odoo/odoo#144433

X-original-commit: bbd8b56ab1e91985b879c52af2a13517bf305127
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-12-01 14:23:41 +00:00
visp-odoo 717300723d [FIX] web_editor: traceback on copy paste table in firefox
Before this commit:

Copy pasting table in firefox gives us traceback because the firefox does not
support :has() selector.

After this commit:

Now it will not give any traceback.

task-3591148

closes odoo/odoo#144256

X-original-commit: 224c42e4dedbb18b7f023756d652bb935d5d9829
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-11-30 19:55:01 +00:00
vishal padhiyar 898bbeff96 [FIX] web_editor: contenteditablefalse should not switch to nearest
Before this commit:

When we try to click on element contenteditable=false then it is switch to
nearest editable area.

After this commit:

When we try to click on element contenteditable=false then it will not switch to
nearest editable area.

Task-2977246

closes odoo/odoo#139961

X-original-commit: 3b8e4bc123dd87857d6634b55ddaaa716a0729ce
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-11-03 07:34:53 +00:00
vishal padhiyar 0987ee5b5e [FIX] web_editor: sanitize html pasted in codeview
Before this commit:

When we paste html using selectAll and we click code view button then the newly
added template will be visible and immediately got removed by old template. This
problem is because of pasted html is not sanitized.

After this commit:

Now when we paste html using selectAll then we actually see new html template in
result.

task-3473633

closes odoo/odoo#139384

X-original-commit: 6d6e1527ccdf5e616330905bc4b7e4fdd80c6192
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-25 17:03:16 +00:00
visp-odoo 45f70979a8 [FIX] mass_mailing: issue when pasting html in email marketing
Before this commit:

When you try to copy paste html in code view of email marketing then in preview
it will show the code instead of template.

After this commit:

Now when you try to paste html in code view of email marketing then it will show
template preview as a result.

task-3473633

X-original-commit: 5cd1a900d89c34877be2c1036ad52d8b4a70c849
Part-of: odoo/odoo#139384
2023-10-25 17:03:16 +00:00
vishal padhiyar 3c89439a16 [FIX] web_editor: calling openMediaDialog on replace media
Before this commit:

In mass mailing, Selecting image and click on replace media you get picture
middle of the screen.

After this commit:

Now, clicking on replace would open media dialog and replace picture.

task-3506590

closes odoo/odoo#137920

X-original-commit: 7e0b8af005e818c9283b332fb140aeaeaf028275
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-09 10:48:49 +00:00
vishal padhiyar 45db6775eb [FIX] web_editor: remove unwanted styles and tags
Before this commit:

When pasting text from outside odoo, it often includes additional tags
such as <b> and <P>, along with unwanted styles.

After this commit:

When pasting text from outside odoo, those extra tags and styles are now
removed.

task-3378093

closes odoo/odoo#137236

X-original-commit: 5485824654179981cc7562e643123a6decbb02a2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-04 07:11:55 +00:00
vishal padhiyar edafb60248 [FIX] mass_mailing: remove unwanted classes from mass_mailing templates
Before this commit:

There are some extra classes used in the mass_mailing_theme_template.Those
classes are not supported by mail clients.

After this commit:

Those extra classes has been removed.

task-3347902

closes odoo/odoo#130178

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-02 08:03:40 +00:00
vishal padhiyar f4f0a82b84 [FIX] web_{editor}: add missing args in position callback
Before this commit:

When attempting to open a dynamic placeholder in email marketing, a traceback
occurs.

After this commit:

Now the dynamic placeholder works properly.

Task-3373356

closes odoo/odoo#129415

X-original-commit: bb9fb402a135baf7e7b9da9bbb40888f5323ded9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-25 08:19:01 +02:00
vishal padhiyar c1d42a42a1 [FIX] web_editor: link with / not recognized
Before this commit:

When user try to create link with / it is not recognized as a link.

After this commit:

Now when user try to create link with  /  it is recognized as a link.

Task-3347775

closes odoo/odoo#127842

X-original-commit: e99ccfa1ed7aa338f99c4142d109b2860cc9be4a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-15 04:01:06 +02:00
vishal padhiyar 105dd6e4dd [FIX] web_editor: page crash on colour selection
Before this commit:

When we select text and take the selection to the hex input box and then try
again to add a solid color, it gives us a traceback.

After this commit:

Now it did not give traceback.

Task-2965091

closes odoo/odoo#116539

X-original-commit: 981713bd024a98f5d9099bfec8458224dac32a32
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-24 19:21:43 +01:00
vishal padhiyar 78b7e9cca9 [FIX] web_editor: image cropping gives traceback
Before this commit:

The traceback appears after cropping an image and then trying to crop it again.

After this commit:

Cropping an image and then cropping it again won't give us tracebacks anymore.

Task-3134764

closes odoo/odoo#116262

X-original-commit: 83cf218b131c47b711327a224b0a0fd81406e8c3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-23 10:05:50 +01:00
vishal padhiyar 0f609527df [FIX] web_editor: missing placeholder after saving record
Before this commit:

Creating a new record and saving it afterwards does not show the placeholder in
the description.

After this commit:

You will see placeholders when you create a record and save it.

Task-3167136

X-original-commit: 793e48ae0478ead38ed6ac7c9a71228e2678e2c7
Part-of: odoo/odoo#113811
2023-02-28 08:14:45 +01:00
vishal padhiyar a3d20bd96d [FIX] web_editor: inconsistent behaviour of the font size selection
Before this commit:

Selecting some text and changing its size will never allow you to select 13 and
selecting default will make the text bigger than the surrounding text.
Example in project: the default size is 13px (the editor parses that info and
display 13px as the font-size), but if you want to set any text to that value
you can't. Users could set any text to that value by selecting
"default" font-size instead of 13

After this commit:

"default" sets to "font-size: medium", which is often not correct. It should
instead, do a "font-size: inherit" so that it's the default for the current
context. Hence, removed that medium font-size rule and let the cascade do it.

Task-3095887

closes odoo/odoo#109835

X-original-commit: 9878579f62b493958bb6a98e2cdc466bfc2954d8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-13 17:33:17 +01:00
vishal padhiyar b589c95ed9 [FIX] web_editor: mailto in footer not working
Before this commit:

While creating a website: in the footer, when trying to edit the link mailto:
there is an "https://" added and preventing the link to work successfully.

After this commit:

- Whenever we try to edit mailto link and save it then in _parse(node) function
  it will set link label as new URL.

- For that we add condition by which it will avoid further operations and Now
  when we try to edit link mailto then there is no "https://" added and link
  works successfully.

Task-2977682

closes odoo/odoo#108639

X-original-commit: 680a204b952e6281d7e1bcdfe0730688ee698a9d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-02 09:54:09 +01:00
vishal padhiyar e9f99dff16 [IMP] web_editor: improve link popover
PURPOSE

Simply improve the design of the link popover

SPECIFICATION

- "ellipsis" the link preview instead of wrapping it
- only keep a 0.5rem gap between each of the right icons

Task-2916270

closes odoo/odoo#108497

X-original-commit: bb1f37226dcd842abf4ec63ecf037f5ce3a3441b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-22 10:39:35 +01:00
vishal padhiyar 1488a35c61 [FIX] web_editor: impossible to add signature at some times
Before this commit:

When we try to add signature from powerbox then sometimes it does not show
the signature.

After this commit:

Now when we try to add signature from powerbox then it will show the signature.

Task-2939080

closes odoo/odoo#106490

X-original-commit: 7d5f61abf8076ff77543844f6355907118e3729d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-25 10:52:10 +01:00
vishal padhiyar ff366852fe [FIX] web_editor: remove copy paste unwanted newline
Before this commit:

- When you try to paste text beside a text which is in code formate it
  puts the new text in new line with smaller font.

- When we try to paste text in code formate in new line then it will
  give a blank space below the pasted text

After this commit:

- when you try to paste text beside a text which is in code formate it
  puts the pasted text in new line with original fontsize.

- When we paste the text in code formate in new line then it will not give
  a empty line below it,

Task-2683455

closes odoo/odoo#106488

X-original-commit: bf7835e80ffa70236dca4b4b8fb4edb45d42f46a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-25 10:52:07 +01:00
vishal padhiyar 12f2cd2d34 [FIX] web_editor: stuck after manual link creation
Before this commit:

When we try to create link manually and try to press enter cursor gets stuck.

After this commit:

Now when we create link manually and press enter cursor moves to next line.

Task-2745129

closes odoo/odoo#105968

X-original-commit: 4d14fa559b2ffcb768fa0a0a42b9b9eb2703a050
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-24 17:23:40 +01:00
vishal padhiyar e87a3b8d4f [FIX] web_editor: copy paste link keeps the old url
Before this commit:

When we try to copy paste link into another link then url of the old link does
not change and only lable change.

After this commit:

Now when we try to copy paste link into another link then the url of the link
changes with the label.

Task-2768541

closes odoo/odoo#105966

X-original-commit: ea1e410f4174d235609181bdba692a98e7381396
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-18 12:58:00 +01:00
vishal padhiyar e774cac767 [FIX] web_editor: fix attributes missing from cleanForSave
Before this commit:

When we try to add html data in translated email templates then it does not
remove those extra classes from the html code.

After this commit:

Now those extra classes will remove from the html code.

Task-2985072

closes odoo/odoo#104859

X-original-commit: 5e192a3ccd93c3aafda26abdcfae50ab8f0e053e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-03 19:40:55 +01:00
Vishal Padhiyar 812644b120 [IMP] *.*: update the tooltips in various modules
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.

task-2862283

closes odoo/odoo#93261

Related: odoo/enterprise#28225
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-20 16:29:13 +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