Commit Graph
69 Commits
Author SHA1 Message Date
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
Martin Trigaux 74c1107512 [IMP] web: generate lowercase password
No more shouting master passwords

closes odoo/odoo#51327

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-15 10:47:55 +00:00
Martin Trigaux b334dfcbd2 [IMP] web: force a master password on insecure dbs
When creating a new database, a random master password for it is
generated and strongly suggested to be used.

The motivation for this change is to have, by default, a secure master
password set for any Odoo deployment.
Often, users do not realise that, when making an Odoo installation
accessible on internet, anyone else can also access it.

Use autocomplete="new-password" for updating the master password and
play nice with password managers
When generating a new password, use autocomplete="new-password" as
well to prevent autofill of password potentially saved in password
manager.

Make the eye click to toogle on click instead of need to maintain.

closes odoo/odoo#45117

Task-id: 2091260
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-14 13:45:40 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Martin Trigaux 00ef2653da [MERGE] Forward port of 12.0 to saas-12.2 up to 3b1d00acda
closes odoo/odoo#34732

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 10:14:06 +00:00
Martin Trigaux 3b1d00acda [MERGE] Forward port of saas-11.3 to 12.0 up to db5261b19e
closes odoo/odoo#34723

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 08:27:12 +00:00
Julien Castiaux 5038f777a0 [FIX] web: prevent db_manager modal close on empty pwd
Go to the database manager, configure a password either via the
interface either via the `admin_passwd` `.odoorc` config file. Click on
the backup menu, let the `password` field empty and submit the form. The
modal is closed without any warning and no query is sent.

The problem is that even if the field is marked as `required`, there is
a event listener that catch the `onsubmit` event and close the modal
even if it is not valid.

opw-2031461

closes odoo/odoo#34669

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-07-09 13:44:41 +00:00
Antony Lesuisse a171694644 [FIX] web: datababase manager add privacy policy link 2018-10-01 18:08:50 +02:00
Christophe Monniez 83e460b8da [IMP] web: add a phone input to the database manager
Task: 1879675
2018-09-18 13:54:19 +02:00
qsm-odoo 15af66ce3f [FIX] web: BS4, restore database manager
The database manager was broken with BS4, this commit restores it. The
old BS3 layout was not perfect either, so this commit redesigns the
forms with BS4 too.
2018-07-31 11:08:11 +02:00
qsm-odoo a6a3e74ebf [REF] web, *: BS4, adapt radio button structure
Use BS4 *custom* structure for radio buttons to allow customizing
their style and have cross-browser style.
2018-07-27 12:36:54 +02:00
qsm-odoo f7cee83cb8 [REF] *: BS4, 'center-block' -> 'd-block mx-auto' 2018-07-27 12:36:54 +02:00
qsm-odoo d48b8593dd [REF] *: BS4, 'pull-left/right' -> 'float-left/right' 2018-07-27 12:36:54 +02:00
qsm-odoo 93b0001df6 [REF] *: BS4, adapt forms
The 'form-horizontal' class have been removed; the '.form-group'
elements must now use the 'row' class for an horizontal layout.

The 'control-label' class was renamed to 'col-form-label'.

The 'help-block' class was renamed to 'form-text'.

The 'has-error' and 'has-success' classes have been removed and
replaced by a new system using the :valid and :invalid pseudo-classes,
when a parent has the 'was-validated' class. While this system is great,
it is not straightforward to use it in Odoo. Fortunately, BS4 provides
the 'is-valid' and 'is-invalid' classes as fallback. This commit
replaces the 'has-error' and 'has-success' classes by 'o_has_error' and
'o_has_success' classes (for JS compatibility) and use the 'is-*'
fallback classes. (The 'has-warning' class has no equivalent but was
unused in Odoo anyway).
2018-07-27 12:36:54 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00
qsm-odoo de214e3742 [REF] *: BS4, 'img-responsive' -> 'img-fluid' 2018-07-27 12:36:54 +02:00
qsm-odoo 81f359c81c [REF] *: BS4, remove the use of btn-sm
Odoo made the bad choice of using the 'btn-sm' class for every button
instead of configuring the padding for default 'btn' to be smaller.
In BS4, the style of btn-sm is actually more complex, lowering the
font-size too. Also, btn-xs was removed so we would not have the
possibility to display smaller button than our default ones.

This commit removes btn-sm wherever it was used. Unfortunately, this
might remove it at some places where it made sense but this can be
restored in a second time.
2018-07-27 12:36:54 +02:00
kujiu f90cf060a3 [FIX] Syntax of icons (#25577)
Description of the issue/feature this PR addresses:

Accessibility improvements forbids the use of the syntax
`<i class="fa fa-check"/> Some text`
to create a labelled icon. But, by this, some fonts are changed.

Desired behavior after PR is merged:
The old syntax can be used.
2018-07-04 09:55:52 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
Naglis Jonaitis b52244e15b [FIX] web: removes duplicate id attribute inside DB manager template
Closes #20855
2017-11-14 15:25:15 +01:00
Olivier Dony b02dea7688 [IMP] config: allow blocking access to db manager
- The `--no-database-list` option will now also block access to database
  management functions and screens.
  Presumably this flag should only be used in production when all
  databases have been provisioned, so the admin should like to block
  access to the db manager at the same time.

- If no `--database` or `-d` parameter is provided, the system will be
  unable to fetch a list of databases at all, so users will be blocked
  with an error message.

- Hide the link on the login screen to the DB manager when it is
  disabled, to prevent sending users to an error page.

- Weak attempt at updating the documentation

Note: the security check for RPC methods could have been done in the RPC
dispatcher, however that would not have protected service methods when
called directly, e.g. by a controller (e.g. the dump method).
2017-10-03 12:46:03 +02:00
Christophe Simonis ab68a1c674 [MERGE] forward port branch saas-14 up to 64b7d4e8a8 2017-04-24 13:24:13 +02:00
Christophe Simonis 64b7d4e8a8 [MERGE] forward port branch 10.0 up to 3f6e573c67 2017-04-24 12:53:34 +02:00
Christophe Simonis b5b8239870 [MERGE] forward port branch 9.0 up to 9e6860a228 2017-04-24 11:07:55 +02:00
Nicolas Martinelli 9e6860a228 [FIX] web: make DB name more flexible 2017-04-24 08:02:22 +02:00
Christophe Simonis a0ff1f2ad8 [MERGE] forward port branch 9.0 up to 8de514f805 2017-04-21 14:19:05 +02:00
Christophe Simonis 144ff9a61a Revert "[FIX] web: refuse DB name with space"
This is too restrictive.

This reverts commit 606712a5d2.
2017-04-21 14:02:58 +02:00
Christophe Simonis b0992d082d [MERGE] forward port branch saas-14 up to 8f30e707e5 2017-04-13 15:31:27 +02:00
Christophe Simonis 13ad16104a [MERGE] forward port branch 10.0 up to 00e169c05a 2017-04-13 13:22:27 +02:00
Christophe Simonis aea68e4730 [MERGE] forward port branch 9.0 up to 51fe54dd8d 2017-04-07 17:34:51 +02:00
Nicolas Martinelli 606712a5d2 [FIX] web: refuse DB name with space
In v8, it was not allowed to create a DB with a name containing a space.
This should still be the case from v9 since it causes issuesfor backup
scripts, for example.

Reintroduces 1a0e9063d4

opw-727613
2017-04-07 14:53:01 +02:00
George Daramouskas 96f703ff84 [ADD] web: warning on incompatible databases
If a database is not an Odoo database or is not the same version
Closes #15171
2017-01-31 18:17:55 +01:00
Fabrice Henrion 9f497db575 [FIX] web: wording
unbelgianization
Closes #13881
2016-11-14 17:15:25 +01:00
Christophe Simonis 54e5bbdf35 [MERGE] forward port branch saas-10 up to 897b9b8 2016-09-02 16:28:28 +02:00
Pierre Masereel 665bb3cb62 [FIX] web: correctly redirect after database creation
When a database is created, we are not auto-logged in to the new
database anymore because the login passed to the authentication request
is 'admin' instead of the one set in the creation form.

To fix this issue, we used the login parameter from the creation form
in the authentication request. We also set the login field to
required in the create database form view.

This bug comes from rev https://github.com/odoo/odoo/commit/903733a32
2016-09-01 15:23:57 +02:00
Christophe Simonis 3a2147d95c [MERGE] forward port branch saas-10 up to bc1a0a3 2016-08-20 16:57:36 +02:00
Jeremy Kersten 0d491775c5 [FIX] web: don't duplicate alert while backup
When you backup 3 dbs with the database manager, you had 3 times the warning.

Underscore is not loaded, so _.once not available.
This commit closes #13173
2016-08-19 15:34:58 +02:00
Christophe Simonis c88c70e900 [MERGE] forward port of branch saas-10 up to d73f0d8 2016-06-21 13:58:24 +02:00
Damien Bouvy 9c007ac375 [IMP] db_manager: better uuid management
* Always change the uuid of a duplicate database by default
* Clearer message when restoring a backup
2016-06-16 17:29:41 +02:00
Christophe Simonis dda0d3d62d [MERGE] forward port of branch saas-10 up to baf494c
# Conflicts:
#	addons/hr_timesheet/project_timesheet.py
#	addons/sale_layout/i18n/es_PE.po
#	addons/sale_layout/i18n/hu.po
#	addons/sale_layout/i18n/lo.po
#	addons/sale_layout/i18n/pl.po
#	addons/sale_service/i18n/es_MX.po
#	addons/sale_service/i18n/es_PE.po
#	addons/sale_service/i18n/lo.po
#	addons/stock/stock.py
#	addons/stock/stock_view.xml
#	addons/warning/i18n/es_PE.po
#	addons/warning/i18n/lo.po
#	addons/warning/i18n/ru.po
#	addons/web/i18n/cs.po
#	addons/web/i18n/ja.po
#	addons/web/i18n/lo.po
#	addons/web/i18n/th.po
2016-06-15 12:59:39 +02:00
Martin Trigaux 0ec664d1a7 [FIX] web: close popup after backup
All actions of the database manager redirect the user after an action except the
backup option which returns an octet stream.
Close the modal after form submission to mimic the same behaviour.

Do not close the modal for other actions than database manager to avoid waiting
time for create that may be long to process.

Add message to warn the user about backup waiting time after cliking on submit
to be less confusing for big databases that may take a lot of time to be ready.

Fixes #10803
2016-06-14 13:42:14 +02:00
Christophe Simonis e38ddcfeae [MERGE] forward port of branch saas-10 up to b26fd22 2016-05-17 14:39:05 +02:00
Damien Bouvy 903733a320 [IMP] web/database manager: admin login & country
Add inputs e-mail address and country
when creating a newdatabase

This will provide the installation of the correct
chart of accounts at the installation of Accounting

Use the provided login as the admin login,
and set the email on the partner
if the login set is an email

Set the country on the company (and its partner)
The countries are parsed from XML country list

We take the opportunity to repair the `label for`
which bind the label with the input only if
the `id` attribute of the input is set with
what is set in the `for` attribute of the label
2016-05-17 12:40:47 +02:00
Aaron Bohy 977db823c7 [REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

Mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files
2016-04-21 15:21:39 +02:00
Yenthe 91163c8c1e [IMP] web: add restore database option on fresh install
Closes #11393
Closes #11080
Fixes #11079
2016-03-18 09:58:00 +01:00
Antony Lesuisse 3cba55d7a7 [IMP] web: web 1.0 database manager
Implement the database manager with plain HTML forms and HTTP controllers.
2015-08-01 18:04:14 +02:00
Arthur Maniet f45904f581 [REF] web: move barcode_events to module barcodes
If the module barcodes is installed, a BarcodeEvents singleton is
automatically instanciated. It listens to keypresses and, when a
sequence of keys represents a barcode, it broadcasts a 'barcode_scanned'
event on core.bus containing the barcode string.
2015-07-30 07:55:45 +02:00
Christophe Matthieu d74e0c3e9d [FIX] web: database_manager.html include cleditor
The cleaditor.js library no longer exists.
2015-07-22 12:15:25 +02:00
Christophe Matthieu 264bb780a1 [IMP] web: web modules return readable logs and phantomjs logs
boot.js log:

* ``Missing dependencies``:
  These modules do not appear in the page. It is possible that the JavaScript
  file is not in the page or that the module name is wrong
* ``Failed modules``:
  A javascript error is detected
* ``Rejected modules``:
  The module returns a rejected deferred. It (and its dependent modules) is not
  loaded.
* ``Rejected linked modules``:
  Modules who depend on a rejected module
* ``Non loaded modules``:
  Modules who depend on a missing or a failed module
2015-07-22 12:15:25 +02:00