This is a rather large change for developers: from this commit on, we
need to use debug=assets instead of just debug to split assets.
The About menu has been slightly improved as well (the link does not
appear when we are already in debug mode), and an option has been added
in the debugging menu to activate the assets debugging mode.
After a refresh or when opening odoo in a new tab, if view_type="form" is
specified in the url, RPCs to load the default multi-record view will be
performed if/when the user clicks on the breadcrumbs.
Moreover, the view manager is directly initialized with the res_id to load
after a refresh on a form view, to prevent the form view to fetch the defaults
values, to render in 'create' more, and then load the requested record and
switch back to 'view' mode.
Some code refactoring as well:
- don't propagate state to the view_manager, but directly the view_type and
res_id
- remove unused argument no_store from switch_mode()
- view_registry.get(): remove unused second argument
- no need to switch_mode in do_load_state() as the correct mode is now loaded
directly, even if it is a mono-record view
Also adapt code in dashboard.js according to changes in view_manager.
Always initialize a view_manager with its dataset and views, but without the
action (at least explicitely, as the action might still be given within the
options).
This is a backport of changes in enterprise to keep the view_manager's API
similar in both repository, which is required the large refactoring that will
arrive.
Commit 516b1a6c72 fixes a bug with action buttons not being displayed when they
should in dialogs. However, it makes the assumption that either $node or
this.options.$buttons exist, which is not always the case (e.g. dashboard).
This rev. moves that logic out of the views to the view_manager, and protects
the call of empty() on this.options.$buttons.
Launching a form view in a dialog thanks to target=new did not
display the action buttons (save, discard, ...). This is because
the action_buttons flag is set to false by default and the only way
to start an action with a different value is thanks to JS code (i.e.
the debug manager modals).
Now, action buttons are also rendered if the flag footer_to_buttons
is set to true (only happens when launching an action in a modal) and
that the formview does not have any footer tag with buttons to add
(so that wizard form keep replacing the action buttons by these footer
buttons).
* Remove recursive assets inclusions (i.e. assets_editor was including
assets_common, summernote, ...)
* Better construct the assets (link, then script + type attribute)
* Better include the assets (split js / css, always use t-call-assets)
* Simplifies the number of assets
* Move bootstrap js to assets common
* assets_frontend is now created by web module to allow using it on the
connexion page but also in the web_editor, where colors have to be
bootstrap/theme ones. Note: if a module depends on website, then keep
using the inherit_id="WEBSITE.assets_frontend"
* Convert some CSS to LESS
* Split/Join LESS files
* Remove duplicates between website and web_editor
* UI improvements
* Allow simple customizations thanks to LESS var&mixins for website
The copied textarea used in autoresize was a valid target for focus when
using the tab key. This is a major issue in editable list views,
because when the user leaves a textarea, the list view jumps up, with no
visible focused field.
Translated text is stripped of starting and ending spaces on Transifex which
makes the result text look bad (as translators do not put spaces in their
translation either).
Add explicitely a space to be sure it's present in the translation.
Will have no effect on English as it's HTML
By setting the information returned by read_companies on the session
information, we are able to remove the rpc call and the willStart
method definition
Also: Set a debounce on SwitchCompany widget to avoid multiple RPC
If the RPC fails, the deferred is never resolved nor rejected,
so the deferred given by willStart will stay in a 'pending' state
As the deferred is expected to be resolved or rejected to launch the
systray to continue, we have to catch this case too.
When clicking on a pivot view cell, the gotten view were default views.
For example when on the opportunity pivot view, after clicking on a cell
we we would get to the crm.lead default view instead of the opportunity
one.
This commit keep references to current action views when clicking on the
cell.
closes#10768
opw-668472
If the user has multicompany rights and more than one allowed
companies, the full company name is displayed in the topbar. When you
click on it, there is a dropdown with the name of the other companies.
Clicking on another company name makes you switch on it and reload the page
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id which will get us an xmlid
instead.
But the data about related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.
It is in this data that the /id will be appended for the field, but when
getting a saved export list, this data may not be available.
This commit immediately add the `/id` when a field is put in "Fields to
export" column, so this inconsistency is no more.
closes#10640fixes#10327
opw-665994
When editing a line, leave the buttons visible.
Also remove the 3px gap between fields so that readonly field texts
does not move when entering the edition mode.