Commit Graph
6544 Commits
Author SHA1 Message Date
qsm-odoo 86c399f3bd [IMP] web: New notification system
Backport of the Notification system
2015-07-23 10:51:12 +02:00
Aaron Bohy a500f3b01b [IMP] web(_kanban): accesskeys for switch buttons
More elegant solution to add accesskeys on switch buttons for list, kanban and
form views.
2015-07-23 09:25:18 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Matthieu b6ddfe617f [FIX] base, web : move apps.js from base to web
'base.apps' JavaScript module 'require' the web widgets. This module is only useful if web is installed.
2015-07-22 12:15:25 +02:00
Christophe Matthieu 242e5231f0 [FIX] web, mail: move 'mail.compatibility' in mail
'mail.compatibility' javascript module require 'mail.mail'
2015-07-22 12:15:25 +02:00
Christophe Matthieu fe0885f28a [FIX] web: move 'web_kanban.Many2ManyKanbanView' in web_kanban
'web_kanban.Many2ManyKanbanView' javascript module in web require 'web_kanban.KanbanView'
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
Christophe Matthieu 71732dceb6 [IMP] web: module can be asynchronous loaded if it return a deferred
Each module can return a deferred. In that case, the module is marked as loaded
only when the deferred is resolved, and its value is equal to the resolved value.
The module can be rejected (unloaded). This will be logged in the console as info.

Remove if_dom_contains from the website, the modules return a rejected deferred if
the DOM doesn't contains the seleted values.
2015-07-22 12:15:24 +02:00
Yannick Tivisse a4417a960b [FIX] web: Secondary left menu items with action are displayed in blue instead of the others, which are displayed in purple. 2015-07-17 17:12:27 +02:00
Aaron Bohy 16eb36ff45 [IMP] web: use a classname to show/hide widgets
The problem of $el.show()/hide() is that calling show() on a jQuery element on which
there is no display rule in the stylesheet automatically sets 'display: block'.

However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet
applied, meaning that calling show() will set its display to block (in inline style),
even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the
priority over the stylesheet, the correct display won't be applied, even when the widget
will be appended in the DOM, resulting in a possibly broken layout.
2015-07-17 09:53:30 +02:00
Yannick Tivisse 63567e2b5a [IMP] web : added shortcuts to jump between views 2015-07-16 17:16:58 +02:00
Aaron Bohy a0ddaf8b84 [IMP] web: trigger an event when webclient is ready
The main purpose of this commit is to be consistent with the enterprise edition,
in which the event 'DOM_updated' is triggered when new content is inserted in
the DOM. This way, addons that need to know when a view has been attached in the DOM
(e.g. web_tip) can listen to this event and will work fine with both editions
of the web addon.

With the actual structure of the webclient (action_manager, view_manager),
there is no easy way to decide whether or not a view is attached in the DOM,
because every rendering is performed in a detached element. For instance,
when a view_manager instantiates a new view, it appends it in its $el once
the view is ready, but it can't know if its $el is attached in the DOM (it is
only the case if the view_manager is the current action of the action manager).

This rev. introduces utility functions to centralize the appending/prepending of
content, so that an event can be triggered (at a unique place) when the content
is really in the DOM. These functions are used by the the action_manager and the
view_manager.

Another change is that the action_manager keeps the view_manager informed when
they are attached in/detached from the DOM, through the variable is_in_DOM.
2015-07-15 13:32:58 +02:00
Aaron Bohy 27df65c878 [IMP] board,google_spreadsheet,web,web_calendar: Favorites menu
Adapt the Favorites menu so that addons appending stuff in it are compliant with
the enterprise edition.

Mainly, creation of dashboard.less from of dashboard.sass so that we can use mixins
defined in the web addon.

Some changes as well in the dashboard view to make it compliant with the enterprise
edition.

Use correct naming convention: classnames with underscores, less mixins with hyphens.
2015-07-15 13:32:56 +02:00
Christophe Simonis d215a08db1 [MERGE] forward port of branch 8.0 up to 86d7f52 2015-07-14 15:57:39 +02:00
Christophe Matthieu dcbd66a3eb [IMP] boot.js: use console.error instead of console.warn to make the runbot in red when there's an error in a javascript module 2015-07-14 11:43:24 +02:00
Christophe Matthieu 809cdbb153 [IMP] web: use a mutex on the object instead of create one in the send_commands method: no crossed change values, keep internal_dataset_changed for other widgets (like editable list) 2015-07-13 11:50:32 +02:00
Christophe Matthieu 66025268e1 [IMP] web: AbstractManyField: add a feature: if the widget receive a write command without link to the record previously, automatically add the record id into dataset ids. 2015-07-13 11:50:32 +02:00
Nicolas Lempereur 0511b9af83 [FIX] web: m2m tags overflow when too much tags
If too many tags (or too long tags) where present in a many2many tags
widgets, it could go over the field and cover other thing in the UI.

Now the field size expands with the content (and in a way it is more
visually similar before and after 'Edit' so it is nice).

closes #7579
opw-644236
2015-07-13 10:37:31 +02:00
Christophe Simonis 4a2aee45be [MERGE] forward port of branch 8.0 up to 9654b54 2015-07-10 17:12:57 +02:00
Christophe Matthieu 087fd6942b [IMP] web_editor: add test translator 2015-07-10 17:00:15 +02:00
Christophe Matthieu 92983cfede [IMP] tour: add log attribute on run method and add getHandlers on jQuery to display the list of handler when the tour try to trigger event 2015-07-10 17:00:15 +02:00
Christophe Matthieu 9665882fba [IMP] web_editor: adapt css, js and xml to use web_editor 2015-07-10 17:00:12 +02:00
Christophe Matthieu 25d5bb855c [IMP] web: remove cleditor html field and use web_editor (with 'style-inline': true to send email) 2015-07-10 17:00:12 +02:00
Christophe Matthieu 8c559044a5 [IMP] web_editor: split website into web_editor (to use editor in backend for html field) and website 2015-07-10 17:00:11 +02:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
qsm-odoo fc3b25cefd [MOVE] web, website_*: select2(-bootstrap) in web and assets-common
* select2 was linked in both backend and frontend (by web and website)
* select2-bootstrap was in website and linked only in frontend but it
  is in fact needed in backend too

+ Remove useless link of the lib by other modules
2015-07-09 16:27:24 +02:00
Pankaj Joshi 03592e1c73 [FIX] account, mail, web : replaced broken glyphicons with font-awesome icons and updated css/scss file accordingly 2015-07-08 17:11:18 +02:00
Holger Brunn f204c76f23 [FIX] web: keep the context we got in Many2ManyDataset
This bug causes binary fields in many2many lists being presented as a data url,
even though bin_size is passed.

Closes #6966
2015-07-08 13:42:59 +02:00
Goffin Simon 1c1593eae2 [FIX] web: lunch filters
When you clicked on "Search more" to add a product in your lunch order,
the default filter didn't appear because the wizard didn't contain an action id.

Introduced by 5cd78b8
The bug solved by this commit didn't appear without the commit.

opw:643951
2015-07-08 08:47:50 +02:00
Christophe Simonis fe92deaa1d [MERGE] forward port of branch 8.0 up to 2de301d 2015-07-07 18:13:57 +02:00
Aaron Bohy 20ed190429 [REF] web: ControlPanel
Adds the option clear so that, if set to false, only some elements of the
control panel can be updated while keeping the other ones unchanged.
The breadcrumbs can then be updated by simply calling update_control_panel(),
instead of triggering a specific event to do it.

A bit of documentation and refactoring as well, mainly for the
breadcrumbs to be handled as other control panel's elements.
2015-07-07 16:43:01 +02:00
Aaron Bohy 81ffa75944 [FIX] web: many2manytags: hidden if empty and readonly
In edit mode, if this field is readonly and empty, its main div has
height 0 but its border is displayed. This rev. simply hides the field
in this case.
2015-07-07 16:43:01 +02:00
Nicolas Martinelli b4efb4eeb3 [FIX] web: on calendar with date and time, focus in the field only when hidden
The behavior of the datetime widget was to focus in the field every time a date
is chosen. This causes an issue if the datetime widget is called from an
editable list. Indeed, the list editable will consider that the value has been
set, and therefore the value will not be changed anymore if the user choses
another date.

The new behavior is to put the focus only when the date picker is hidden,
therefore the editable list will consider the value set only when the selection
is done.

opw-644062
Fixes #7463
2015-07-07 11:19:27 +02:00
qsm-odoo fe1541abeb [FIX] web: many2manytags - empty value when selected
The input value was not removed once the user added a tag
2015-07-07 10:44:15 +02:00
Aaron Bohy 7f65415393 [FIX] web,web_tests: delete button in editable list views
Use a fontawesome icon instead of no more supported mnmliconsRegular.
2015-07-06 16:27:38 +02:00
Nicolas Lempereur b5d7e663b4 [FIX] web: readonly field and tab
When we go from one field to another via the tab key, in the form view what happens is:

{{we get a blur from the current field}}
-> if [[widget was not in state clicked (which can be gotten for example by clicking on a focused field)]]
     -> blur event is cancelled,
     -> the blur event is set to be triggered soon
-> the clicked state is set to false

{{we may get a focus for the next field}}
-> if [next field get an onfocus event]
     -> blur event is cancelled,

So if :
- the state is not clicked and,
- the next field don't get an focus event.

We get a blur event which will either save (if a field value has been changed) or cancel
the form view editing and will hide the current edition, hence losing the focus.

For example, it happens on a readonly fields with  field containing an `<a />` tag, on
some browser (for example google chrome), the focus event will not get triggered (it still
work if we were in a clicked state) so we can't cycle thought a list editable cells if there is a readonly field in it.

closes #7446
opw-643718
2015-07-06 11:55:01 +02:00
Jeremy Kersten 1516b11596 [IMP] web: update bootstrap from 3.2.0 to 3.3.5 2015-07-02 15:44:02 +02:00
Holger Brunn 0cffd6f825 [IMP] web: make many2many tags inline block without wrapping
Better look when using long words in tags

Closes #6963
2015-07-02 14:33:11 +02:00
Aaron Bohy 3bb35d68b6 [FIX] web: x2many fields: set_value(): missing return
The set_value() function of x2many fields is asynchronous. When a record is
loaded, the invisibility changers (IC) are evaluated once set_value() has been
performed on every fields. As set_value() didn't return its deferred, the IC where
evaluated with wrong values. It produced in particular the following bug:

Go to Customers > Agrolait (the Contacts tab is displayed), switch to next record,
which is the first contact of Agrolait. The Contacts tab is still displayed,
whereas it should not (the invisible condition being is_company == false and
child_ids == [], i.e. there is no contact).

Also call this._super() in set_value() of AbstractManyField instead of
duplicating the function of its parent.
2015-07-02 14:04:42 +02:00
qsm-odoo 93013eca6d [FIX] ProgressBar
Leaving edit mode was impossible if the value was not changed
+ Remove use of PropertiesMixin
2015-07-01 15:35:19 +02:00
Aaron Bohy c5f3debc32 [FIX] web: FormViewDialog: multi select option
Before this rev., the multi_select option wasn't enabled even by setting
disable_multiple_selection to false in the options, when the res_id key
wasn't defined in options (null != undefined). It was the case for every
X2Many views, except for the Many2ManyKanban view as we explicitely set
the disable_multiple_selection to false AND res_id to null. However, all
X2Many views should enable this option.
2015-07-01 15:27:53 +02:00
Aaron Bohy b601ec66ca [IMP] web,mail: use of Modals to confirm changes discard
instead of the browser confirm dialogs, for the sake of uniformity.
2015-07-01 11:36:32 +02:00
Aaron Bohy 3a511aaa70 [IMP] web,web_kanban: Dialog.confirm api
takes now an object of options for the Dialog, containing two possible
callbacks (for confirm and cancel).
2015-07-01 11:36:31 +02:00
Aaron Bohy d6afe624eb [REVERT] web,point_of_sale: cordova integration
introduced by forwardport: a304194936
initial commit in 8.0: 19eda68547
2015-06-30 15:46:08 +02:00
Aaron Bohy d3398b4996 [REF] web,pos: font dir renamed for enterprise compatibility 2015-06-30 15:46:08 +02:00
Christophe Simonis b16fd16e90 [MERGE] forward port of branch 8.0 up to 7d01029 2015-06-30 15:29:03 +02:00
Aaron Bohy 9d121cd9ec [FIX] web: One2ManyKanbanView: reload view on create
Before this rev., the One2ManyKanbanView wasn't reloaded after creation of a
new record (on dialog close).
2015-06-26 13:48:37 +02:00
Aaron Bohy 230af35154 [IMP] web: ViewManager for One2Many and Many2Many fields
This rev. generalizes the notions of FieldOne2Many to FieldX2Many and of One2ManyViewManager
to X2ManyViewManager. The same logic is now applied both for One2Many and Many2Many fields.
This allows Many2Many list and kanban views to have a pager, as the pager is instanciated
by the view, on demand of the ViewManager.
2015-06-25 15:44:42 +02:00
Aaron Bohy 5490aad0c9 [FIX] web, sales_team: many2many kanban: cards style + clickable
Apply the same style to many2many form_field as for one2many ones.
Make the sales_team cards for team members clickable.
Add "position: relative" to sales_team cards for the cross to be correctly
positionned. Inline style is not the right way to do it, but for the sake
of consistency, it is ok. A better commit should come to remove this inline
style from all x2many kanban templates.
2015-06-25 15:44:42 +02:00
Stefan Rijnhart 33a65c2b8e [FIX] web: binary fields in one2many widgets
Don't retrieve the binary contents just to display the size, but pass context
with bin_size=True instead
Always pass filename in download link

Combination of patches from the bug report from Enrico Ganzaroli, Cedric Le
Brouster and Holger Brunn
Fixes #4899, lp:1167429
2015-06-25 11:45:47 +02:00