summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorDharmraj Jhala <dja@odoo.com>2018-04-04 23:01:47 +0530
committerGéry Debongnie <ged@odoo.com>2018-04-05 15:15:07 +0200
commitb67331fc18109d013624e6c11ba52d0c61c17975 (patch)
treea0a47bfdfabc6719e9bf3fd6a4b68f8ec05fe426 /doc/reference/javascript_reference.rst
parentfef6d7967f31b38abc96b97a67c0265be4c371aa (diff)
[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.
Diffstat (limited to 'doc/reference/javascript_reference.rst')
-rw-r--r--doc/reference/javascript_reference.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst
index b77aa9f5612..d13b2b86412 100644
--- a/doc/reference/javascript_reference.rst
+++ b/doc/reference/javascript_reference.rst
@@ -1782,6 +1782,14 @@ Relational fields
- Supported field types: *one2many*
+ Options:
+
+ - create_text: a string that is used to customize the 'Add' label/text.
+
+ .. code-block:: xml
+
+ <field name="turtles" options="{\'create_text\': \'Add turtle\'}">
+
- statusbar (FieldStatus)
This is a really specialized widget for the form views. It is the bar on top
of many forms which represent a flow, and allow selecting a specific state.