Commit Graph
5652 Commits
Author SHA1 Message Date
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
qdp-odoo 4f29b77e3d [MERGE] foward port of 10.0 up to revision 84a650e33a 2016-12-30 17:21:25 +01:00
Christophe Simonis c292202a47 [MERGE] forward port branch 10.0 up to 18456b9 2016-12-09 15:58:39 +01:00
Géry Debongnie 44c1fa7138 [FIX] web: prevent crash in line chart with 1 record
Since commit 8625242884, the graph view crashed when
displaying a line chart with only one record.  The reason is that the
method display_line can return undefined (if no line chart can be
displayed).  In that case, there is no reasy to try to display its
tooltip.

This commit simply protect against the case where it is undefined.
2016-12-08 10:11:24 +01:00
Jérome Maes 13f84b9aca [REM] *: remove ir.needaction mixin
ir.needaction_mixin is not used anymore by the webclient.
From 9.0, the concept has changed: this feature is now
available in mail module, with the mail.thread mixin,
and message_neeadction field.

Remove all code handeling needaction bullet and
counter on ir.ui.menu, knowing that since 9.0
webclient does not display the counter anymore.

This code was, thus, useless and some RPC calls
were done for nothing, and adapt accounting
reconcialiation widget.
2016-12-05 11:30:03 +01:00
Yannick Tivisse 8789188094 [REF] web: Remove is_admin key in session info
Because of its redundency with is_system key.
2016-12-02 16:07:52 +01:00
Christophe Simonis 0b846861b6 [MERGE] forward port branch 10.0 up to 5dc1c57 2016-12-01 17:05:08 +01:00
Christophe Simonis 5dc1c57601 [MERGE] forward port branch saas-11 up to 7842498 2016-12-01 16:59:33 +01:00
Christophe Simonis 7842498934 [MERGE] forward port branch 9.0 up to 5bed95f 2016-12-01 15:33:21 +01:00
Dhaval Panchal 2ac8f564e3 [IMP] web: Don't color in 'No result to show' string when no result found
The user is tempted to click on it as it is colored, but nothing happens when clicking on it.
2016-12-01 12:54:04 +01:00
Nicolas Martinelli e5cad9a45e [FIX] web: date autocompletion
When a user fills partially a date or datetime field, the system will
somehow autocomplete the value entered. For example, if the user enters
"11//11" then clicks on the Tab key, it will be completed as
"11/11/0000".

However, the year 0000 is not recognized in Python, and this causes a
crash upon saving.

opw-695035
2016-11-30 13:56:20 +01:00
Jeremy Kersten fee6015964 [FIX] website_sale: format amount according to currency client side
This commit closes #1103, closes #11553
2016-11-29 16:40:15 +01:00
qsm-odoo 365f7e9212 [FIX] web: lazy loading the same file multiple times with loadJS
Before this commit, if the loadJS method was called two times with the
same url, the associated script was effectively put in the DOM only one
time. However, the second call returned deferred was immediatly
resolved while the script (added by the first call) might not be fully
loaded yet.

Now, calling loadJS for a same url multiple times will always return
the same deferred, resolved when the associated script is fully loaded.
2016-11-24 10:14:56 +01:00
Yannick Tivisse 98cb4719db [REM] workflow: Remove workflow engine, documentation and tests 2016-11-23 11:52:39 +01:00
Christophe Simonis e348330b57 [MERGE] forward port branch 10.0 up to 6a18e31 2016-11-22 17:59:41 +01:00
Christophe Simonis 6a18e31cee [MERGE] forward port branch saas-12 up to c56cf85 2016-11-22 17:54:22 +01:00
Christophe Simonis c56cf85a3a [MERGE] forward port branch saas-11 up to 2633bb4 2016-11-22 17:50:41 +01:00
qsm-odoo 131a16525e [FIX] web: pivot cell clicking when no current list/form view
When clicking a pivot cell, an action is triggered using the cell data
and current action list view and form view. If no list view and/or form
view exists for the current viewmanager, the action chooses the default
list and/or form view.

The fallback when there is no list and/or form view was broken with
commit https://github.com/odoo/odoo/commit/002660a9b05cf8620e1c5287a8538ac5e806d59e#diff-9e64efee6e4d81d03c04c0aad259d99cL280,
when the views internal data were restructured.

Fixes #14392.
2016-11-22 14:44:29 +01:00
Christophe Simonis 457a705bf0 [MERGE] forward port branch saas-12 up to d1fddd2 2016-11-22 14:02:03 +01:00
Christophe Simonis d1fddd24dd [MERGE] forward port branch saas-11 up to 659fb5d 2016-11-22 13:28:15 +01:00
Christophe Simonis 42aaa68d10 [MERGE] forward port branch 9.0 up to b73518f 2016-11-22 12:41:06 +01:00
Olivier Dony b73518fe57 [FIX] web: do not cancel edition on o2m list when pressing Enter
Rev. 3f7d350fe21d9e2afb35a9ce3e2652940e3f259d1 introduced
auto-cancellation of the edit mode when the user clicks
outside the edited line.

The unfortunate downside was the auto-cancellation of the
edit mode also when the user presses ENTER while the
line is not valid.

This is especially annoying when using barcode scanners to
fill in values, as scanners usually send an ENTER keystroke
at the end of the input sequence.
When a many2one field is focused this event will often occur
before the autocompletion popup has a chance to open. At that
point the line is considered invalid, and the edition mode
is cancelled! If no field is considered dirty yet on the line
this simply drops the whole line, otherwise it will open a
navigation confirmation popup. Both results equally prevent
the use of barcode scanners.

This patch makes sure the edit mode is only cancelled when the
user indeed clicked outside the line, and not for other cases
where save() is requested, such as an ENTER keystroke.
2016-11-22 12:33:08 +01:00
Christophe Simonis 2d26229052 [MERGE] forward port branch 10.0 up to ea675d8 2016-11-18 18:29:23 +01:00
Jeremy Kersten 59e816f17f [FIX] web: don't set monokai as theme for widget 'ace'
It was already working without it since commit e01837d2f4
2016-11-18 10:03:48 +01:00
Yannick Tivisse 34a5258534 [FIX] web: Consider currency_fields with other names than 'currency_id'
To filter the columns to aggregate, we check that the currency_fields on the column is 'currency_id'.

In fact, this is only the default field name. Sometimes it could be an another name, for example 'company_currency_id'
2016-11-17 16:08:00 +01:00
Yannick Tivisse 915bfeaf1f [FIX] web: Fix traceback for list views without any records
Comes from https://github.com/odoo/odoo/commit/df69b5bb846fda29a397bb43f74f73f795b28eea

In JS, Boolean([]) is equal true

It is always a pleasure to work with JS when you're used to python
2016-11-17 16:08:00 +01:00
Christophe Simonis e2fcace05e [MERGE] forward port branch 10.0 up to 13dc704 2016-11-17 15:27:29 +01:00
Christophe Simonis 13dc7041a6 [MERGE] forward port branch saas-12 up to 1ef4061 2016-11-17 15:24:36 +01:00
Christophe Simonis 1ef4061e68 [MERGE] forward port branch saas-11 up to 3b2f4e2 2016-11-17 14:48:43 +01:00
Christophe Simonis 3b2f4e244f [MERGE] forward port branch 9.0 up to 7ee09ed 2016-11-17 14:37:19 +01:00
fwi-odoo 25888f4195 [FIX] web: Deleting items in list view does not reset min to 1
When all the items of the first list view page were deleted,
the list view was not reloaded correctly and no records were displayed.
2016-11-17 11:31:35 +01:00
Jeremy Kersten e01837d2f4 [IMP] web: remove monokai in form widget aceEditor
Keep return line in ViewMode.

Courtesy of @odony
2016-11-16 19:15:08 +01:00
qsm-odoo 8625242884 [FIX] web: properly destroy nvtooltips when switching views
If the graph view was left while a nvtooltip was shown (thanks to
keyboard shortcuts or during loading time), the nvtooltip remained
and was only destroyed when leaving the action.

Now they are automatically removed with the view as they are now
placed inside of them instead of inside the body element.
2016-11-16 17:27:40 +01:00
qsm-odoo 669336baa9 [REF] web_planner, *: refactor planner code
* Share code between website and backend
* Do not do a [100ms - 500ms] RPC on each app change in the backend
but do it only if the planner is asked to be opened
* Use the Dialog class so that the planner is not broken
* Simplify/optimize code, use standard conventions, lint files, ...
2016-11-15 13:08:59 +01:00
Jeremy Kersten 99b68e3278 [FIX] web, website: website_version is an enterprise module
Add widget to specify that this module is an enterprise module.
Fix layout (missing margin between last label and tag enterprise)
Fix behaviour widget_radio, popup was never opened because we
compare the str value with an int value.

This commit is related to #14241
2016-11-14 17:41:20 +01:00
Yannick Tivisse df69b5bb84 [IMP] web: Don't display aggregates in list views for columns with multi-currency records
Purpose:
On a list view (Ex: the invoices list view), if a column is a currency column (Ex: total amount), it makes no sense to display the aggregate (Ex: sum) if the records contains several currencies.

Spec:
Don't display the aggregate of a column if a least two records are in different currencies.
2016-11-09 15:35:21 +01:00
Kishan Gajjar 5a3d0fc3ff [IMP] web: show technical field name in export wizard by hover in debug mode
In export wizard on mouse hover display technical name of field in debug mode
2016-11-09 15:06:12 +01:00
Géry Debongnie 78dfb01942 [IMP] web: disable selected fields in pivot dropdown
In the pivot view, when the user select a new field to drill down, the
previous dropdown menu displayed all the groupable fields as valid
choice.  This commit disables all the fields that have already been
selected.  It means that they will be greyed out, and inactive in the
UI.
2016-11-08 15:21:37 +01:00
Christophe Simonis 7eb8ed2769 [MERGE] forward port branch 10.0 up to 3d085f6 2016-11-08 15:13:05 +01:00
Christophe Simonis 3d085f632d [MERGE] forward port branch saas-12 up to 6386037 2016-11-08 15:01:20 +01:00
Christophe Simonis 63860373ac [MERGE] forward port branch saas-11 up to c19f546 2016-11-08 14:43:28 +01:00
Christophe Simonis c19f546505 [MERGE] forward port branch 9.0 up to b795755 2016-11-08 14:20:07 +01:00
Christophe Matthieu 3378f9c771 [FIX] web: correctly saves last change in wizards with many2omany
With this change, form_relational_widgets will wait for the 'web.ListEditor'
module to be loaded before patching the list view.  This is particularly
important for wizards containing and editable list view.

Note that to achieve this, I had to fix a horrible hack in session.
2016-11-07 13:39:08 +01:00
Aaron Bohy 3555625990 [FIX] web: do_action in target='new': specify Dialog size
Instantiate the Dialog with the optional dialog_size specified in
the action's context.
2016-11-07 10:25:50 +01:00
Christophe Matthieu 2c1bcc5b11 [FIX] web: display error when js modules fails
Up to this commit, the JS module system only notified failed modules as
an 'information' instead of an 'error'.  This was annoying, since the
runbot takes the result into account, and might be green even though a
module failed to load.
2016-11-04 16:40:58 +01:00
sah 62c4b0356b [IMP] web: Ask user to confirm export template removal
PURPOSE:

When users try to delete records in the database, we usually warn them about the possible damage they would cause by asking them to confirm this is what they want to do (just in case you misclicked for example)

Unfortunately, that feature wasn't implemented everywhere, at least no in the export window, which means a user can remove ir.exports records without having to confirm that's indeed what he wants to do.
This got worsened by the fact, in the export window (like pictured in the attachment), the "Save field list" button is less than 10px away from the DELETE button, meaning you could really remove 10min of your work (or worse, anybody else's work as we don't have any specific record rule on that) in one click
2016-11-04 14:16:14 +01:00
Christophe Matthieu a8e79e960a [FIX] bus,im_odoo_support, web*: fix various memory leaks
* Tip are never destroyed when change view mode
* unbind methods
* mail: memory leak with unbind methods
* web: memory leak because 'ui-autocomplete' is never destroyed
* web_editor: memory leak for wrong unbind on destroy
* web: memory leak: must remove fileupload handler
* bus: memory leak: correctly debind handlers on window in bus.Bus
* remove handlers on switch buttons and views $buttons
* remove handlers on breadcrumbs
* web: memory leak: correctly debind handlers
* im_odoo_support: memory leak: remove fileupload handler odoo_support

Note: part of this commit was actually authored by aab
2016-11-04 14:07:35 +01:00
Christophe Simonis 4d9f5bbf5b [MERGE] forward port branch 10.0 up to ab98523 2016-11-02 18:02:11 +01:00
qsm-odoo dd560377e2 [IMP] web: improve traceback reporting
* Do not assault the user with a full traceback on bug, but indicates
an error occured and allow him to toggle the traceback
* Automatically scroll the traceback to the end (better for python
errors)
* Propose the user to report the traceback by using a new "Copy"
button which correctly copies the full error + traceback
2016-11-02 13:26:00 +01:00
Sylvere Richard 643180afe8 [FIX] fix options parameter of column.format() method by adding the model 2016-10-28 10:33:55 +02:00