Before this commit, the background-position was not removed from a
shape when it was re-flipped to its original orientation.
introduced in #61114closesodoo/odoo#63197
X-original-commit: 597585c9b8b1350bcfd84e8433ea6c82060bcc3d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, the theme colors did not update dynamic svg images
due to an inversion between key and value in the code.
closesodoo/odoo#63154
X-original-commit: 9b1916c382f105d30e7d693c0b914c05db593da0
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
What are the steps to reproduce your issue?
1. Install "stock"
2. Go to Inventory/Inventory Overview/Internal Transfer
3. Create new record and set manually a date with year < 1000 like "0008-10-10 18:35:00"
4. Save
What is currently happening?
An error arises when saving the record, and it is then no longer
possible to reopen the records or any view containing it.
This also prevents us from correcting the date to no longer have the error
Why is this happening?
The root cause is an inconsistency in `strftime` for years < 1000 [1, 2]. To take it into
account, a zero-padding is needed in the DateTime parser.
How to fix the bug?
The missing padding is added.
However, such dates lead to problematic behaviors in Python:
```
DT_FORMAT = "%Y-%m-%d %H:%M:%S"
new_date = "0008-02-05 18:10:10"
datetime.strptime(
datetime.strptime(
new_date, DT_FORMAT
).strftime(DT_FORMAT),
DT_FORMAT
)
```
This raises:
```
ValueError: time data '8-02-05 18:10:10' does not match format '%Y-%m-%d %H:%M:%S'
```
As of today there was no reported business cases where dates with year < 1000 would be
necessary. Therefore, we limit the range to years >= 1000.
[1] https://bugs.python.org/issue13305
[2] https://docs.python.org/dev/library/datetime.html#strftime-strptime-behavior
opw-2408260
closesodoo/odoo#62889
X-original-commit: b873bda1e560bc49ab707aa238fdc962f23bc1e4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
The translation editor used to save all the translations at once, which was wrong because it made it look like some text had been translated when it hadn't.
closesodoo/odoo#62699
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The table picker was hard to use because its container scrolls instead of letting it overflow.
closesodoo/odoo#61783
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In the 12.3 editor revert, the handler for the getRecordInfo event was
removed, but the code that triggered this event was forgotten and now
doesn't do anything. This commit removes this dead code.
closesodoo/odoo#49126
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In some situation, the overlay does not reappear after disappearing.
Steps to reproduce:
1. add a title
2. add a few elements between title and footer so you can scroll title out of view
3. click title
4. scroll it out of view
5. click footer
6. scroll back up
7. click title
-> overlay is not reappearing[FIX]
Now overlay should not do that anymore.
closesodoo/odoo#62547
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit the close button cross/multiply character was wrongly
translated in some languages (e.g. Spanish)
After this commit the close button cross/multiply character is not a
translatable text anymore
https://github.com/odoo/odoo/pull/60268
task-2365792
closesodoo/odoo#62400
X-original-commit: 517e272da81e4f5ad958d896a75d4f32b44083e5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Blocks and Rainy / Airy and Zigs merged together
Fix color of Bold 5 and bold 6 shape that are not easy to use due to contrast
with black, now it is grey by default.
task-2357174
closesodoo/odoo#62352
X-original-commit: 978fcbd4f6ba9f618b69560cb5fbe26602828bcb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit Bold shape 10 & 11 had no transparent color
After this commit Bold shape 10 & 11 have a transparent color instead of
their former color #3 (#F6F6F6)
task-2357174
https://github.com/odoo/odoo/pull/59613
X-original-commit: 71b3b2d61b7acad601da38457671a20357298587
Before this commit only the first default palette color was configurable
on illustrations
After this commit all 5 default palette colors are configurable on
illustrations
task-2368585
closesodoo/odoo#60503
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Prior to this fix, replacing a jpeg image with an svg illustration
didn't properly update its mimetype in its dataset. As an effect, the
jpeg image options still appeared, that were irrelevant for an svg.
This was caused by a premature update of the image in Jabberwock's vdom,
before the mimetype was updated, and by the fact that the current image
was not being passed to the constructor of the media dialog, causing it
to create the image from scratch on save instead of replacing the src
attribute of the current image like it did before introducing
Jabberwock.
closesodoo/odoo#62082
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
STEPS:
* open website page with a form (e.g. /contactus)
* click edit
* slow down connection speed
* click fast between form input lines or change order of the lines
BEFORE:
* 7 svg files are requested every click
* get_authorized_fields is called every click
* random error "'classList' of undefined" in SelectUserValueWidget::close
* random similar errors when a method is called before initialization
AFTER:
* svg and get_authorized_fields are requested once
* random errors are no reproduced or it's hard to do it
* performance of switching between inputs doesn't depend on connection
speed (though, still not instant)
WHY:
* about changing in SelectUserValueWidget::close: posible reason why
this.menuTogglerEl may be undefined is because method start is async
* the other updates just implement caching
---
opw-2368928
closesodoo/odoo#62115
X-original-commit: 710784da1f02d45cbe898da426ba7e2ac63dc711
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The web editor offered in-content preview when hovering over a color to change text or background color.
This commit implements this behavior with Jabberwocky.
closesodoo/odoo#61588
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The blue overlay on the snippet currently being edited did not update when the size or place of the element changed.
The overlay is now edited on each Jabberwock commit.
closesodoo/odoo#61716
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
*: web, website
Make the empty oe_structure messages "wizz" when the user clicks on a
snippet to drag instead of dragging it.
Note: also rename the "_onSnippetMouseDown" handler to not confuse it
with this new "_onSnippetClick" and add the missing documentation
comment for it.
Part of https://github.com/odoo/odoo/pull/60837
Related to task-2363616
closesodoo/odoo#61724
X-original-commit: bdfddace29b16404c06a7ebfc0cc242463a0e768
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Make the draggable snippets "wizz" when the user clicks on an empty
oe_structure.
Part of https://github.com/odoo/odoo/pull/60837
Related to task-2363616
X-original-commit: 3ed3537abd416ebc35f8bc2ee65f209840c071bf
WHY: odoo translation framework still cannot properly handle terms that have
different translations, so we need to avoid english terms with double meaning.
Also, this improves term understanding for translators.
---
closes odoo/odoo#61668
Discussion: #60765#61272
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Previously, when flipping some shapes vertically on chrome, and
vertically or horizontally on firefox, there was a gap of 1px or less at
some screen widths. This is caused by the way these browsers render
backgrounds on transformed elements. It seems like firefox will round
the size of the element to render the background image on it if the
element is transformed, while chrome will always render the background
at the correct size (or render it at a larger size and clip it to the
correct size after the fact), but will round the coordinates of the
symmetry point, causing only the vertical flip to have this issue, and
only if the background image would not extend beyond the bounds of the
element (on firefox, even shapes that would extend beyond the bounds of
the element would showcase a gap, eg origins 1)
This commit fixes that by applying the transform to the SVG rather than
to the element, by use of the shapes controller.
task-2369560
closesodoo/odoo#61609
X-original-commit: 42b3ad10e0b32b7fc72f801e2c67d6baf938c566
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the value of data-oe-shape-data required double
quotes to be properly parsed in JSON in the getShapeData method.
After this commit, we also allow single quotes to prevent issue if
someone doesn't use double quotes in the the value of
data-oe-shape-data. Which was precisely the case in one of the themes
and this is why this commit is a fix.
task-2327741
closesodoo/odoo#61487
X-original-commit: 10ac750aaecf502500dc08966f4642a8604a685b
Related: odoo/design-themes#423
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This change of style is a special request from FP: full width, full
height, no <sheet>, no resizer.
I did end up using a <sheet> and restyling it specially for note because
the styles that allow us to have the note next to chatter is too
intricately linked to the style of the sheet in form view to make it
safe to remove the sheet. Indeed, fully removing the sheet implied
duplicating a lot of css from community and enterprise alike. This way
is the least intrusive even though semantically unsound.
closesodoo/odoo#61405
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
* on image remove was removing two images instead of one -> fixed
* reactivate the image adder helper if you manually remove the last image
----
bug report :
[QSM] Images wall snippet -> Add images -> click on one -> Delete via the trash icon button on the overlay -> Sometimes (most of the time) delete 2 images instead of the selected one
closesodoo/odoo#61462
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit the add field actions are in the middle of the editor
top options
After this commit the add field actions are in front of the editor top
options
task-2367124
closesodoo/odoo#60996
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, background images were not centered by default.
It was especially annoying on mobile device. We created a new class
to center background image and we added it on all the snippets with a
background image except those with a parallax effect because they
already have a background-position in inline style.
task-2318526
closesodoo/odoo#60430
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, when the user dropped the "Quotes" snippet, the
editor was not allowing to drop any more snippet (see [1]). This was
because the editors initialization related to the drop of the "Quotes"
snippet was not able to be fully performed. Indeed, it is composed of
carousel items, themself containing images. As some of those carousel
items are hidden, the images they contains are too... and some options
actually wait to access their naturalWidth. As the images are lazy
loaded since [2], we were thus waiting infinitely.
[1]: https://github.com/odoo/odoo/commit/277f39904e7218bef2dd23b1c5b719ce8660008f
[2]: https://github.com/odoo/odoo/commit/617c716aeafd7bbc776d81da134a9b25329f08c9closesodoo/odoo#61308
X-original-commit: 2e37befbf84f0f587774d4c2fa095487148b549b
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Some lines had been wrongly (re-)moved during the process of integration
of Jabberwock. This restores them. Among other things, this fixes the
issue that made the popover snippet options still appear when the
snippet was invisible.
Before this commit, double clicking on the border or on the padding of
a form input generated a traceback.
task-2312878
closesodoo/odoo#61201
X-original-commit: 904af21214a5a6924ec80b5690a523819aaec5f1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This helper is the equivalent of jquery's `toggleClass` with a value for
the `force` attribute. I chose to name it `setClass` instead because
with that attribute it's technically not toggling: it's setting.
In order to allow modifying background images, we need information on
the image, this is done by creating a placeholder img and calling the
loadImageInfo function on it. However this function did not account for
the case where an image had not src attribute, which causes an
unnecessary rpc. Other problems could arise from this as an attachment
that doesn't have the correct mimetype but has a matching src could be
returned, causing its image_src field to be false, which we would then
attempt to load as a valid image, causing crashes.
This commit fixes that by not trying to load image infos when the src of
an image is empty, only looking for attachments of the supported
mimetypes, and also checking that we actually did receive an image_src
before setting it as the original src of the image, which will prevent
accidentally trying to load a falsy src as an actual image.
closesodoo/odoo#60982
X-original-commit: b0993370b6fcec1f966e4bf2994eee7f31da82d5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the badges' background color was not possible to
edit: the previews were done correctly but the background color was
removed after final selection.
This was because the background color property is animated on badges,
messing with the related edition function.
Closes https://github.com/odoo/odoo/issues/59337closesodoo/odoo#60820
X-original-commit: 34238b77ace7e6feeb1f9e693d7cd3b12786505d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When a snippet is out of the viewport or hidden, the overlay should
not be visible. Two distinct cases we had:
- When the page is scrolled, the header is sometimes hidden thanks to
tranform: translate(0, -100%); for some kind of effect -> the header
is thus still visible but out of the viewport, any selected snippet
inside that header would still have this overlay enabled so we would
see the move and delete button on the top of the screen.
- When the page is scrolled, with the vertical header, some part of the
header are hidden for the affixed version. If any snippet in those
hidden elements was selected, the overlay is still visible floating.
task-2312878
closesodoo/odoo#60658
X-original-commit: 8a949019fd39c6c07ae5827462ee96e15f3190a1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benjamin Vray <bvr@odoo.com>
Co-authored-by: Thanh Dodeur <tso@odoo.com>
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the
same time there is no easy way to fix it
STEPS:
* create a record with html field, e.g. project.task
* add an embedded video (File/Image icon)
* save
BEFORE: video doesn't work
AFTER: there is no option to add embedded video anymore
WHY:
* iframe tags are removed before storing html in database, so after saving a
record, embedded video doesn't work anymore
* possible fixes to activate embedded videos in backend:
* new field attribute sanitize_iframe=False
* adding iframe on client side -- the problem is that the backend doesn't
have mechanism to use animation in html fields like it's done in
website: https://github.com/odoo/odoo/blob/ced500e9bcbb5c84033463689d135ad4c7dc4f39/addons/website/static/src/js/content/snippets.animation.js#L623-L632
---
opw-2353103
closesodoo/odoo#60477
X-original-commit: 2dcbac08effcedafbcf50610355752030902b16d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
When the overlay covers a snippet, if that snippet is at the top of
the page, the options at the top of the overlay are hidden. A system
was made to make them change position in that case but this was broken
by [1], leaving the toggling of a class for that case but without its
related scss.
This commit restores that scss and also improves the detection of that
problematic case.
[1]: https://github.com/odoo/odoo/commit/4f27e52cabb77b8b1a9637a11185ddf882adc9afclosesodoo/odoo#60467
X-original-commit: 97f11571f9e3deacc9b9e1dc0d2cc8fc6b93f15c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
- Install "Website" app
- Go to "Contact us" page on website
- Edit Page, then click on submit button to
edit form style
- Alter 'Recipient Email' by selecting a value
from 'autocomplete' values
Other input text options are also altered.
Cause
Due to chrome autocompletition, others text input fields are
also altered (like it will do with a form address).
In this case, the error was obvious since it alter also the
'Labels Width' who break the layout.
Solution
Disable autocompletition on `<input type='text'/>` options
elements.
opw-2361169
closesodoo/odoo#60481
X-original-commit: 48d4c8185482545b049e2fecf315dd66ab9472f8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Keep the original position of the background as a percentage. In this
way, we avoid converting in pixel a direction that we have not changed.
Part of #55857
Related to task-2318526
X-original-commit: b8ac4f6b0c0aaa17ccae43ad8756c5b807e29823