Commit Graph
12325 Commits
Author SHA1 Message Date
qsm-odoo 8caf84f70a [FIX] web: clear form button box before an alert
On the user form view, just after the button box, there might be an
alert component. Since BS4, this alert goes over the floating button
box in community. Before BS4, the button box went over the alert (so it
was functional but still ugly).

This commit adds an extra style for community only: clear the button
box before an alert component.

Closes https://github.com/odoo/odoo/issues/27435

closes odoo/odoo#27566
2018-10-09 09:08:48 +00:00
svs-odoo 078b31dc7f [FIX] web: Make datetimepicker configurable in datetime fields
The datetimepicker option was introduced to be able to customize the
datetime picker widget in date/datetime fields. However, due to the way
the _makeDatePicker function was coded, it did not work in datetime
fields.

Thank to Yajo for the initial fix

closes odoo/odoo#27541
2018-10-09 12:34:23 +00:00
Odoo Translation Bot fd228ccda4 [I18N] Update translation terms from Transifex 2018-10-07 00:29:41 +02:00
Nicolas Martinelli 360212f206 [FIX] web: remove reference to Enterprise version
closes odoo/odoo#27505
2018-10-08 07:27:40 +00:00
Nicolas Martinelli 38ee891bf6 [FIX] web: appropriate color theme
Do not mix Community and Enterprise color themes. Moreover, increase the
contrast of the control panel for better readability.

closes odoo/odoo#27502
2018-10-08 06:20:55 +00:00
Martin Trigaux 961d68f1c5 [I18N] export 12.0 source terms
Including demo data

closes odoo/odoo#27504
2018-10-08 07:13:33 +00:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Pedro M. Baeza 1ad4d42f0b [ADD] *: replace hardcoded data URIs with helper
- Add a method for generating an image data URI, and expose it in QWeb context

- Fix reports, website templates or mail templates with data hardcoded
  data URIs, to use the helper (Python cases), or the existing
  kanban_image helper (for JS cases)

This will gracefully handle SVG support in addition to classical image
formats.

Closes #26635
2018-10-03 17:48:14 +02:00
Pedro M. Baeza 1be50fdeaf [ADD] *: support SVG images
Introduce official support for SVG files in the framework, including the
following parts:

1. When client-side SVG images are uploaded, the content is displayed until
you save using data URI scheme according RFC 2397 [1]. This scheme requires
to specify content format. Using hardcoded "image/png" works for all images
types except SVG.
Type-sniffing is done using "magic byte" detection via the first base64
encode byte, so that the proper data URI scheme can be used.
This should not cause SVG-related security problems as the file is
displayed through `<img>` tag, which does not allow SVG scripting [2].

2. Make /web/image controller compatible with SVG

3. Add support for SVG files for company logo, which uses a dedicated
controller.

4. Resizing of SVG files is a no-op, as it makes little sense for a
vector-based format. We also want to avoid micro-alterations to the SVG
document (in "natural" viewport parameters) as we would store multiple
copies of the files in the filestore.

5. Because SVG files are inherently dangerous, upload of SVG files is
restricted to administrators, either by blocking it directly before
saving it in the database (binary fields with attachment=False), or by
neutering them to text/plain mimetype (for binary fields with
attachment=True)

6. Add tests for the SVG upload cases and for the non-admin uploads.

[1] https://tools.ietf.org/html/rfc2397
[2] https://www.w3.org/wiki/SVG_Security

Closes #26635
2018-10-03 17:48:01 +02:00
Xavier Morel 8fb358e563 [FIX] web: user's change_password wizard
Auth can now report errors less trivial than "incorrect password", the
wizard should report them instead of just assuming the original
password was not correct.
2018-10-02 20:54:00 +02:00
Xavier Morel a47f6093f8 [ADD] auth_password_policy{_signup}: password strength widgets
* generic strenght meter widget which can be included in various
  places
* password field, taking over the isPassword special cases strewn
  throughout the codebase, this should probably become an actual thing
  in core /cc @ged-odoo, the meter is opt-in as most uses of
  `field[@password=True]` are passwords & secrets for third-party
  services or external servers for which a meter would not make sense
* separate override of the ChangePassword wizard which isn't a regular
  view for some reason
* direct implementation for signup pages (create user & reset password)

Skip/comment/remove existing testing of @password fields: the policy
replacement/augmentation needs to make an RPC call and does not
support readonly use (because it doesn't seem to be used anywhere so
that made sense?); and there currently is no way to augment or
override/replace existing tests, so the tests will either fail when
auth_password_policy is installed (current situation) or fail when
auth_password_policy is not installed (if updated to be compatible
with APP).
2018-10-02 20:54:00 +02:00
Alexandre Kühn 4e2dffadda [ADD] web:tests: user menu basic tests 2018-10-02 17:58:47 +02:00
Alexandre Kühn 09cbe3e3b2 [FIX] web: no shortcut for app menu
This menu mistakenly tells that there is a keyboard
shortcut to navigate in the app menu.
2018-10-02 17:58:47 +02:00
Alexandre Kühn ef15d1ce3d Revert "[FIX] web: 'Shortcuts' in user menu (community)"
This reverts commit 05971d0050.

This menu makes sense in community, therefore we re-enable this
menu.
2018-10-02 17:58:47 +02:00
qsm-odoo 39fb86a352 [FIX] web, *: remove useless mixin
* mail
2018-10-02 17:29:30 +02:00
qsm-odoo f427ddcb36 [FIX] web: remove portal/website dependency from reports
See the comments which are removed by this commit for details. We
finally chose to remove the whole interaction for now.
2018-10-02 15:19:53 +02:00
qsm-odoo 43655b3b39 [FIX] web: restore dashboard text-right design
We should style review the kanban (dashboard) design / grid system / ...
2018-10-02 15:17:09 +02:00
qsm-odoo 3b2ab5a499 [FIX] web: review disabled checkbox design
Thanks to @kea14
2018-10-02 15:17:09 +02:00
Martin Trigaux d77000aef3 [I18N] export saas-11.5 source terms
Reflect module moved to enterprise and remove fields after c9837ac5d
2018-10-02 13:15:40 +02:00
Adrien Dieudonne b2cadc9238 [FIX] web: avoid no content helper for pie chart in comparison mode
In comparison mode with no data, we render two empty pie charts even
if it's not an embedded view.
The non content helper is still used when there is no comparison.
2018-10-02 13:10:34 +02:00
Mathieu Duckerts-Antoine 64d7da4198 [FIX] web: fix update problems in graph view
The graph view was not updated correctly with respect to
time range menu data. We fix that problem in this commit.
2018-10-02 13:04:34 +02:00
qsm-odoo 9df7bca6f5 [FIX] web: prevent users to type invalid values for opacity
Also, make all the _updateXXX methods follow the same structure.

Thanks to @kig-odoo for spotting the issue.
2018-10-01 21:33:32 +02:00
Alexandre Kühn 05971d0050 [FIX] web: 'Shortcuts' in user menu (community)
Revision on https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242

This menu item should not appear in the community version of Odoo.
The commit above mistakenly added this menu item, even though no
logic was implemented for it. This was a consequence of the copy
& paste approach to rapidly deploy the new navbar in community.

(Note: a big refactoring of the web client is coming very soon,
so this duplicated code issue should only be temporarily).

This commit fixes the issue by removing this menu item in the
community version.
2018-10-01 18:19:48 +02:00
Antony Lesuisse a171694644 [FIX] web: datababase manager add privacy policy link 2018-10-01 18:08:50 +02:00
Mathieu Duckerts-Antoine 9b5dabd399 [FIX] web: right labels in bar chart and comparison mode
For a single groupby selected, the graph view didn't render well
the data when simultaneously in bar chart and comparison mode.
The labels were in that case always integers.
This commit fixes that situation.
2018-10-01 16:42:12 +02:00
Christophe Simonis 9b477f5311 [FIX] web: define used variable in test
Oversight of previous forward-port
2018-10-01 16:21:46 +02:00
Christophe Simonis 43b63a0465 [MERGE] forward port branch saas-11.4 up to 57e387b645 2018-10-01 16:01:54 +02:00
RomainLibert b2870ae1eb [FIX] web: add shortcuts menuitem support
Since https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242, it was possible to click on a "Shortcuts" menu item
in community which triggered a call to _onMenuShortcuts whose
implementation was only defined in enteprise

As the keyboard shortcuts are available both in community and
enterprise, we should support this menu item
2018-10-01 15:13:57 +02:00
Adrien Dieudonne c4937132a3 [FIX] web: line chart x ticks labels overlapp
This commit hides some labels depending of the avalaible size
of the graph.

We had to skip some test because 'renderEnd' is not triggered
for line chart. We need to update nv.d3.
2018-10-01 14:24:51 +02:00
Aurélien Warnon 27a7393852 [IMP] product,(website_)sale: Product configurator default_get cleanup
Targets commit d3530eb07e

Purpose
=======

[Follow up AL review]
Removed the default_get override in the sale_order_line model.
- The default values to create records are now specified by pefixing them with "default_" in the JS.
  That will use the built-in framework method, which is more simple/clean.

- The "list_editable_renderer.js" file for the product configurator was removed and its content is now merged within
  the SectionAndNoteListRenderer.

Updated fields:

- [sale_order_line in sale/sale.py] "product_no_variant_attribute_values" to "product_no_variant_attribute_value_ids"
2018-10-01 13:28:41 +02:00
Christophe Simonis 998723b909 [MERGE] forward port branch saas-11.3 up to e980af9df0 2018-10-01 11:27:51 +02:00
Andrea Ulliana 5ba0216b74 [FIX] web, *: support opacity in colorpicker dialog
* web_editor, website

Add an opacity slider and an opacity input to control opacity over
the chosen color.

task-1887571
Closes https://github.com/odoo/odoo/pull/27289
2018-10-01 11:00:54 +02:00
Mathieu Duckerts-Antoine a4b1c4193e [IMP] web: count measure first if selected in pivot view
The count measure is now put first in the order
of selected measures.
2018-10-01 10:38:14 +02:00
Lucas Perais (lpe) 1bd7adcc8b [FIX] web: debug_manager set defaults
On a form view, click on set defaults, select a value for a field,
then save

Before this commit, there was a traceback because the model on which we apply
the defaults was not found

After this commit, it works as expected

OPW 1887032
OPW 1888715

closes #27148
2018-10-01 09:31:15 +02:00
Odoo Translation Bot 79b701230d [I18N] Update translation terms from Transifex 2018-11-04 03:16:30 +01:00
Odoo Translation Bot a01c1bf5bf [I18N] Update translation terms from Transifex 2018-09-30 02:25:45 +02:00
Odoo Translation Bot 0a94a766e6 [I18N] Update translation terms from Transifex 2018-09-30 00:29:10 +02:00
Xavier Morel 10228fe3ef [ADD] web: ability to become superuser (uid=1)
* requires that current user has group_system
* only visible in debug mode (?debug)
* available at login or via debug menu
* special systray color in superuser sessions

Closes #27254
2018-09-28 17:25:36 +02:00
Martin GeubelleandAaron Bohy f4b2060af5 [FIX] web: handle lazy load with previous actions
Before this rev. the lazy loading of views was correctly handled if there was
only one action in the action stack (which is usually the case when performing a
F5, the main use case of the view lazy loading).

Nevertheless, it might happen that the lazy-loading is used in top of other
actions (when performing a `doAction` with a form view for an action with
another view as first view, i.e. when leaving Studio while editing the form view).
The controller was `unshift` in the case (put in the first position of the
controller stack), which is not correct.

This causes the breadcrumb to be misordered and a traceback occured when trying
to access a breadcrumb element.

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-09-27 12:34:04 +02:00
Mathieu Duckerts-Antoine 53a9bdf900 [FIX] web: only default time range works
If a default time range was set in the action but no
other default filter or groupby, the time range wasn't applied.
This commit fixes that situation.
2018-09-27 12:34:01 +02:00
Mathieu Duckerts-Antoine 3c093a8108 [FIX] web: human numbers and percentages
A recent modification of the float and integer
formatters allowing the rendering to be human readable
causes a bug in the percentage formatter for large values.
The reason is that the latter formatter uses formatFloat (wich can
now produce 'numbers' like 3k) and then parse the result. In the case
of 3k an error is raised since 3k is not recognized as a true number.

This fixes avoid to parse the number in case it has been formatted
to be 'readable'. Note that the parsing was essentially used
to produces better percentages like 10% instead of 10.00%.
This is not necessary in our case since utils.human_number takes care
of the unwanted (not all) decimals for us (the original number is always
rounded by utils.human_number).
2018-09-27 11:58:39 +02:00
Martin Trigaux 17416e664c [FIX] web: translate search view
Group By and Filters strings in the search view were not translatable
2018-09-27 10:24:32 +02:00
Vincent Schippefilt 13d3456791 [FIX] web: fix crash in sidebar when adding attachment
task-id : 1873908
2018-09-26 21:42:58 +02:00
Odoo Translation Bot f7a976584b [I18N] Update translation terms from Transifex 2019-02-24 03:16:28 +01:00
ThanhDodeurOdoo 2d82692648 [REF] documents, base: binary_content
- Changed the binary_content method
to make it more generic and allow alternative ways of checking
the access rights by using a new method check_access_mode.

   Reason: Asked by ODO following documents' security review.

- if all pages are processed, splitting a pdf will
archive the original attachment.

   Reason: FP feedback.

Task: 1853490
2018-09-26 19:18:38 +02:00
Mathieu Duckerts-Antoine 692b557284 [FIX] web: avoid empty header in pivot.
In comparison mode, a useless line with an
empty header was sometimes created due to
problem in the treatment of read_group results.
This is no longer the case.
2018-09-26 18:21:39 +02:00
Mathieu Duckerts-Antoine 61253cbf6b [FIX] web: better submenu switcher style in groupby menu 2018-09-26 17:42:55 +02:00
Vincent Schippefilt 4f624b70fc [FIX] web: dialogs with shouldFocusButtons option have the focus set.
Before this fix, sometimes dialogs that had the option shouldFocusButtons set on open
did not set the focus on the buttons. This is especially true for the "discard changes"
dialog where it is less usable with the keyboard.

After this fix, we wait for the widget to append itself to the dom before setting the focus.
2018-09-26 16:18:41 +02:00
Vincent Schippefilt fe4c3e0064 [IMP] web: do not set accesskeys on buttons with tabindex=-1
It excludes a lot of 'noise' when we do not set automatically access keys to all
the skipped items, this allows a better focus on actions when using the keyboard.
2018-09-26 16:18:41 +02:00
Vincent Schippefilt 01abb0f254 [FIX] web: focus the buttons in warning dialogs 2018-09-26 16:18:41 +02:00