Commit Graph
435 Commits
Author SHA1 Message Date
Thibault Delavallée 6663ff97b6 [IMP] web: add an option to hide archive option in kanban columns
Currently kanban columns propose an Archive / Unarchive option if the
records model has an active field. It allows to directly archive or
restore all records belonging to that column. It is currently not possible
to control whether this option is present or not as it only depends on the
active field being defined on the model.

In some specific cases we want to be able to hide this option even if the
active field exists. For example future commits will hide this option for
leads (crm.lead) as business flow goes through marking them as won or lost
instead of archiving / restoring them.

This commit adds support of a new archivable parameter when defining the
kanban view that hides the archive buttons if it is set to False. Default
value is true so that current behavior is kept as it is by default.

Doc and tests are added.

This commit is linked to task ID 1880051 and PR #26977.
2018-09-21 11:22:01 +02:00
Christophe Simonis 9c77066f34 [MERGE] forward port branch saas-11.4 up to 6c103589c1 2018-09-14 16:00:17 +02:00
Christophe Simonis f3fa5a5ef7 [MERGE] forward port branch saas-11.3 up to 1e0a92c996 2018-09-13 19:30:33 +02:00
Christophe Simonis 1e0a92c996 [MERGE] forward port branch 11.0 up to 5cb9f8e9d5 2018-09-13 12:42:01 +02:00
len-odoo 83292e522a [FIX] doc: add documentation for widget formatter support in pivot view
Commit:
https://github.com/odoo/odoo/commit/8c1204954ef571e51e94ddf4070043ec2d5de3c6
put back support in v11 for formatter widgets in pivot views.
We document this feature.

opw 1876445
2018-09-12 19:46:40 +02:00
Christophe Simonis 68d36512ef [MERGE] forward port branch saas-11.4 up to d78f23df84 2018-09-07 20:20:45 +02:00
svs-odoo 74fcd3ac3b [IMP] web: FieldInteger and FieldFloat can use input of type number
This allow the browser/device to handle the experience of handling number in a more native way.

FieldInteger and FieldFloat now inherits from NumericField because we want
to format it or not dependent of the view (readonly or edit) and the
NumericField will manage it.

We do that because input type number can't take a value with comma on Chrome
(FireFox is more permissive but not perfect because comma is the separator
for decimal in this case).

Task #1880376
2018-09-07 16:18:45 +02:00
Christophe Simonis 49c3264ce0 [MERGE] forward port branch saas-11.3 up to 4850fb0838 2018-09-07 14:43:48 +02:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
Jesús Alan Ramos Rodríguez 5b13a45fb8 [FIX] doc: Change name of method in documentation
invalidate_all no longer exists

Closes #26613
2018-09-04 17:04:33 +02:00
Martin Geubelle e273407157 [FIX] mail: consider activity as a valid view type
The recently introduced `activity` view (see rev. odoo/odoo@1de9496 has not
received all the consideration it deserves as a real view type (no RNG, not in
the valid view `type`, no doc, etc.). It was currently only working based on a
`_get_default_activity_view` method.

Even if the RNG is currently really basic, its grammar could evolve in the future.

This was causing an issue when opening Studio with this view as a default view
with an invalid type was created.
2018-09-03 13:40:22 +02:00
Sylvain LE GAL 3c0a0261be [FIX] doc: js mixin inheritance
Hamster extends Animal, not itself

Closes #26595
2018-08-27 15:26:40 +02:00
Xavier Morel 0e307f8280 [FIX] doc building and warnings
doc:

* fix incorrect doc comments (documenting params which don't exist)
* correctly quote non-refs
* fix role label syntax (backticks must be escaped)
* add newline to fix warning

JS doc parser:

* fix handling of already-resolved objects
* fix handling of non-string properties (e.g. foo[0] at module toplevel)
* don't blow up if subject of .include call can't be resolved (just ignore)

Others:

* add translator support for ``problematic`` node (apparently used for
  some refs by recent Sphinx)
2018-08-27 12:55:21 +02:00
Raphael Collet c36fc4a435 [FIX] doc: API of create 2018-08-27 11:18:33 +02:00
Dharmraj Jhala 03ed4470b4 [IMP] doc: document timeline attribute on cohort view
Task 1854339
Closes #25576
2018-08-13 16:32:40 +02:00
jem-odoo 1f72644c44 [IMP] web: float_factor and float_toggle widgets
This commit provides new js widgets for list, kanban and form
views on float field.

1/ 'float_factor' displays the normal float field, but takes a
conversion factor as option. The displays value is the normal
one multiplied by the factor.

You can use the widget like
<field name="my_float_field" widget="float_factor"
option="{'factor': 2}"/>

2/ 'float_toggle' displays a button (in edit mode) looping on a
range of given value at each click. A conversion factor is optional
(default will be 1) to display a converted value, but sent to
non converted one to the server.

You can use the widget like
<field name="my_float" widget="float_toggle"
option="{'range': [0, 0.5, 1], 'factor': 2}"/>

'range' and 'factor' are put in the options.
In simple read mode, the widget display the value as a traditionnal
text (like a normal char field).

This commit provides tests and documentation for those 2 widgets.

Task #39079
2018-08-13 14:33:48 +02:00
sri-odoo 1934780fc3 [IMP] doc: reduce imgs footprint
Reduce footprint using a combination of resize/imageoptim saving ~10Mb
2018-08-09 15:50:31 +02:00
Raphael Collet 960360afe4 [REF] *: use native date/datetime for Date/Datetime fields
From this commit onwards, Date fields will return datetime.date objects and Datetime fields will return datetime.datetime objects, this implies a number of things that are clearly explained both in the ORM API for master.

This commit also introduces a number of helper functions for dates and datetimes that are exposed in tools.date_utils and fields.Date[time], explained in the documentation as well.

Task-ID: 47189
2018-08-06 14:37:19 +02:00
Christophe Simonis 4797627259 [MERGE] forward port branch saas-11.4 up to 8d9366197e 2018-08-01 18:02:29 +02:00
RomainLibert 14676c5aa1 [DOC] web_cohort: add context keys 2018-07-31 11:33:17 +02:00
Christophe Simonis a719cf2563 [MERGE] forward port branch saas-11.3 up to b4555df336 2018-07-30 17:02:28 +02:00
Christophe Simonis b4555df336 [MERGE] forward port branch saas-11.2 up to 3376bad191 2018-07-30 15:51:38 +02:00
qsm-odoo d48b8593dd [REF] *: BS4, 'pull-left/right' -> 'float-left/right' 2018-07-27 12:36:54 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00
Christophe Simonis 93e689d1c2 [MERGE] forward port branch 11.0 up to 1353abecbe 2018-07-26 12:58:46 +02:00
Thibaud Ducasse 8198fb6473 [IMP] doc: add logrotate warning in cmdline doc
Fixes #24542
2018-07-26 10:20:04 +02:00
lejeune quentin 384647e583 [IMP] all_module : Modify "Sales Channel" by "Sales Teams" 2018-07-25 15:41:31 +02:00
Christophe Simonis ba202dbe63 [MERGE] forward port branch saas-11.2 up to 3c521f6d05 2018-07-24 18:10:32 +02:00
Christophe Simonis 4e76173a43 [MERGE] forward port branch 11.0 up to 219d2296d6 2018-07-23 16:03:25 +02:00
Christophe Simonis 219d2296d6 [MERGE] forward port branch saas-15 up to c4ee29345a 2018-07-23 15:45:08 +02:00
Christophe Simonis 9ee882564f [MERGE] forward port branch 10.0 up to 6e71cf8a71 2018-07-23 14:21:06 +02:00
Christophe Simonis 6e71cf8a71 [MERGE] forward port branch 9.0 up to af2e480e41 2018-07-23 13:41:04 +02:00
Ivan Yelizariev 592ee660a5 [FIX] doc: remove incorrect statement 2018-07-20 12:27:10 +02:00
eco-odoo c1498ff36b [IMP] web: add option to display a banner above a view
Add a banner_route attribute to AbstractView to allow fetching html from a
controller route and displaying it above the view.

The initial use case was the onboarding panels.

Supported views are the ones inheriting both AbstractView and AbstractController.
2018-07-20 11:59:12 +02:00
Christophe Monniez 23d840ddce [DOC] cmdline,testing: add documentation for test-tags
Closes #25789
2018-07-20 08:17:21 +02:00
Christophe Simonis 49f634e472 [MERGE] forward port branch saas-11.4 up to 1f7a39964b 2018-07-19 16:36:03 +02:00
Christophe Simonis 1f7a39964b [MERGE] forward port branch saas-11.3 up to 0c42dcfc22 2018-07-19 15:36:54 +02:00
RomainLibert c6396c36e7 [DOC] dashboard: add clickable attribute on aggregates
Closes: #25710
2018-07-19 09:51:54 +02:00
Christophe Simonis e5fab318d9 [MERGE] forward port branch saas-11.2 up to 02f38beffb 2018-07-18 17:59:23 +02:00
Christophe Simonis 5b9a51bb1d [MERGE] forward port branch 11.0 up to 44b77d3702 2018-07-17 17:48:34 +02:00
Christophe Simonis 44b77d3702 [MERGE] forward port branch saas-15 up to 1de78253ff 2018-07-17 17:08:50 +02:00
Christophe Simonis 7f7b705236 [MERGE] forward port branch 10.0 up to 633a65d231 2018-07-17 16:36:29 +02:00
Christophe Simonis 633a65d231 [MERGE] forward port branch 9.0 up to e62e17d078 2018-07-17 16:11:20 +02:00
Sébastien Theys b6ed005e0a [IMP] doc: remove duplicate line
The same content is already there 2 lines above.

cherry-pick of 57676dc7d1
2018-07-17 15:14:28 +02:00
Sébastien Theys 57676dc7d1 [IMP] doc: remove duplicate line
The same content is already there 2 lines above.
2018-07-17 13:55:25 +02:00
Sébastien Theys f241441433 [IMP] web: add control + create tags to customize "add a line"
The default "add a line" button creates a new line with the default values from the model. Sometimes we want to create a new line with different default values (or more generally a customized context), which is possible with this commit. Moreover it is possible to create multiple buttons for multiple default values/contexts.

This works both for in-line creation ("editable=") and dialog creation.

The new tags are:

<control> defines custom controls for the current view.

Does not support any attribute, but can have children:

<create> adds a button to create a new element on the current list.

This makes sense when the parent tree view is inside a One2many field.

If any create is defined, it will overwrite the default "add a line" button.

For more information and example, have a look at the Views documentation.

Technically, the commit will:
- parse the new XML tags (+ add appropriate validation)
- display the buttons based on the XML
- on button click/keyboard: pull up the additional context information from the button event up to the default_get
- add unit tests
- add documentation

PR #25209
2018-07-17 11:50:35 +02:00
Martin Trigaux 78c8cda97e [FIX] doc: reference the correct location of the file
Was moved at d6804a8218
2018-07-16 17:18:57 +02:00
Martin Trigaux 095e8bd7b1 [FIX] doc: remove duplicated section
Was already present in the Internationalisation section
2018-07-16 16:07:25 +02:00
Christophe Simonis 182c2c6919 [MERGE] forward port branch saas-11.4 up to 8285630ad2 2018-07-16 12:34:20 +02:00
Christophe Simonis 8285630ad2 [MERGE] forward port branch saas-11.3 up to 609491ad0e 2018-07-13 17:12:07 +02:00