Commit Graph
6741 Commits
Author SHA1 Message Date
qsm-odoo f137921d12 [FIX] web: formview autofocus when attached
Autofocus in formview did not work when landing on the form view in
edit/create mode. This was because autofocus was called before the
formview was in the DOM.

Solution here in community is to defer the call to autofocus.
2015-11-18 17:00:34 +01:00
Denis Ledoux 2b1b0e6d13 [FIX] web: editable list validation with several pages
This revision is related to a9d20d9fa0.

`dataset.cache` contains an item for each records, even
if the records hasn't been loaded in the cache. If a record
has not been loaded, only the record id is available, not
the other values. Thefore, this isn't possible to validate
the record values of records that have not been loaded
in the dataset cache.

opw-654013
2015-11-17 17:07:31 +01:00
Damien Bouvy d18441d348 [FIX] web: longer delay for module load warning
Warning messages are automatically displayed if a module takes more than 1000ms to load, but this delay is a bit short if you make multiple rpc calls (sorry for all the dead kittens)
2015-11-17 15:54:50 +01:00
Damien Bouvy 07fe5afc87 [IMP] web: distinction between community and enterprise version in the js framework
It was bound to happen: some functionnality need to be triggered depending on the current edition of Odoo. To do this, we add a property 'version' on the global odoo object.

This change is mirrored on the enterprise repo.
2015-11-17 13:01:09 +01:00
Adrien Dieudonné 22e94f5254 [IMP] web: better 'Odoo Enterprise' settings popup
The popup is now a bit more styled and needs less info to call our servers.
2015-11-17 13:01:09 +01:00
Nicolas Lempereur 3510ff3921 [FIX] web: update form view image after reload
6baf611d updated the image when showing the view form the first time,
but when reloading (e.g after a write) there was a difference which
would not cause the update.

second half of:
opw-654279

(follow-up of a8ae944)
2015-11-16 12:17:03 +01:00
Nicolas Martinelli 48942f1242 [FIX] web: display Warning if "Save & Close"
When a warning is triggered by an onchange, clicking on "Save & Close"
will cause the warning to be closed as soon as it is shown. This fix
prevents the saving and closing if a warning message is detected.

opw-653503
2015-11-16 08:53:04 +01:00
Nicolas Lempereur 157ce1b6e3 [FIX] web: IE Edge focus bug when delete in list
In the following situation :

 we click on an element inside a row (not the last row) which will:
 -> open an alert, confirm or prompt dialog
 -> remove the row containing the element

IE Edge would enter in a odd state where the focus is not given back to
the page, and clicking doesn't work anymore.

This fix solves this by detecting this situation and then focusing on an
input field which make IE Edge stop being crazy.

opw-653282

jsfiddle showing the issue: http://jsfiddle.net/ts8bsLLg/4/
jsfiddle showing a solution: http://jsfiddle.net/ts8bsLLg/6/

bug report on microsoft:
https://connect.microsoft.com/IE/feedbackdetail/view/1988284

note: applied in 9.0 community, 9.0 enterprise
2015-11-06 15:48:10 +01:00
Aaron Bohy b61c0d2499 [FIX] web: action manager: options of client actions
The options dictionnary given when performing a do_action is now transmitted
to the client action initialization.

This was required for the mail client action, to correctly redirect to a given
channel.
2015-11-03 16:19:35 +01:00
Géry Debongnie cd71fe6687 [FIX] web,survey: update graphs tooltip to new nvd3
with the update of nvd3/d3, the tooltip api was changed.  This commit
updates the 3 last places where we were using the tooltips.
2015-11-02 10:06:13 +01:00
Christophe Matthieu a9d20d9fa0 [FIX] web: save fields in m2m (list_editable) with attributes and check all lines
Issue: steps to reproduce:

create a purchase order
choose a supplier
choose a product
change the quantity
don't click anywhere on the form, just click on "confirm order"
you get an error "invalid field: scheduled date"

Use dataset instead of record because record can have an other value (a short for a moment due to deferred).
Use silent option to avoid onchange.
2015-10-30 12:01:16 +01:00
Nicolas Lempereur fb872f84f1 [FIX] web: no accesskey for x2m pager
The fix in 665bc1c solved the issue for pager of some X2Many widget x2m
which would shadow the accesskey to go to previous/next page of the top
view's  current model.

But in the case a web.Pager (used in community for a X2Many kanban
widget) the fix had no effect.

opw-652888
2015-10-30 08:40:09 +01:00
Géry Debongnie 329552b78e [FIX] web,account,website_links: update nvd3 to last version
This commit was necessary to fix weird problems in 9.0-nightly.
Phantomjs and the old nvd3 implementations did not play well together.

* transitionDuration() replaced by duration()
* tooltips() & tooltipContent replaced by tooltip.enable and tooltip.contentGenerator
* remove useless less for tooltip

Thanks to mge for his help
2015-10-29 22:15:44 +01:00
Christophe Matthieu 8ebe4b2d56 [FIX] web: can remove record in many2many kanban view
Wrong underscore method called.

Issue: go on customer form view, remove a contacts in the many2many kanban view and save. The record is not unlink.
2015-10-29 15:31:42 +01:00
Nicolas Martinelli 1f43fa9dfe [FIX] web: do not write twice when updating value
The issue occurs for example in the Sale dashboard, when the user
changes the target amount. If the user changes the value, then directly
clicks outside of the field, the method on_change_input will be called
twice: the first time because of the event 'change input', the second
time because of the event 'blur input'. This makes an unnecessary write,
which can cause an error due to concurrent access.

This prevents the execution of the write related to the event 'change
input' in this case. If the user changes the value but clicks on
'Enter', the focus is still on the field so the update is done
correctly.

Courtesy of Quentin Smetz (qsm@odoo.com)

opw-653086
2015-10-29 12:44:07 +01:00
Nicolas Lempereur 665bc1c935 [FIX] web{,_kanban}: too much and too little shortcuts
When several accesskey with the same key,  are defined on elements, the
last one (even if not displayed) is the one which will be actioned and
the key sequence is pressed.

This caused an issue since the "Pager" template is shared between all
elements, even the x2many relational widgets.

Also there was shortcut for Create/Save/Discard on the form view, but
those shortcuts should also be enabled in the list and kanban view.

closes #9267
opw-652888
2015-10-28 15:32:31 +01:00
Christophe Matthieu 07ce3cd4d1 [FIX] web: error on change value in o2m after an other field onchange if the o2m contains o2m
o2m editable list open a form view and can put command as default value (record[this.name] for o2m in a o2m) for the editable fields.
When the onchange is triggered, get_value create a wrong command of command.

step to reproduce issue:
* edit a quotation with at least on sale order line
* change the pricelist
* change the quantity of the sale order line

todo : remove _on_load_record in version > 9.0 and use new dataset implementation with to_delete attribute
2015-10-26 19:27:34 +01:00
Nicolas Martinelli 058db89876 [FIX] web: proper update of the dataset
The method evict_record calls _update_cache with an empty dictionary,
which will not replace any cached value. Therefore, the cache is never
cleaned.

opw-652393
2015-10-26 13:03:47 +01:00
Christophe Matthieu 6fc64aa468 [UPDATE] web: update font-awsome version 4.4.0 2015-10-26 11:43:36 +01:00
Aaron Bohy e82deb5ae1 [FIX] web: action_manager: restore internal state on rejected action
When an error occured while executing an action (e.g. access rights), the
action manager's state was inconsistent as inner_action, inner_widget and
action_stack were all updated before trying to execute the action. Then, if the
user tried to open another action, the screen was split into two because the
reference of the previous action was lost, and thus it couldn't be detached.

We now restore inner_action, inner_widget and action_stack to their previous
state in the case of a rejected deferred.

A better fix would be to update all three variables once the deferred is
resolved, but it would require a refactoring of the way the action manager
and the view manager communicate to perform the do_push_state and to compute
the breadcrumbs. Indeed, those operations directly rely on the internal state
of the action manager, and they are performed before the callbacks in
push_state are called. Such a refactoring should probably not be done in
stable.

Partly fixes #8886.
2015-10-13 11:26:22 +02:00
Aaron Bohy 1cf83427da [FIX] web: view_manager: correctly return rejected deferred
The problem was that the action manager wasn't notified at all when something
went wrong with the view manager as the deferred returned by appendTo was in
that case never resolved nor rejected.
2015-10-13 11:26:22 +02:00
Martin Trigaux 3fd6ac9385 [FIX] web: export terms of community
not enterprise + community

Fix typo in description string (was already done in enterprise)
2015-10-12 16:38:15 +02:00
Christophe Matthieu 8e245904f5 [FIX] web: many2many_tags: blacklist selected ids in the dropdown
Issue: already selected ids are not filtered in the many2one and appear in the dropdown (but can't be select because the item are already selected)
2015-10-12 12:21:22 +02:00
Fabien Pinckaers 1a58579540 [FIX] fix and improve res.config views and typos 2015-10-08 05:42:48 -07:00
Martin Geubelle 1d94b75b01 [IMP] web: more fun on wow button
Change the icon once in a while randomly
2015-10-07 10:45:33 +02:00
Danimar Ribeiro e68b304c55 [FIX] web: set the formatted date in the datepicker
Fixes #8867
Closes #8905
2015-10-07 08:27:45 +02:00
Martin Trigaux bf0c7379e2 [FIX] web: groupby -> group by
Hopefully "group by" is already translated somewhere else so does not break trads
2015-10-06 15:07:54 +02:00
qsm-odoo e7418cef22 [FIX] web: DomainEditorDialog
(backport of enterprise version)

In readonly mode, the selected domain was not correct when
click on "see selection".
2015-10-02 16:53:58 +02:00
qsm-odoo 8181a80080 [IMP] web(_editor): translate icon compatibility
Add the $translate variable for enterprise compatibility and hide it in
web editor widgets (these had already no translate icon in community).
2015-10-02 16:53:58 +02:00
Aaron Bohy 6bbbbc7aff [FIX] web: backport module web.config for enterprise compatibility
Addon mail needs to know if we are using a touch device to set or not the
focus on the chat composer. However, this information was not available in
the community webclient.
2015-10-02 15:49:10 +02:00
Christophe Matthieu c81609eb43 [FIX] web: inverse extend attributes to use the overwrite of render_cell 2015-10-01 15:35:26 +02:00
Christophe Matthieu ce30ee7066 [FIX] web: use _.clone to avoid change of 'default_value' 2015-10-01 15:35:26 +02:00
Christophe Simonis d750206c49 [MERGE] forward port of branch saas-6 up to e9f1ee4 2015-10-01 15:16:59 +02:00
Géry Debongnie 673f4aa4a7 [FIX] bus: disable longpolling in test mode
In test mode, only one cursor is available, and longpolling will take
it, and not give it back before 60s, causing a phantomjs timeout.  This
commit simply return an error when the server is in test mode.

Sadly, I had to patch the web client to prevent logging the error in
this case, because that's the way phantomjs detect if there is a
problem.
2015-10-01 14:00:20 +02:00
Géry Debongnie 6b3f1c1b22 [FIX] web: increase log timer
boot loader waited for only 100 ms before logging failed modules.
However, modules can now wait for deferred before completing their
loading, so this delay is increasingly getting too short.
2015-10-01 14:00:19 +02:00
Aaron Bohy de024f43ab [FIX] web,website: bundle utils.less to assets fronted 2015-10-01 14:00:19 +02:00
Adrien Dieudonne 7d7a73241b [FIX] enterprise settings upgrade widgets 2015-10-01 12:01:10 +02:00
Martin Geubelle b2636c026f [FIX] web: dataset aware of m2m tags color change
Use case: create a new tag, change its color and create another new tag. The m2m field was rendered again but the dataset was not aware of the color change on the first new tag. We need to invalidate the cache after changing the color in a tag in edit mode.
2015-10-01 10:51:26 +02:00
Antony Lesuisse ed1bbbb8d0 [IMP] enterprise settings 2015-10-01 09:06:33 +02:00
Xavier Morel cea29e0c01 [ADD] client-side CSRF support
* add CSRF token as core.csrf_token
* add CSRF tokens to client-generated and/or JS-submitted forms
* remove broken "compatibility" mode of web.ajax.post

  /cc @dmo-odoo I've no idea how that was supposed to work, from looking
  things up all modern browsers seem to support FormData, and old IEs
  which don't don't support fallbacks either and would require
  submitting an actual form as fallback so...
2015-10-01 01:36:50 +02:00
qsm-odoo f72e9b9919 [FIX] web: reintroduce ChangePassword template
The template had been previously dropped by mistake.
+ the validation buttons were not correctly handled and so changing
his password was not possible (these buttons must be in the modal
footer).
2015-09-30 14:36:36 +02:00
Aaron Bohy ed4b15e854 [IMP] web: menu.js: add hook for top menu change 2015-09-30 13:55:09 +02:00
Aaron Bohy 09bcbeefd2 [FIX] web: web_client: do_action: add missing return 2015-09-30 13:55:03 +02:00
qsm-odoo d212f900ba [FIX] web: formview secondary labels font-weight
The settings views are now using radio buttons which are using labels.
These were set to bold by bootstrap. Now force font-weight normal for
labels which are not labels inside an oe_form_group_cell_label (field
main label).
2015-09-30 10:44:03 +02:00
Ray Carnes b11f497130 [FIX] web: geater and less than or equal to
Correction for properly English grammar

Refer to:
http://www.fileformat.info/info/unicode/char/2265/index.htm
http://www.fileformat.info/info/unicode/char/2264/index.htm
https://msdn.microsoft.com/en-us/library/ms181567.aspx
https://msdn.microsoft.com/en-us/library/ms174978.aspx
https://en.wikipedia.org/wiki/Inequality_(mathematics)
https://www.mathsisfun.com/equal-less-greater.html

Closes #8742
2015-09-29 17:36:36 +02:00
qsm-odoo 7f7ce69bd9 [FIX] web,account: client actions layout (height)
Like view manager containers, client action containers needed the
overflow:auto property to compute their correct height inside their
flex context. This also allows client action as the reconcilation in
accounting to not care about their height.
2015-09-29 15:14:39 +02:00
qsm-odoo 1574f1c506 [FIX] web: listview editable tab key to go to next line
This was not working if the last field of the line was a DOM element
without any descendant (example: a simple input element).
2015-09-29 15:14:39 +02:00
Jérome Maes 8ffca19680 [FIX] web : attachment controller got unexpected args
On webclient, on 'Attachment(s)' dropdown (form view) when clicking on an attachment to download it, a request is sent to /web/content/ with a param 't' containing the current date. This param wasn't used neither before the new controller, but the old one accept additional kwargs. The new controller crashes, and since the t parameter is not used, removing it seems better.
2015-09-25 16:05:44 +02:00
Nicolas Lempereur 8cb1889baf [FIX] web: propagate context for graph view fields
The fields loaded for the graph view used for measure and legend were
not translated.

opw-649918
2015-09-24 18:11:45 +02:00
qsm-odoo 8ebdff6f76 [REF] web: datepicker widget
(backport of enterprise version)

* JS/XML refactoring
* Allow user to override default options for the picker
2015-09-24 17:05:28 +02:00