summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
AgeCommit message (Collapse)Author
2020-11-16[FIX] *: rephrase, correct typosMartin Trigaux
Courtesy of Transifex's translators for reporting bad/unclear sentences. closes odoo/odoo#61785 Related: odoo/enterprise#14751 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-16[FIX] web, doc: remaining_days widgetNicolas Martinelli
The `remaining_days` widget is intended to be used for informative purpose, hence it should not be editable. opw-2362276
2020-09-16[FIX] doc: formatting/rendering issuesRaf Geens
This commits solves different rendering issues in the javascript reference documentation, following the work done in #57270, but for issues added in further versions and missed in the forward-port. Forward-port of #57758 Forward-port of #57775 closes odoo/odoo#57829 X-original-commit: 8885cf578468d34e740bada95440f092f10c6268 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-16[FIX] doc: Formatting issue with some bullet list linesRaf Geens
Some line items in a bulleted list would span a paragraph but the first line of the paragraph would be in bold and the rest would be indented and not bold below it. You would end up with sentences that broke off half in bold and half in the regular font. This was due to wrong indentation in the source. The pattern was also used for more legitimate cases (field descriptions), as well as borderline cases (where a section might have also worked). I've updated the borderline cases to have consistent formatting across the document and removed the bullet points that were prefixing description lists in both cases.
2020-09-16[REM] doc: Removed dead Javascript API doc and linkRaf Geens
MAT confirmed the Javascript API is currently not being built due to repeated compatibility problems between ES6 and the docstring output with no clear solution in sight.
2020-07-01[REF] doc: remove link to js APIMathieu Duckerts-Antoine
The page with the documentation on all js docstrings is regularly broken. We remove here the link referencing it. closes odoo/odoo#53911 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-13[FIX] doc: fix some sphinx warningsVictor Feyens
* crashing patch for howto "Build a module" * javascript_reference: "Bullet list ends without a blank line; unexpected unindent."
2020-05-05[IMP] hr: add Many2OneAvatarEmployee field widgetAaron Bohy
This widget is a variant of the Many2OneAvatarUser widget, designed for many2one fields pointing to 'hr.employee'. Part of task 2195254
2020-05-05[IMP] mail: add Many2OneAvatarUser field widgetAaron Bohy
This widget is an extension of Many2OneAvatar, designed for many2one fields pointing to the 'res.users' model, or a model having itself a many2one field pointing to 'res.partner'. With this widget, when the avatar is clicked, we open a DM chat window with the corresponding partner. If the user clicked on itself, we open a blank chat window for the sake of consistency. In kanban views, this widget only displays the avatar. Part of task 2195254
2020-05-05[IMP] web: add Many2OneAvatar field widgetAaron Bohy
In readonly, this widget displays the image of the related record next to its display_name. In edit, it behaves exactly like the regular many2one. Part of task 2195254
2020-05-05[IMP] web: add RemainingDays field widgetAaron Bohy
This widget can be used on date and datetime fields. In readonly, it displays the delta (in days) between the value of the field and today. In edit, it behaves like a regular date(time) widget. Part of task 2195254
2020-05-05[IMP] web: add BadgeField componentAaron Bohy
This new field component displays the field's value inside a bootstrap pill badge. Supported field types are 'char', 'selection' and 'many2one'. The background color of the badge can be customized by using the decoration-xxx mechanism, e.g. <field name="state" decoration-danger="state == 'cancel'" widget="badge"/> Part of task 2195254
2020-04-17[IMP] web: Numeric fields can be non-formattedLucas Perais (lpe)
This commit introduces a new option in fields inheriting from type Numeric which is `format`. By default, Numeric fields are formatted according to their subtypes and locale Adding, in a view, the option format set to a falsy value will prevent the field's value from being formatted. ``` <field name="int_field" options="{\'format\': false}"/> ``` Task 2050119
2020-04-09[IMP] doc: Update Js control panelxO-Tx
Update information in JS doc for 13.0 (replace control panel mixin with the hasControlPanel attribute). closes odoo/odoo#49291 X-original-commit: 0d46f49a00c6ecb62725ab97c1f337d1b0666852 Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-03-31[IMP] various: Replace incorrect use of "edition"Tiffany Chang (tic)
"Edition" is a French-English false friend word. "Edition" in English means "version" whereas "edition" in French means "editing". This commit updates user facing strings/documents that incorrectly use "edition" instead of "edit" or "editing". Attempts were made to clean up English around "edition" usage so please excuse any errors from lack of context knowledge. Code comments and names incorrectly using "edition" were NOT updated.
2020-01-30[FIX] base,web: url widget: add protocol in hrefDhruv Patel
With this commit, the url widget automatically prefixes the href url by http:// if no protocol is specified, so that clicking on the url will by default redirect to an external website. To prevent this behavior, one can still specify the new option 'website_path: true' on the url field node in the view arch. Thanks to this, we can remove a similar logic (only implemented on res_partner model) which automatically altered the value saved in database to force its 'http://' prefix. task-2153184 closes odoo/odoo#42118 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-22[IMP] web: conditional create/delete options on x2many fieldsMohammed Shekha
After this commit, x2many fields can have options like create/delete which accept a domain, to make create/delete on x2many conditional, say for example x2many field can have options like: options="{'create:' [('foo', '=', True)]', 'delete:' [('foo', '=', True)]'}" With this when foo field is True, Create and Delete actions will be available, but if foo is False then they won't. In case of one2many fields, if 'create' is false, then 'Add a line' (list) or 'Add' button (kanban) won't be displayed. In case of many2many fields, 'Add a line' or 'Add' button will always be displayed even if 'create' condition is false as it doesn't really create records (but rather links existing ones). Same applies for delete. Task-2092953 closes odoo/odoo#42919 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Parth Chokshi <pch@odoo.com> Co-authored-by: Aaron Bohy<aab@odoo.com>
2019-11-05[FIX] doc: fix sphinx warningsVictor Feyens
* Since https://github.com/odoo/odoo/commit/8d5da6e4be05428f3243f92c0464d3c1f6a43873#diff-e07cbcffb9fb7b2eafd1ace3c4b1626a, post_install and at_install test tags have been removed. * minor warnings in javascript reference. closes odoo/odoo#39817 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-16[IMP] web: many2many_binary, binary, image, add the option ↵Debauche Stéphane
``accepted_file_extensions`` Purpose ======= We want to add an option on the widgets - many2many_binary, - binary, - image This option specifies what file extensions the user can pick from the file input dialog box. Examples ======== ```xml <field widget="many2many_binary" options="{'accepted_file_extensions': 'image/*'}"/> <field widget="many2many_binary" options="{'accepted_file_extensions': '.png,.jpeg'}"/> <field widget="many2many_binary" options="{'accepted_file_extensions': 'application/pdf'}"/> <field widget="image" options="{'accepted_file_extensions': '.png,.jpeg'}"/> <field widget="binary" options="{'accepted_file_extensions': '.pdf,.svg'}"/> ``` How === Add an option (accepted_file_extensions) in the template ``HiddenInputFile`` (the widget many2many_binary is using this template) So, we can also use this new option in others widgets using ``HiddenInputFile`` In the many2many_binary, read the ``nodeOptions`` and set the widget attribute ``accepted_file_extensions`` We also have to fix some other widget, because an property ``image_only`` was already existing in the template ``HiddenInputFile`` (we just need to replace ``image_only=True`` to ``accepted_file_extensions='image/*'`` The widget ``FieldPdfViewer`` (pdf_viewer) now use the new option to filtrate PDF (instead of removing the <input/> and adding <input accept='.pdf'/>). Tests ===== We also test if the option is correctly set on the <input/> - binary - image - many2many_binary Impacted widgets =============== - many2many_binary - image: this widget use ``options="{accepted_file_extensions='image/*'}"`` instead of ``image_only=True`` - tablet_image: same as ``image`` Task #2082815 closes odoo/odoo#38351 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-16[FIX] web: add 'no_edit_color' option to many2many_tagsQuentin Nicolay
This option, if set to True, prevents the user from modifying the color of the tags. Part of task 2070454 closes odoo/odoo#38848 X-original-commit: a62b65a8f9114493064d4efae92825814a880c04 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-14[FIX] web: not possible to show a notification via client actionRomeo Fragomeli
Before this commit, it was not possible to show a message using a client action. (e.g. show a success message only with core in Python) Now, it's possible using a client action. This client action call displayNotification and so we can use the same options also. A test is added to be sure that this action do not change the current action Note: in the future a custom registry may be created in a refactoring to specific function action registry. X-original-commit: 8775fd670b6b3ec19a77fc0eab72d2223baa36c8
2019-09-24[MERGE] forward port branch saas-12.4 up to 9ed4872ea03Christophe Simonis
closes odoo/odoo#37372 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24[MERGE] forward port branch saas-12.3 up to bd3e510edbcChristophe Simonis
closes odoo/odoo#37314 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-18[DOC] batch of UI, Https, linter correctionsVictor Feyens
2019-09-13[MERGE] forward port branch saas-12.4 up to fe59754c520Christophe Simonis
closes odoo/odoo#36721 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30[MERGE] forward port branch 12.0 up to 52f6e38cea8Christophe Simonis
2019-08-29[MERGE] forward port branch saas-11.3 up to ede253f1b2eChristophe Simonis
2019-08-29[MERGE] forward port branch 11.0 up to d61873ac4a3Christophe Simonis
2019-08-28[IMP] web: remove m2o from supportedTypes in selection widgetMohammed Shekha
currently widget selection is not working in m2o in editable list view and to fix this issue it need a lots of changes to make it work properly, i.e. make '_fetchSpecialRelation' use correct domain for each record, batch requests as much as possible, also make all '_fetchSpecial...' work in the list case. So to avoid major changes remove supportedTypes from selection widget so user can not tempted to apply selection widget on many2one field. task-1871698 closes odoo/odoo#33485 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-11[MERGE] forward port branch saas-12.3 up to 50e571acf7cChristophe Simonis
closes odoo/odoo#36491 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-02[IMP] *: rename image fieldsSébastien Theys
image_original => image_1920 (now resized to 1920) image_big => image_1024 image_large => image_256 image_medium => image_128 image_small => image_64 image replaced by image_1920 (when writing) or by image_1024 (when displaying what was previously the big size) + add new intermediate format: image_512 PR: #34925
2019-07-30[REM] doc: js apidocXavier Morel
Breaks doc-building all the time, more advanced ES6 features are not supported by the JS parsing library. closes odoo/odoo#35288 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-18[IMP] web: add new date range picker field widgetJigar Patel
Adds a new widget to support start & end date or datetime. closes odoo/odoo#33266 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-13[REF] doc: add async javascript code sectionVincent Schippefilt
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-06[REF] doc: promisify doc examplesDavid Monjoie
Also remove a file on async stuff as its content is outdated, and actually not used.
2019-02-14[IMP] *: add mobile (native) barcode scanner for product fieldRomeo Fragomeli
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-01-09[MERGE] forward port branch 12.0 up to 3e4138deaa2Christophe Simonis
closes odoo/odoo#30045
2018-12-06[FIX] doc: correct spelling mistake in javascript referenceFrederic Junod
2019-04-24[REF] web, *: remove `one2many_list` widgetMartin Geubelle
This widget was exactly the same as a `one2many` and was kept for backward compatibility reasons. It can be safely removed in master. Related to task 1918327
2019-04-23[IMP] web: enable drag&drop in ungrouped kanban viewsVandan Shah
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>
2018-10-22[MERGE] forward port branch 12.0 up to b81c2bce846Christophe Simonis
2018-10-22[MERGE] forward port branch saas-11.4 up to 3c108977c1eChristophe Simonis
2018-10-19[IMP] assets: remove css files splitGéry Debongnie
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-17[MERGE] forward port branch saas-11.3 up to 0de06a41326Christophe Simonis
2018-10-10[MERGE] forward port branch 11.0 up to a69f117bbf5Christophe Simonis
2018-10-09[FIX] web: Make datetimepicker configurable in datetime fieldssvs-odoo
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-02[FIX] doc: correct typoAaron Bohy
2018-09-26[DOC] doc: add documentation on Systray Menu (JS)Géry Debongnie
2018-09-25[DOC] doc: add information on session and client actionGéry Debongnie
2018-09-07[MERGE] forward port branch saas-11.4 up to d78f23df848Christophe Simonis