Commit Graph
7976 Commits
Author SHA1 Message Date
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
Odoo Translation Bot a6999391d3 [I18N] Update translation terms from Transifex 2015-10-12 10:51:48 +02:00
Odoo Translation Bot ff9b997736 [I18N] Update translation terms from Transifex 2015-10-11 01:33:54 +02:00
Fabien Pinckaers 1a58579540 [FIX] fix and improve res.config views and typos 2015-10-08 05:42:48 -07:00
Odoo Translation Bot 8c4f17fd8b [I18N] Update translation terms from Transifex 2015-10-08 10:24:11 +02: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 afa9f4b5fd [REM] web: /login route
Only used by web tests (which rely on a module they don't depend on to
run, bad!) and altering the test session directly should work, so this
endpoint seems completely unnecessary.
2015-10-01 01:36:50 +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
Christophe Simonis 7636b510a2 [ADD] *: CSRF protection in forms and routes
* make CSRF protection the default on all non-SAFE methods
  note: there currently is no way to call a CSRF-protected endpoint
  without a form-encoded entity-body as that's the only place we get the
  CSRF token from.
* simple CSRF token generation: just use the HMAC'd session id, no
  generating a new random token per session then HMAC it
* use constant-time equal function to avoid timing attacks
* assert that a database secret is configured before hashing/validating
  the CSRF token
* opt-out database manager from CSRF: The super-admin password serves
  the purpose of a CSRF token in the database manager screens.
  There is no request database to obtain the
  secret and generate a CSRF token.
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
Leonardo Rochael Almeida 60af7cac02 [IMP] replace simplejson with stdlib json
The stdlib version of the json library is more recent than the 3.5.3
version we are pinning in `requirements.txt`

There is no reason to use it.

Closes #6940
2015-09-28 10:53:32 +02:00
Leonardo Rochael Almeida 06b3026bcd [IMP] unittest2 > unittest
The `unittest2` package is simply a backport of `unittest` from the
Standard Library of Python 2.7 to previous versions.

There is no reason to use it any longer.

Closes #6941
2015-09-28 10:37:27 +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
Martin Geubelle 1b3939a8b1 [IMP] web, web_planner: add wow effect on button
* As the animations were already defined in web_planner, they are now moved in web (animations.less)
2015-09-24 15:14:12 +02:00
qsm-odoo 333018640a [FIX] web: record selector state in listview editable
Before this commit, when editing a line in a listview editable, the
record selector (checkbox) lost its state after the line edition.
2015-09-24 14:40:17 +02:00
qsm-odoo cbf25a83f4 [FIX] web: invisible element position in a listview editable
Elements which are not displayed (display: none) cannot be positionned
correctly by jQueryUI in a listview editable. Therefore, the solution is
to make them visible (but opacity: 0) during the time their position is
being computed.

This was a problem because a listview editable field may become visible
under some conditions AFTER their position was already computed.
2015-09-24 14:40:17 +02:00
Christophe Matthieu 7e8fa2aac5 [FIX] web: trigger onchange only once when write re-order sequences 2015-09-24 14:13:55 +02:00
Christophe Matthieu 19dfde8558 [FIX] web: don't trigger remove then add the record to re-order list view
To re-order the list view remove the record and add the same record after.
(If an onchange is called, the user can have a message to avoid remove a one2many item)
Add an silent option on remove function of collection, the trigger is already call when write the sequence.
2015-09-24 14:13:55 +02:00
Christophe Matthieu 7a465bf7c7 [FIX] web: clone values in read_ids (avoid external changes)
Some widgets like list editable use and change values dictionary. When the write is called, the values in the cache is equal to the changes send => field no dirty => no change triggered.
2015-09-24 14:13:55 +02:00
Martin Geubelle e89d528788 [IMP] web, web_planner: move 'Help' in systray
* 'Help' has now its own dropdown, directly accessible in the systray, instead of being hidden in the Administrator dropdown
* 'About' has been moved there also
* We can access the planner through this dropdown, even if the planner is hidden (complete)
2015-09-24 11:25:43 +02:00
Nicolas Lempereur 109eb755f2 [FIX] web: propagate context for pivot view fields
On the "+" in the pivot views to group by given fields, these field were
not translated in the user choosen language.

closes #8656
opw-649918
2015-09-24 10:40:01 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Nicolas Lempereur 17ce3fafb2 [FIX] web: m2m tags, wait for deferred
We have to wait that the request getting the fields data is resolved
before using it.

Completing 655b13b0
2015-09-22 17:41:21 +02:00
Yannick Tivisse 0d1240684a [FIX] web: kanbanSelection widget : labels are not mandatory
Coming from hr_recruitment, where kanban_state is displayed, but without the customization
Also, remove lingering options in view, and missing fields for project_issue
2015-09-22 17:08:55 +02:00
Yannick Tivisse e5181b05f7 [FIX] web_kanban, web: KanbanSelection widget refactoring
- Change the widget behavior from asynchronous to asynchronous, by adding 3 related fields
  on the project.task model, which are the custom labels defined for the stage
- Instead of making a rpc call, we are taking directly the labels on the parent for the kanban view,
  or on the view datarecord for the form view
- There are now 2 templates for the kanban view or the form view
- The development has been backported in the community version
- The options attribute has been removed on the project_view.xml file for the kanban_state field
2015-09-22 11:33:58 +02:00