Commit Graph
1418 Commits
Author SHA1 Message Date
Mathieu Duckerts-Antoine 47395c6e51 [IMP] web: allow using many2one as measure in pivot view
With this commit, we add the possibility of using many2ones as measure.
The way a many2one is aggregated is by using the count distinct
operator.

Some care had to be done to gracefully support the situation when a
pivot view is grouped by a m2o field F, and the same field F is used as
a measure.
2018-04-10 17:41:12 +02:00
Vincent Schippefilt bc1bba446a [IMP] web: keyboard navigation in kanban view
1. Added the ability to navigate within the kanban view using UP,
        DOWN, LEFT and RIGHT keys.
    2. By defaults, the focus should be set on the search input field.
    3. From the search input field, using the DOWN key, the focus goes
        to the first card of the kanban
    4. From the search input field, using TAB key, the focus goes to the
        create button
    5. From the create/import buttons, using TAB or DOWN key goes to the
        first card of the kanban, then UP and DOWN keys moves the focus
        from card to card in the same column or if it is not a grouped
        view from left to right.
    6. In grouped view, LEFT and RIGHT keys moves the focus to the next
        column
    7. When on a card, hitting ENTER opens the view of that card.

Not included in this commit
    1. Memorize the position on the kanban when opening an card, than restoring
        when going back to that kanban
2018-04-10 09:39:08 +02:00
Vincent Schippefilt a4d00a56b6 [IMP] web: auto-assign and show access keys on ALT
This commits aims at adding an accesskey (a shortcut) to all buttons
in odoo. This is done by either by assigning an accesskey in the view
XML or by automatically assigning a key to the buttons using the first
available (not yet assigned as a shortcut key) letter of the text of the
button, failing that we use the latin alphabetical order to find the
first unused key.

Included in this commit:
    1. Using the ALT key, automatically assign
    2. When the ALT key is pressed, show the assigned shortcuts
    3. Assign a number to the menu items (enterprise)
    4. Activate number accesskeys without using SHIFT
    5. Extra logic to support the activation of the alphabetical
        accesskeys without needing to add the SHIFT key in the key
        combination (except for Firefox on linux)
    6. Assign a fixed accesskey to the search field

Not done:
    1. Executing the primary action on dialogs using SHIFT+ENTER
    2. Show the input using TAB on the appswitcher screen

Things to consider:
    1. Fixing more access keys on forms that share the same features
        (b.e. Validate in customer invoice and vendor bills)
    2. Not assigning keys to the chatter section
2018-04-10 09:39:08 +02:00
Vincent Schippefilt 02a063fd73 [IMP] web: keyboard navigation in form view
The goal of this commit is to allow fast entry of the same model using
the keyboard for navigating through the form once, by blocking the user
from advancing in the form if there is a required field or once they
went through the form once to get them to a primary action (button)

This commit includes the following changes
    1) Enable moving forward from field to field using the TAB key
    2) Entering the one to many and many to many using the TAB key
        a. When entering it, set the focus on the "add new line" link or
            button
		b. When adding a new line, set the focus on the field visible
            editable field of the new line
        c. Discard adding a new line with ESC key
        d. If the user leaves the first field empty and uses TAB, we
            will cancel the adding of a new line and move to the next
            field of the form
    3) When a field is required and not filled in, do not allow the user
        to move out of the field using the TAB key (the user is still
        allowed to use the mouse though), mark the field as invalid
        instead
    4) After going though the form once, using the TAB key on the last
        field will move the focus to the first primary button of the page
    5) When the focus is on a primary button (EDIT/SAVE), the user cannot
        move the focus forward using the TAB key. Hitting TAB again will
        display a tooltip telling to hit ENTER to activate the button.
        The mouse is still available to move the focus.
    6) When the user saves, the focus is placed on the first primary
        button of the form renderer (like VALIDATE for a new invoice)
    7) On dialogs, primary buttons should stop the users from moving out
        of them, and showing a popup if the user tries
    8) When closing a dialog, the focus will be moved back to the widget
        that opened it.

This commit does not include the following features
    1) Navigation with the keyboard on a selection one to man
    2) Navigate between tabs in a form using the keyboard
    3) Cancelling the adding of a new line in a many to many using the
        ESC key do not set the focus correctly
    4) Enhancing the focusses fields (like blue underline)
2018-04-10 09:39:08 +02:00
Martin Geubelle 6676c3b189 [IMP] web: override size attributes in image widget
Size attributes (e.g. `max-width`) are sometimes set in css (i.e. with classes,
see `oe_avatar`).

They must however be overriden if they are specified on the widget.

Example:
  <field name="image" widget="image" class="oe_avatar" options="{'size': [180, 180]}"/>

The `max-width: 90px` set on oe_avatar must be overriden in this case.

Note that the attribute `img_width` and `img_height` have been depreciated as
`width` and `height` are fulfilling the exact same purpose.
2018-03-28 14:02:00 +02:00
Christophe Simonis b51f2d38c2 [MERGE] forward port branch saas-11.2 up to 500e3f4970 2018-03-21 11:04:48 +01:00
Christophe Simonis e0345a4a3f [MERGE] forward port branch 11.0 up to 2835d29979 2018-03-20 11:45:11 +01:00
Luis González 2835d29979 [FIX] web: Make top bar's menu items navigable when using the keyboard (#23732)
Sidebar's menu items are not currently reachable when using the
keyboard, because they are missing the attribute `href`, thus are not
indexed for tabbing navigation.

This change causes that attribute to be included, so the menu items are
reachable and navigable when using the keyboard.
2018-03-20 10:33:40 +01:00
Luis González baa1c515c5 [FIX] web: Add missing HTML attributes aria-* (#23752)
Some HTML attributes were missing, and are required to ensure good
compatibility with screen readers.

The following attributes are included:
- `aria-expanded`: this should be present in all dropdown menus
- `aria-label`: this should be present in all links and buttons which
  don't show text, but icons or images.
2018-03-20 10:29:17 +01:00
Aaron Bohy a0b06afcf3 [FIX] web: 'toggle_button' widget in edit mode
The 'toggle_button' widget is one of special field widgets that
can trigger changes in readonly mode (in this case, toggle the
boolean value when clicked). It was working fine in form views in
'readonly' mode, as in this case, the new value is saved directly,
and the form view is re-rendered (a new widget is created with the
new value).

However, in 'edit' mode, the value isn't saved directly (the user
has to click on 'Save' to save the changes), the widget is reset
with its new value, and the reset wasn't correctly handled in this
particular widget.

Fixes #23400
2018-03-12 12:56:00 +01:00
Christophe Simonis 0f57bdba72 [MERGE] forward port branch saas-11.2 up to 42659dc70c 2018-03-09 16:25:58 +01:00
Christophe Simonis 36945a5853 [MERGE] forward port branch 11.0 up to c2e878e34c 2018-03-01 19:43:25 +01:00
Aaron Bohy 462c3956d9 [FIX] web: NotificationManager: warnings style
Warnings are styled a bit differently than notifications, as their
background is red (thanks to classname 'o_error' on the warning
root element). This classname isn't correctly added since rev.
920df59, which changed the root element of the 'Notification'
template, which is extended by the 'Warning' template, making
qweb.js fail to add the 'o_error' classname.
2018-02-27 14:31:02 +01:00
Christophe Simonis a0d7763e09 [MERGE] forward port branch saas-11.2 up to 932e641be1 2018-02-23 17:20:52 +01:00
Alexandre Kühn aa8745f1a8 [FIX] web,*: various nocontent helper fixes
* account, board, hr_holidays, mail, sale, website_sale

Small fixes on nocontent onboarding screens.

Initial commit: https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417

Details:

- list: centered;
- pivot/graph: centered + empty folder face;
- Dashboard app with nocontent helper;
- Discuss inbox/starred: centered without neutral/smiling faces;
    => no faces because it's too much with animated
       rainbow man when emptying the any of the boxes.
- hr_holidays: fixed onboarding screens;
- (technical) dropped obsolete 'o_view_nocontent_container' style;
- manual reconciliation 'nothing to reconcile': centered + inside form sheet;
    => renamed account's o_view_nocontent to o_view_noreconciliation,
       so that it doesn't use the style of views.less.
- kanban: nocontent helper above the columns (if any);
- texts "no order to upsell"/"abandonned cart" paragraph split in two.
2018-02-16 10:23:01 +01:00
Martin Geubelle a7b521fe44 [MOV] web, mrp: move pdf_viewer widget
This widget is generic enough to be used in other modules than mrp so
we move it in the web module.

Closes #22569
2018-02-12 11:16:21 +01:00
jpr-odoo b7aa439826 [ADD] web: Add a new widget to attach documents on a record
Purpose
=======

Add the possibility to easily attach a document on a record. That could be used for to attach receipts on expense for example.

Specification
=============

Add a new widget (AttachDocument) to allow attach document from mobile/web directly on record form

After attaching document it will call action given on widget, that action will be a method name on given model
2018-02-09 06:59:56 +01:00
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00
Aaron Bohy 32b8cec536 [REF] web,*: ActionManager/ViewManager refactoring
This rev. is the first part (out of 3) of the refactoring of the
ActionManager and ViewManager layer of the webclient.

The main changes are:
  - there is no ViewManager anymore, its work is now handled by the
    ActionManager itself, but isolated in a specific file ; this
    eases a lot of things, as the breadcrumbs handling for example.
  - the ActionManager code is converted to the new coding principles
    and guidelines ; mainly, children widgets communicate with it by
    triggering events up, and not by function calls anymore.
  - the ActionManager layer is now testable, and a lot of tests have
    already been written.
  - the code in other addons has been adapted consequently.

What's coming next:
  - introduce the 'AbstractAction' Widget, and make client actions
    and view controllers inherit from it ; this widget will
    implement a common API that could be used uniformly by the
    ActionManager (e.g. restore(), canBeLeft(), renderButtons(),
    getTitle()...).
  - move the ControlPanel handling from the ActionManager to the
    AbstractAction.
2018-01-16 20:49:19 +01:00
Christophe Simonis 56974322f8 [MERGE] forward port branch 11.0 up to 3b80a059ff 2018-01-12 19:03:00 +01:00
Alexandre Kühn 7813a8e714 [FIX] web: binaryfile field in list views
Revert partially 255e8ca3d9

Removed widget 'download_link', as it was a sub-version of widget 'binary':
it did the exact same thing (representation of binary fields by means of a download link)
in a much better-looking way (download icon + filename as text of the download link,
instead of just a download link with text "Download").

Also, the values of binary fields might be already a human-readable binsize (e.g. 2.52 MBs),
instead of its plain textual string representation in base64:
The contextual parameter 'bin_size', when set to true, does not download the data of binary fields.
As a consequence, the server provides the sizes of the binary, instead of their value.
2018-01-12 16:12:49 +01:00
Christophe Simonis 228ecdbe28 [MERGE] forward port branch 11.0 up to ff0abd214c 2018-01-10 11:41:35 +01:00
Christophe Simonis 6e25eb9b05 [MERGE] forward port branch saas-16 up to 4c410ee6a1 2018-01-09 17:03:07 +01:00
Martin Trigaux 4637bdf9bf [FIX] web: properly format translatable string
'Edit <type>View' makes untranslatable content as it is split in 3 and the type
is not translated. e.g. 'Editer FormVoir'
2018-01-09 11:23:18 +01:00
Alexandre Kühn 255e8ca3d9 [FIX] web: binary field format in list view
Binary fields were simply shown simply by their textual representation in list views,
e.g. the base64 string.

There was no formatter for binary fields, therefore it has been implemented so that
it displays its estimated size.

Binary fields in list views had a download link in v10.0.
We provide this feature back by means of a widget called 'download_link'.
It is also possible to define an option to set the field name having the filename as its value.

Example:

    <tree>
        <field name="fname"/>
        <field name="datas" widget="download_link" options="{'filename': 'fname'}"/>
    </tree>

with the following record: {fname: 'document.txt', datas: 'Cg=='},
we get a file named "document.txt" by clicking on the download link.

Closes #21996
2018-01-08 10:17:44 +01:00
Nicolas Lempereur bc8f7a44d6 [FIX] mail,web: adapt email in m2m tags b92aaf1
Adapt commit b92aaf1 for framework changes in saas-16.

That commit made Many2ManyTagsEmail widget display name_get gotten
dynamically. This allow to have 'show_email' context key working and
having the email displayed.

This commit use the new views (as of saas-16) to do the same change.

opw-801558
fixes #21812 fixes #21523
closes #21969
2018-01-04 18:09:56 +01:00
Christophe Simonis 29590a61cd [MERGE] forward port branch 11.0 up to 8fb25e185b 2017-11-28 16:57:58 +01:00
Martin Geubelle aad9a1593f [FIX] web: correctly display modifiers in tooltip
Since odoo/odoo@da136d8 the modifiers in the widget attrs are parsed.
`stringify` thus needs be to used when displaying them in the debug tooltip (to
avoid to display [Object object]).
2017-11-22 16:47:29 +01:00
Alexandre Kühn 23e6dd36d7 [IMP] web: hide in kanban tag's color (#20815)
New feature:

   - New Transparent tag visual (grey border & text, white bg),
   - By default, newly created kanban tags are transparent,
   - Tag's colorpicker has now a 'Hide in Kanban' checkbox,
     to select the transparent color.

Toggling off 'Hide in Kanban' sets the color of the tag as follow:

   - Previous color, if 'Hide in Kanban' was toggled on on the
     same formview session.
   - Color 1 (dark orange), otherwise.
2017-11-20 10:47:43 +01:00
Christophe Simonis ebb6d1e740 [MERGE] forward port branch 11.0 up to 350973ff36 2017-11-10 14:15:02 +01:00
Aaron Bohy 9bc5009481 [FIX] web(_editor): enable mobile tests
This rev. introduces a new test suite meant to test the webclient
components on mobile devices. The key 'config.device.isMobile' is
forced to true in this test suite, so that mobile specific JS files
are properly executed, which isn't the case in the classic JS test
suite (setting isMobile to true in the test definition is too late,
as the JS files are already processed).

For now, this new test suite contains a single test, which was
skipped until this rev. as it couldn't be executed in the classical
JS test suite.

Both suites are executed at each build of the runbot, and they
can be manually executed from the webclient as well (via the debug
manager).
2017-11-10 10:24:42 +01:00
Christophe Simonis de987831da [MERGE] forward port branch 11.0 up to d70518d04f 2017-10-21 15:22:36 +02:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Martin Geubelle 1312ee72cf [FIX] web: correctly render the field image
Before this commit, the image was directly built without using the corresponding
template, which set some properties on the image (class, width, etc.).
2017-10-20 11:04:08 +02:00
Dhawal Limbuwala 3ad9ee7055 [IMP] web: Improve alert banner to update translations
Purpose
=======

Simplify / reduce the warning message when we update a record in multi-languages

Specification
=============

1/ Make the translation banner little bit lighter in design
2/ Make it still visible when coming back from breadcrumb
2017-10-19 10:10:06 +02:00
Khoi Nguyen 28491aac45 [IMP] web: Regenerate assets from debug menu
This commit adds a "Regenerate Assets Bundles" entry in the debug menu,
whose role is to unlink all assets from ir.attachment, forcing their
regeneration.
2017-10-18 16:52:41 +02:00
Lucas Perais 6c9e45576e [FIX] document: display create_date of attachment timezone aware (#20242)
Before this commit, when putting the mouse over an attachment in the attachment drop menu list, the date time displayed was UTC only.
After this commit, we convert that value to the correct timezone datetime.

OPW 776704
2017-10-18 14:25:22 +02:00
Géry Debongnie 5b465611a0 [REF] web: remove dead template/code/files
We sometimes need to clean up stuff.  I am actually surprised that there
were no more dead templates.  We should do the same for css/less.
2017-10-18 13:31:17 +02:00
Christophe Simonis 1da064a1d3 [MERGE] forward port branch saas-16 up to 8ee9024a4c 2017-10-13 13:13:11 +02:00
Deep Patel 811f7ca388 [FIX] res_config: Don't lose left panel when clicking on links or actions
1/ Lint
2/ Follow new .js guidelines (mainly re-sequence function alphabetically)
3/ Introduce BaseSetting.SearchHeader template for search header instead of replicating html code
4/ Add some comments in code
5/ When we close a modal or come back using breadcrumb, left panel is lost and all the settings are displayed. This commit fix the issue
6/ Remove the fact that the current app is in top of the app list
7/ Improve search
2017-09-29 11:46:31 +02:00
qsm-odoo 2506a9564b [FIX] web: review UI tag color system
- Kanban colors and tag colors are now the same
- Tag color 0 (default) is now back to be the invisible kanban one
- Same colorpicker for kanban and tags
- Define correct number of colors (12 not 13)
- Color 0 should be a neutral one (gray)
- ...
2017-09-28 13:29:56 +02:00
Aaron Bohy 628c19d8c3 [REF] web: preliminary work for the mobile Burger Menu 2017-09-25 13:29:17 +02:00
Yannick Tivisse af2620a443 [IMP] web: reference field: add 'hide_model' option
It allows to see only records from a given model without allowing to
change the model. It gives a better experience to users that choose
records using a reference field when the model comes from some other
choice and should not be changed.
2017-09-15 15:56:23 +02:00
Mitali Patel ad79fed261 [IMP] im_livechat: add copy to clipboard for the website live chat widget code
This commit adds 2 buttons to copy directly the code needed to add the livechat
in the website.
2017-09-14 10:54:00 +02:00
qsm-odoo cf4f357647 [REF] web: review form view layout
The goal of this review is to have a layout which is correct to
implement the enterprise side-chatter.

This also removes/fixes deprecated community rules and xml templates.
2017-09-06 17:52:24 +02:00
stefanorigano 1f78ae3c18 [REF] web, mail: change minors top-menu design
- Remove carets
- Fix badges position
- Vertical align user avatar
- If a dropdown is open, the menu-toggle should appear active
- Dropdown menus' widths should be at least as the dropdown-toggle
2017-09-05 12:13:55 +02:00
Deep Patel 898224f110 [IMP] web,account,...: Regroup settings, add a nav and search bar
Purpose
=======

Settings are often way too long and hard to scan and sometimes you don't know where to find the settings you're looking for.
By adding a left navigation, you can already have an overview of the settings, and switch easily between them.

Specification
=============

- Add a search bar on all the apps that have settings which can search results from all the installed apps.
  (If i'm on sales settings,and I search anything then it shows results from sales settings and also shows
  all the other matching results from all the other apps such as, Inventory...etc) with app name.
- Able to activate feature from the current page results (no matter if the searched result is from another apps).
- Highlight searched word in results
- Delete the sheet, have a full white background
- Add left navigation bar on setting
- Left navigation bar fixed
- List displayed based on installed apps
- On right panel, by default display current app setting and change accordingly
- [Mobile] Left navigation bar displayed on top
- Add Breadcrumb on top of the page: have the name "Settings" + Save / discard CTA + Search
- Add General Settings on the nav bar
- remove "save this page..." notif in all settings
- Delete all recommanded apps section + all checkbox that install app should disappear:
	payroll: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrSkMzWVpuZ0ZoaFE/view?usp=drivesdk
	Events: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrYXlHMHd2NTM2blE/view?usp=drivesdk
	Manufacturing: Delete Repair - Quality Control - Maintenance - Product Lifecycle Management [LAP][ok]
	Timesheets: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrdFg5XzNydkd2TlU/view?usp=drivesdk
	project: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrraWo3NE04TktwcTQ/view?usp=drivesdk
	inventory: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrQkRaVUR5ekFQYTQ/view?usp=drivesdk
	recruitment: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrbDdqLWQweF80UkE/view?usp=drivesdk
	purchase: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrRlAyUDBnb0trQWs/view?usp=drivesdk
	email marketing: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrOUZONjhvX2k3Y2s/view?usp=drivesdk
	expenses: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrR0JpN1ZpQmtxU3M/view?usp=drivesdk
	attendances: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrralpjZ1VJclNpMWs/view?usp=drivesdk
- About duplicate settings:
	Docsaway: Delete from Sales + delete Default Print Provider
	Attributs & Variants: Delete from Purchases - Manufacturing
	Multi-currencies: delete from Sales
	Unit Of Measures: Delete from Purchase & Expenses
- Add a scroll bar on the left bar when there's too many apps
- Keep the navbar visible even when you search
- Move General Settings to the bottom of the list
- Update on Settings:
    - Accounting:
        - rename automatic rates
        - Anglo Saxon Account: Should be in technical feature
        - Place Accounting Reports section before Taxes section
    - CRM:
        - Phone Validation: Enforce international format becomes
        - Local Numbers: (2 radio buttons proposals) Add international prefix / No prefix
    - Fleet: typo " ... a new car if ..." + text is too long <br>
    - project: fix tooltip for colab pads
2017-09-01 13:02:54 +02:00
Christophe Simonis 017ee5eab3 [MERGE] forward port branch saas-17 up to 877e709871 2017-08-24 13:17:53 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Martin Geubelle 65ecd109a5 [FIX] web: reimplement conditions in the "Set Default" dialog
The rev. https://github.com/odoo/odoo/commit/49f0413290821cb123e75b4546873cf98edf1d25 reintroduced
the "Set Default" dialog but forgot the conditions part.

This rev. reintroduces the missing part.
2017-08-23 13:53:18 +02:00