Commit Graph
1183 Commits
Author SHA1 Message Date
Christophe Simonis 9b5ba8b238 [MERGE] forward port of branch saas-10 up to 21c7ef8 2016-04-12 12:38:02 +02:00
Christophe Simonis 21c7ef8bf5 [MERGE] forward port of branch saas-9 up to eb44341 2016-04-12 11:56:44 +02:00
Christophe Simonis eb443410ff [MERGE] forward port of branch 9.0 up to afba8ce 2016-04-12 11:12:57 +02:00
Odoo Translation Bot d4672389f7 [I18N] Update translation terms from Transifex 2016-04-10 00:32:08 +02:00
Géry Debongnie 6859c8dacb [FIX] web_kanban: fix race condition in do_search
The do_search method still had a race condition because the
read_slice method of datasets alter ids.  So, what could happen is
this: a long search is started, then a shorter search is started and
ended before the first search is completed.  The ui is rendered
properly, but then the long search ends and alter the dataset.  As
a result, the Kanban view is broken (cannot open a record anymore
because the dataset has the wrong ids).

This commit fixes the issue by doing basically what the read_slice
method did, except the ids altering part.  However, it introduced
a new problem for x2many kanban views: these kanban view don't have
the same dataset, they have a datasetstatic. The naive substitution
does not work, so I had to reintroduce the old method in X2ManyKanbanView.
2016-04-07 14:16:04 +02:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Denis Ledoux 17f4d22594 [MERGE] forward port of branch saas-7 up to 2d2028a 2016-04-01 11:26:27 +02:00
Denis Ledoux 2d2028a66c [MERGE] forward port of branch 9.0 up to b44cb82 2016-03-31 17:57:22 +02:00
Odoo Translation Bot f02b8a76df [I18N] Update translation terms from Transifex 2016-03-27 00:32:16 +01:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Christophe Simonis 59d3f63c58 [MERGE] forward port of branch saas-7 up to 9e4157b 2016-03-24 15:12:00 +01:00
Tanguy Charlier 1ae7f735c5 [FIX] web_kanban: float_time widget did not work
* This is a forward-port of 4c1c1ec4d4
2016-03-24 13:47:37 +01:00
Thibault Francois e6ac7a7d25 [ADD] project_timesheet, sale_service: support for project sub-tasks
This commit introduces "Sub-task", a concept remotely similar to
the "delegated tasks" available in version 7.0, but covering a
more specific and narrow scope.

Activating Sub-tasks
--------------------

Sub-tasks are made available within any project by configuring
a "sub-task project" in the project settings. This feature is
considered low-level and technical, and only accessible with
"Technical Features" enabled.
The "sub-task project" may be the project itself.

Using Sub-tasks
---------------

Conceptually, a sub-task represents the allocation of a part
of the scope of its parent task. Multiple sub-task levels
are possible.

Once activated in project settings, a new "Sub-tasks" smart button
will appear on the task form, giving the option to view and
create sub-tasks. In addition, a new field "Sub-tasks Hours" will
appear next to the other computed "Hours" fields, representing
the total hours allocated to sub-tasks.
(Technically, the sum of the maximum between the planned hours
and spent hours of all sub-tasks, with spent hours always used
when a task is closed)
These sub-task hours will be dynamically subtracted from the
remaining hours of the task, and will therefore affect the
task's progress as well.

Upon creation, a sub-task will inherit the link to the
original sales order and procurement from its parent task, and
will by default be assigned to the "sub-task project" set on
the project of the parent task.

Enhancement
-----------
The kanban view for tasks will now display a color-coded label
with the number of remaining hours, whenever the percentage
of remaining hours is below 20% (orange=20%-, red=1%-).

Notes
-----------
This is a forward port of 43c42b304d

Since hr_timesheet has been migrated to the new API, the forward port changes mostly consists in migrating the sub-tasks system to the new API as well.
2016-03-24 13:44:21 +01:00
Martin Trigaux b54b888305 [MERGE] Forwardport of branch 9.0 up to revision 87578177 2016-03-22 14:30:21 +01:00
Nicolas Martinelli 899d01b9fb [FIX] web_kanban: request fields only if necessary 2016-03-22 08:45:17 +01:00
Nicolas Martinelli 7a9c16ffee [FIX] web_kanban: prevent drag'n'drop
Prevent drag'n'drop in the following cases:
- Group by field is read-only
- Group by field is a date or datetime

This is necessary to avoid, for example, changing the state of a sales
order or an invoice without going through all the business logic.

Related to #7047
opw-671697
2016-03-21 11:00:27 +01:00
Nicolas Martinelli 69278f09d1 [FIX] web_kanban: prevent drag'n'drop
Prevent drag'n'drop in the following cases:
- Group by field is read-only
- Group by field is a date or datetime

This is necessary to avoid, for example, changing the state of a sales
order or an invoice without going through all the business logic.

Related to #7047
opw-671697
2016-03-21 10:23:22 +01:00
Tanguy Charlier 2f8c99d412 [FIX] web_kanban: float_time widget did not work
* This is a forward-port of 4c1c1ec4d4
2016-03-18 11:18:29 +01:00
Thibault Francois 43c42b304d [ADD] project_timesheet, sale_service: support for project sub-tasks
This commit introduces "Sub-task", a concept remotely similar to
the "delegated tasks" available in version 7.0, but covering a
more specific and narrow scope.

Activating Sub-tasks
--------------------

Sub-tasks are made available within any project by configuring
a "sub-task project" in the project settings. This feature is
considered low-level and technical, and only accessible with
"Technical Features" enabled.
The "sub-task project" may be the project itself.

Using Sub-tasks
---------------

Conceptually, a sub-task represents the allocation of a part
of the scope of its parent task. Multiple sub-task levels
are possible.

Once activated in project settings, a new "Sub-tasks" smart button
will appear on the task form, giving the option to view and
create sub-tasks. In addition, a new field "Sub-tasks Hours" will
appear next to the other computed "Hours" fields, representing
the total hours allocated to sub-tasks.
(Technically, the sum of the maximum between the planned hours
and spent hours of all sub-tasks, with spent hours always used
when a task is closed)
These sub-task hours will be dynamically subtracted from the
remaining hours of the task, and will therefore affect the
task's progress as well.

Upon creation, a sub-task will inherit the link to the
original sales order and procurement from its parent task, and
will by default be assigned to the "sub-task project" set on
the project of the parent task.

Enhancement
-----------
The kanban view for tasks will now display a color-coded label
with the number of remaining hours, whenever the percentage
of remaining hours is below 20% (orange=20%-, red=1%-).

Note: This is a forward port of the commit 9eac32beea
2016-03-18 11:18:23 +01:00
Aaron Bohy 002660a9b0 [IMP] openerp, web(_*): batch views RPCs
Load the fields_view of all views of the action together. If a searchview is
required, also load its fields_view and its filters.

Use lazy-loading for fields as they are required for the Pivot and Graph
views only, and may be used by Filters and GroupBy menus of the Search view
if the users clicks on 'Add a custom Filter/Group'.

The fields are thus also loaded directly if the first view of the action is
Pivot or Graph, and otherwise, they are lazy-loaded when/if the user opens
a Pivot or Graph view, or if he wants to add a custom Filter/Group.

Some refactoring of views API as well:
- Views must now be instantiated with their fields_view
- Move code requiring fields_view from start() to init(), or willStart() for
  heavy processing.
- Remove view_type attribute from views as it was used to call
  fields_view_get.
- Remove view_id parameter to views' init as it is no longer used.
- Move duplicate code from various views' init to the View widget.
- Remove view_loading() function from views as they now follow the classical
  lifecycle of widgets (init -> willStart -> start -> destroy).
- Searchview now extends View like all other views.
- Remove useless function guard_active() as it was used for the form_view's
  action buttons to wrap handlers to ensure that they are executed only if
  the form_view is the current active view. This is not useful anymore as
  from v9, views and their control panel are appended in the DOM
  simultaneously, so one can't click on a button of a view which is not the
  current active view.
2016-03-18 10:44:52 +01:00
Aaron Bohy 141f4d95bd [REF] web_kanban: render_buttons()
A special case for X2ManyKanban views was handled in the Kanban view itself.
This commit makes the X2Many case identical to the general case by setting
options.action_buttons to true if the X2Many field is not readonly.
2016-03-18 10:44:52 +01:00
qdp-odoo 7a3d63b377 [MERGE] forward port of branch saas-7 up to revision 71d16a369e 2016-03-16 10:27:19 +01:00
qdp-odoo 71d16a369e [MERGE] forward port of branch 9.0 up to revision 083e172dd9 2016-03-16 10:08:49 +01:00
Odoo Translation Bot 41c94f6c77 [I18N] Update translation terms from Transifex 2016-03-13 00:33:15 +01:00
Martin Geubelle fe66472e2c [FIX] web, web_kanban: visible default color on tags
The default comportement of tags has been changed. The default color is now visible on kanban.
The 10th color is now invisible.
2016-03-09 14:34:01 +01:00
Thibault Francois 9eac32beea [ADD] project_timesheet, sale_service: support for project sub-tasks
This commit introduces "Sub-task", a concept remotely similar to
the "delegated tasks" available in version 7.0, but covering a
more specific and narrow scope.

Activating Sub-tasks
--------------------

Sub-tasks are made available within any project by configuring
a "sub-task project" in the project settings. This feature is
considered low-level and technical, and only accessible with
"Technical Features" enabled.
The "sub-task project" may be the project itself.

Using Sub-tasks
---------------

Conceptually, a sub-task represents the allocation of a part
of the scope of its parent task. Multiple sub-task levels
are possible.

Once activated in project settings, a new "Sub-tasks" smart button
will appear on the task form, giving the option to view and
create sub-tasks. In addition, a new field "Sub-tasks Hours" will
appear next to the other computed "Hours" fields, representing
the total hours allocated to sub-tasks.
(Technically, the sum of the maximum between the planned hours
and spent hours of all sub-tasks, with spent hours always used
when a task is closed)
These sub-task hours will be dynamically subtracted from the
remaining hours of the task, and will therefore affect the
task's progress as well.

Upon creation, a sub-task will inherit the link to the
original sales order and procurement from its parent task, and
will by default be assigned to the "sub-task project" set on
the project of the parent task.

Enhancement
-----------
The kanban view for tasks will now display a color-coded label
with the number of remaining hours, whenever the percentage
of remaining hours is below 20% (orange=20%-, red=1%-).
2016-03-01 18:54:08 +01:00
Christophe Simonis 1c7f5a45e5 [MERGE] forward port of branch saas-7 up to d016457 2016-02-29 12:30:27 +01:00
Christophe Simonis d0164570c1 [MERGE] forward port of branch 9.0 up to f03eee7 2016-02-29 11:46:58 +01:00
Aaron Bohy be7898955b [REF] web_kanban: duplicate definition of One2ManyKanbanView
Relational Kanban views are already (and correctly) defined in
kanban_relational.js
2016-02-29 10:05:09 +01:00
Aaron Bohy b816cdbea9 [FIX] web(_*): views: render action buttons in dialogs
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.
2016-02-29 08:47:20 +01:00
Odoo Translation Bot 39d7abae26 [I18N] Update translation terms from Transifex 2016-02-28 00:34:20 +01:00
Olivier Dony 574eb71dfe [MERGE] Forward-port 9.0 up to 4c1c1ec4d4 2016-02-26 19:04:09 +01:00
Thibault Francois 4c1c1ec4d4 [FIX] web_kanban: float_time widget did not work
`instance` was undefined in this context, probably
following a forward-port mistake
2016-02-26 18:56:49 +01:00
Christophe Simonis 3b6c243440 [MERGE] forward port of branch 9.0 up to c169c59 2016-02-24 18:50:09 +01:00
Odoo Translation Bot f83c28eb72 [I18N] Update translation terms from Transifex 2016-02-22 11:06:52 +01:00
Christophe Simonis d70fde0330 [MERGE] forward port of branch saas-7 up to cab5c48 2016-02-10 18:37:01 +01:00
Denis Ledoux eb2346ba46 [MERGE] forward port of branch 9.0 up to 0b7990c 2016-02-08 16:08:32 +01:00
Odoo Translation Bot f2146d360d [I18N] Update translation terms from Transifex 2016-02-07 00:33:44 +01:00
Christophe Simonis 469e04e97c [MERGE] forward port of branch saas-8 up to 2611a81 2016-02-02 14:52:15 +01:00
Christophe Simonis e765569d04 [MERGE] forward port of branch 9.0 up to f0a63e5 2016-02-02 14:44:39 +01:00
Odoo Translation Bot 3b4bbb8c28 [I18N] Update translation terms from Transifex 2016-01-31 00:33:36 +01:00
Christophe Simonis 78d20b552b [MERGE] forward port of branch saas-8 up to 7e44ddc 2016-01-27 12:24:04 +01:00
Christophe Simonis 6f923cbdcd [MERGE] forward port of branch 9.0 up to 4bbddc7 2016-01-27 12:17:12 +01:00
Géry Debongnie 31efb0c198 [FIX] web_kanban: only move columns with the header
and not the whole column.  this will prevent unwanted drag and drop
operations.
2016-01-26 14:19:03 +01:00
Martin Geubelle b50e99c1af [FIX] web_kanban: correct title on kanban
In a grouped column one should display the total number
of records and not only the loaded records.
2016-01-25 13:34:59 +01:00
Julien Legros e5e7c4c121 [MERGE] forward port of branch 9.0 up to 6872aae 2016-01-25 11:26:27 +01:00
Nicolas Martinelli 205037736f [FIX] web_kanban, *: missing translated term
The progress bar in the web kanban module uses the option 'title' in
order to display the title of the gauge. However, this option is not
taken into account when it comes to translation, because the translation
of such option is not accessible at the JS level.

The fix defines the title of the gauge as the parameter `title` of the
widget. Indeed, such a parameter is in the list of parameters translated
and made accessible in the JS layer (see variable TRANSLATED_ATTRS in
translate.py). With such a modification, the translation is accessible
on the node.

opw-666577
2016-01-19 15:10:23 +01:00
Martin Geubelle 667909ae4a [FIX] web_kanban: duplicated tags on load more
When clicking on 'load more', the kanban view only needs to add tags
for new records displayed by load more ; the existing records already
have their tags so one duplicates them.
2016-01-19 14:28:09 +01:00