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>
This code is a leftover of https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8#diff-70e782021bdfee46734a7fc7dbcad3104f7f985dd37f9320f1480d424581d67fL191
- We should not get info from the `err` and `data` parameters, those are not
the same as the it was before the code got migrated, `data.data` never exists.
- The fact that we handle the fail on this call is also a leftover of that
refactoring where the error was done through a generic template.
- We should not handle an error on publish action. We never handle that kind of
error if the action should not fail by default. This is typically the case
when loading the menu through "Edit Menu" or the page properties.
- This is especially true with later version as error raised are already
handled globaly
Closes#60041closesodoo/odoo#62741
X-original-commit: 26927417e2957acba6fb79446c2520107daa7eea
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Megamenu snippet should appear in the snippet editor "block" section ONLY if a megamenu element is selected.
In the current version, trying to filter snippets would make the megamenu snippet block appear.
closesodoo/odoo#62414
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit the navigation toolbar was accessible after selecting
a theme before the editor was opened, which on slow connections made it
possible for users to leave the screen and miss the tour
After this commit the loader animation of the theme installation is
blocking the access to the screen until the editor is opened thus
preventing user to navigate elsewhere before seeing the tour
task-2387608
closesodoo/odoo#62029
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Same change in several areas where translations existed:
- website editor notification popup
- elearning share popup
- forum remediation filter popup
- event registration attendees popup
- portal rating popup
- stripe payment error popup
And many other locations where there were no translations yet
"×" has been replaced by its UTF8 character.
Also introduced aria-label where missing.
Before this commit the close icon was included in translated resources.
For example, in Spanish the "×" had been turned into "&veces;"
thus not rendering an icon anymore
After this commit the close icon is not a translated text anymore and
remains an icon across all languages
https://github.com/odoo/odoo/pull/60186
task-2312878
closesodoo/odoo#62250
X-original-commit: 9896af94ebc887d98ccf44e6568ef7eeb5a27172
Related: odoo/enterprise#14937
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Without this commit, when clicking on a metric on the website dashboard, it
would not load the correct data.
Indeed, the dashboard is loaded for a specific website only, but clicking on a
metric opens the data for every website together.
Step to reproduce:
- Make some orders on 2 differents website ecommerce
- OPTIONAL: Get through the payment on some orders, then just leave some
products in the cart afterward to have some unpaid orders
- Go to the website dashboard, you see some metrics
- Change the selected website on top right, you see the metrics adapts
correctly
- Click on a metric, it doesn't fit the number you clicked on. For instance,
if you had 1 Unpaid Orders for website 1 and 3 Unpaid Orders for website 2,
you see 4 orders in the tree view once you have clicked the metric.
This commit ensures the correct website is appended to every dashboard action
domain.
opw-2369420
Fixes#44926, fixes#51125
X-original-commit: 06f954787cf60e657768e365a15ea4513d459c0b
Prior to this commit:
A race condition could occur when dropping the dynamic product snippet
creating a traceback "Cannot read property 'limit' of undefined".
After this commit:
Potential race condition has been removed from the code.
closesodoo/odoo#61890
X-original-commit: de14be4986ef4a293b99523b7dc110be3b16b8ea
Signed-off-by: Quentin Smetz (qsm) <qsm@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>
When the layout background color was reset using the colorpicker of the
countdown option, a traceback occurred. This was because the countdown
widget relies on having a set color. The text and progress bar colors
were working with unset colors but with inconsistent behavior. This
commit fixes the traceback and makes the widget consistent: using the
reset button on any color tells the countdown widget "use the color
you want" and our countdown widget will simply set it to black.
Thanks to @dwa-odoo and @jpr-odoo for original investigation.
task-2227149
closesodoo/odoo#61682
X-original-commit: abbf88770442bded27b5e490ce3d3e1a7025dc04
Signed-off-by: Quentin Smetz (qsm) <qsm@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, 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>
Homepage tour starts with a very generic step 'drop snippet'
So, you can be in the middle of another tour and see the step of homepage tour.
This doesn't fix all cases, but make conflict less frequent.
E.g.
go to step 4 of tour event
click on save (before doing the step 5)
click on edit
Element is no more dirty (because save before step 5) so the step 5 not visible,
Tour with higher sequence (== lower priority) become visible. (e.g.: homepage)
Forward-Port of bca6cf2693d38c76b1af08398a3125bb16b59c15
closesodoo/odoo#61157
Related: odoo/design-themes#416
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Using the handle to move elements from footer/header anywhere
in the page would make the main element disappear with endless
content loading animation.
The end of the drag and drop executes a serie of methods :
_destroyEditors > cleanForSave > toggleTargetVisibility
Since the "cleaning for save" is called for all snippets and the footer
doesn't contain a 'o_snippet_invisible' class, the "onTargetShow" method
is called... but actually hide the footer because the "onTargetShow"
implementation was so that it clicks on the visibility checkboxes
regardless of its current status.
Part of https://github.com/odoo/odoo/pull/59624
task-2312878
X-original-commit: 5488916657f9cd4041abdcbe3fc615174df6cb49
Before this commit, the max height of the off canvas hamburger was the
same as the standard navbar-collapse (80vh) but in the case of an off
canvas hamburger menu we need a 100vh max-height to display it
properly.
task-2312878
closesodoo/odoo#61189
X-original-commit: 007580b2cd7329733f1e9b70ea95265080b7ccd8
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.
This commit align vertically the copyright text and the inline
language switcher items. This commit also add a padding on
list-inline-item in the language selector. Because before this commit,
there was no space between lines if the list was to be displayed on
multiple lines.
Part of #59581
task-2312878
closesodoo/odoo#60527
X-original-commit: a8c4ca8a942d94557db5b95f42344fee71faf6e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the width of carousel blockquotes was too small to
display correctly on mobile device.
Part of #55857
task-2318526
closesodoo/odoo#60439
X-original-commit: 12a68cc0f057f6febc70fdc6785a1bcec9f282f3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
-Remove arrows on mobile because it's too big and hide the content.
User will use the touch screen to make the carousel move.
-Bordered style: Reduce the borders on mobile.
Part of #55857
task-2318526
X-original-commit: 86cd5e898b482192e50a20d0b6ef2a9b02b8301f
This commit replace the default website logo image by a new one. This
new website logo image works with any background color thanks to its
white background.
task-2362012
closesodoo/odoo#60369
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
For some strange reason, the footer slideout effect was not working on
Firefox anymore. The height of the footer is not understood by Firefox
sticky implementation which it seems to not understand because of the
combination of 3 items: the footer is the last :visible element in the
`#wrapwrap`, the `#wrapwrap` uses flex layout and the `#wrapwrap` is the
element with a scrollbar.
As neither of the last two items can be changed, this commit fixes the
problem by adding a pixel div element in the DOM after the footer on
page load, if the slideout effect is enabled. This is obviously not
ideal but solves the problem while waiting for another solution.
Part of https://github.com/odoo/odoo/pull/60271
task-2312878
closesodoo/odoo#60361
X-original-commit: c8fc4a113256db92acd1991280d130c1f0fb628e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, top and bottom padding were not the same in the
items snippet. We also removed horizontal paddings on the section to
keep the snippet columns aligned with other snippets.
task-2312878
closesodoo/odoo#60307
X-original-commit: 22a9a3de3c205709597ab95d8987466bd5579c86
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, when a vertical scrollbar appeared in the collapse
navbar menu, the horizontal scrollbar also appeared.
We added overflow-x hidden on navbar and navbar-collapse for never
again display this horizontal scrollbar.
task-2312878
closesodoo/odoo#60187
X-original-commit: 8a889277d8fa0af8498964e264c781424f79e3d8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the close button in enterprise version was primary (green).
Now we make it black to avoid to have this button like a CTA, and in the same
time, while we have already hacked all this kanban view, we continue changing
the active breadcrumb to a nearly black
closesodoo/odoo#59551
X-original-commit: 481454e18e6cb1c5da317e12c820975a07d39411
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, the hoverable dropdown option was broken because
we changed the option selector to the navbar element instead of the
header element. But we forgot to care about the data-select-class
which adds a class on the header. This commit fixes the issues by
changing the $target back to the header element for the related option
as the fact it is linked to the navbar element is only so that the
options appear in a different section, on navbar click.
Part of https://github.com/odoo/odoo/pull/60031
task-2312878
closesodoo/odoo#60031
X-original-commit: e1f8d549895cd9c459e6350430f30d541d02838a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When the height not forced (50% or 100% screen's height), the snippet
simply disappear if there is no content inside (default).
The 4e220bf commit makes parallax snippet empty by default and the
main goal of a8f0cee was to make "DRAG BUILDING BLOCK HERE" placeholders
appear only on drag, that's why we need to add a "min-height" for parallax
to keep it visible when the "Height" selected is auto.
task-2327025
closesodoo/odoo#60032
X-original-commit: f019cd677e68312f90604be6abd04a1b1755ae4d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit it was possible to activate the overlay of the
arrows of the gallery snippet (with themes because of animation
options)
task-2312878
closesodoo/odoo#59973
X-original-commit: 81a00e3469f93cb4686c92db5695316db92eb84c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Made the website_id non mandatory on website snippet filters and adapted
the fetching route so that it interprets an unspecified website_id as
the filter being available on any website.
Before this commit website snippet filters had to be limited to one
single website.
After this commit website snippet filters can be made available on all
websites by setting their website_id to no value (this is the new
default of the pre-defined filters).
https://github.com/odoo/odoo/pull/59831
task-2355369
closesodoo/odoo#59831
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The goal of this commit is to prevent the theme install/update
loader from inheriting the opacity property from container by
setting a background-color with level of transparency.
task-2312878
closesodoo/odoo#59887
X-original-commit: 1e7424579ba7b59c9bc7a4972b10403610f720cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the menu direction of header dropdowns was
related to the window width but it was wrong because of the right
panel. We also enable it in editor mode.
task-2312878
closesodoo/odoo#59846
X-original-commit: ced500e9bcbb5c84033463689d135ad4c7dc4f39
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: portal
The dividers were removed with the new header templates but we still
needed them to know which items do not need to be folded in the
auto-hide menu. Instead of adding these dividers again, we added a new
class for these elements.
part-of: #59640
task-2312878
closesodoo/odoo#59804
X-original-commit: 59584974aa891b1182164adac3d3563d882bcfd7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, autohide menu was disabled in editor mode. This was
thus not really wysiwyg for users anymore.
part-of: #59640
task-2312878
X-original-commit: 969aa3dc11061254c52cf06f0b96d36192d61d40
This commit allows user to edit other menus by clicking on them
the same way the global menu is edited.
task-2272226
closesodoo/odoo#55881
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>