Commit Graph
34 Commits
Author SHA1 Message Date
9b90d8727d [IMP] web: enable drag&drop in ungrouped kanban views
With this rev., the resequencing feature (with drag and drop) that
was already available in list views is now available also in kanban
views having a field with widget="handle". This works for main as
well as x2many kanban views.

Some code handling the resequencing has been moved from the list
components (controller and renderer) to the basic ones, so that the
logic is shared between list and kanban.

Task 1902808

closes odoo/odoo#28581

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-04-23 13:45:15 +00:00
Vincent Schippefilt 3f8b04484b [REF] doc: add async javascript code section
in javascript Cheatsheet, add a bunch of example about asynchronous code

closes odoo/odoo#31716

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13 14:34:05 +00:00
David Monjoie 7cb64b5e93 [REF] doc: promisify doc examples
Also remove a file on async stuff as its content is outdated, and
actually not used.
2019-03-06 20:07:17 +01:00
Romeo Fragomeli 183ff490d6 [IMP] *: add mobile (native) barcode scanner for product field
This commit change widget to many2one_barcode in these views:
- sale_order
- purchase
- invoice
- expense

In the fields register 'many2one_barcode' is mapped to many2one as fallback.
many2one_barcode is implemented in odoo enterprise

Task ID: 1924766

closes odoo/odoo#31018
2019-02-14 09:41:33 +00:00
Christophe Simonis 8aa8548d8a [MERGE] forward port branch 12.0 up to 3e4138deaa
closes odoo/odoo#30045
2019-01-09 15:56:53 +00:00
Frederic Junod 181ec4fe49 [FIX] doc: correct spelling mistake in javascript reference 2018-12-06 10:32:32 +00:00
Christophe Simonis 9dbb7d199c [MERGE] forward port branch 12.0 up to b81c2bce84 2018-10-22 17:57:08 +02:00
Christophe Simonis b81c2bce84 [MERGE] forward port branch saas-11.4 up to 3c108977c1 2018-10-22 16:59:51 +02:00
Géry Debongnie a8cec47c93 [IMP] assets: remove css files split
Before this commit, our asset bundles had a special behaviour for
bundles of type css: because of an old limitation in IE9, css files had
to be split to make sure they had less than 4095 rules per stylesheets.

Since we no longer support IE9, this code can be removed, which should
slightly simplify the bundle code, and should slightly reduce the number
of requests required to properly load odoo.

closes odoo/odoo#27933
2018-10-19 09:18:28 +00:00
Christophe Simonis e9ae419fca [MERGE] forward port branch saas-11.3 up to 0de06a4132 2018-10-17 10:54:19 +02:00
Christophe Simonis 7415f40fbd [MERGE] forward port branch 11.0 up to a69f117bbf 2018-10-10 14:40:01 +02:00
svs-odoo 078b31dc7f [FIX] web: Make datetimepicker configurable in datetime fields
The datetimepicker option was introduced to be able to customize the
datetime picker widget in date/datetime fields. However, due to the way
the _makeDatePicker function was coded, it did not work in datetime
fields.

Thank to Yajo for the initial fix

closes odoo/odoo#27541
2018-10-09 12:34:23 +00:00
Aaron Bohy ce1c2cf669 [FIX] doc: correct typo 2018-10-02 14:48:19 +02:00
Géry Debongnie cc5e298185 [DOC] doc: add documentation on Systray Menu (JS) 2018-09-26 17:39:51 +02:00
Géry Debongnie 17ef915ff2 [DOC] doc: add information on session and client action 2018-09-25 17:17:25 +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
Sylvain LE GAL 3c0a0261be [FIX] doc: js mixin inheritance
Hamster extends Animal, not itself

Closes #26595
2018-08-27 15:26: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
Sébastien Theys b2c1d5ede2 [IMP] web: fix default sequence for list with handle
The sequence had a static default value, but when there is an handle, it's important that new items are added at the top or the bottom of the list.

This is a rare case where the defaul_get from the server will be ignored by the view for a certain field.

This will work:
- both in editable mode (inline) and in dialog mode,
- both for X2Many and standalone list.
2018-06-29 10:39:42 +02:00
Christophe Simonis 73652a0b19 [MERGE] forward port branch saas-11.3 up to 50860317cc
Note: 1aacc96262 has been ignored and will
be forward-ported later
2018-06-15 13:27:27 +02:00
Christophe Simonis 50860317cc [MERGE] forward port branch saas-11.2 up to b170a753e1 2018-06-15 11:30:27 +02:00
Jairo Llopis 71334b13bd [IMP] web: Expose datepicker configuration to view declarations
The lower-level widget itself supports passing options to the underlying
datepicker library. However this is not exposed to higher-level view
declaration. With this patch, one can declare a field in a view such as:

```xml
<field name="datefield" options='{"daysOfWeekDisabled": [0, 6]}'/>
```

That option would land in the widget and disable those weekdays.

Documentation has been updated accordingly.

Closes #25044.
2018-06-13 14:53:11 +02:00
oco-odoo d4cd8be48f [IMP] web: add decoration support for all field widgets (#25160)
It is sometimes useful to be able to customize slightly the color of a
field depending on some conditions on the current record.

For example, imagine that we want to show a VAT number field in green/red, if
it was validated or not. To do that, we can add a field with an
onchange, and simply add decoration-danger and decoration-success
attributes to the field.
2018-06-08 15:20:49 +02:00
Siddarth GajjarandMohammed Shekha c75c2fa9e3 [IMP] web: add a badge based widget for selection fields
This commit introduces a new widget to be used for selection-based fields.
Valid choices are displayed using rectangular badges and not like the
standard list. This widget is valid for selection and many2one fields
like selection or radio widgets.

Co-authored-by: Siddarth Gajjar <sga@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-05-30 15:39:15 +02:00
Géry Debongnie a577ee12a0 [DOC] web: add documentation on notification system
Also, fix a few errors in the js docstring
2018-04-19 17:17:54 +02:00
qsm-odoo 16ddf4ae54 [REF] doc: adapt to mention scss instead of less 2018-04-18 15:59:26 +02:00
Dharmraj Jhala b67331fc18 [IMP] web: Allow user to set custom 'create_text' for x2m fields
For x2many relational fields(of type kanban), we shoud be able to set custom label for
'Create / Add' button by adding 'create_text' node option on particual field from xml.

Right now, 'create_text' is only handled for many2many fields, preventing users to set
custom label for one2many fields.

This commit allows users to set Create Button label for both m2m and o2m fields.
2018-04-05 15:15:07 +02:00
Xavier Morel 4e784adbf7 [FIX] doc: non-module JS autodocumenters
Also when there is both a docstring and directive-level content put
the docstring first. That seems to match what Sphinx's autodoc does
and looks less odd.

Possible future improvement: a parameter to suppress the docstring?
Possibly a way to reorder the non-docstring content (e.g. members
documentation)?
2018-04-05 12:31:27 +02:00
Xavier Morel 944755dd1d [FIX] doc: non-module JS autodocumenters
Also when there is both a docstring and directive-level content put
the docstring first. That seems to match what Sphinx's autodoc does
and looks less odd.

Possible future improvement: a parameter to suppress the docstring?
Possibly a way to reorder the non-docstring content (e.g. members
documentation)?
2018-04-05 12:28:56 +02:00
Géry Debongnie 19946294fa [DOC] doc: update/add documentation on js framework
The state of the JS documentation was quite sad, not updated in a long
time.  With this commit, we rework a lot of the JS doc.  Most notably,
we add a section 'Javascript Cheatsheet' (help on some common
customization tasks) and rewrite the 'Javascript Reference' totally.

Note that the JS reference page also contains a reference on all field
widgets.

This work is just the beginning, it is probably not complete, but at
least we will have a foundation.
2018-04-05 09:22:09 +02:00
Géry Debongnie ea6e7379a3 [DOC] doc: update/add documentation on js framework
The state of the JS documentation was quite sad, not updated in a long
time.  With this commit, we rework a lot of the JS doc.  Most notably,
we add a section 'Javascript Cheatsheet' (help on some common
customization tasks) and rewrite the 'Javascript Reference' totally.

Note that the JS reference page also contains a reference on all field
widgets.

This work is just the beginning, it is probably not complete, but at
least we will have a foundation.
2018-03-30 14:11:49 +02:00