You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
3.9 KiB

  1. =========================
  2. Extended view inheritance
  3. =========================
  4. .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  5. !! This file is generated by oca-gen-addon-readme !!
  6. !! changes will be overwritten. !!
  7. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8. .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
  9. :target: https://odoo-community.org/page/development-status
  10. :alt: Beta
  11. .. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
  12. :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
  13. :alt: License: LGPL-3
  14. .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
  15. :target: https://github.com/OCA/server-tools/tree/11.0/base_view_inheritance_extension
  16. :alt: OCA/server-tools
  17. .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
  18. :target: https://translation.odoo-community.org/projects/server-tools-11-0/server-tools-11-0-base_view_inheritance_extension
  19. :alt: Translate me on Weblate
  20. .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
  21. :target: https://runbot.odoo-community.org/runbot/149/11.0
  22. :alt: Try me on Runbot
  23. |badge1| |badge2| |badge3| |badge4| |badge5|
  24. This module was written to make it simple to add custom operators for view
  25. inheritance.
  26. **Table of contents**
  27. .. contents::
  28. :local:
  29. Usage
  30. =====
  31. **Change a python dictionary (context for example)**
  32. .. code-block:: xml
  33. <attribute name="$attribute" operation="python_dict" key="$key">
  34. $new_value
  35. </attribute>
  36. Note that views are subject to evaluation of xmlids anyways, so if you need
  37. to refer to some xmlid, say ``%(xmlid)s``.
  38. **Move an element in the view**
  39. .. code-block:: xml
  40. <xpath expr="$xpath" position="move" target="$targetxpath" />
  41. This can also be used to wrap some element into another, create the target
  42. element first, then move the node youwant to wrap there.
  43. **Add to values in a list (states for example)**
  44. .. code-block:: xml
  45. <attribute name="$attribute" operation="list_add">
  46. $new_value(s)
  47. </attribute>
  48. **Remove values from a list (states for example)**
  49. .. code-block:: xml
  50. <attribute name="$attribute" operation="list_remove">
  51. $remove_value(s)
  52. </attribute>
  53. Known issues / Roadmap
  54. ======================
  55. * add ``<attribute operation="json_dict" key="$key">$value</attribute>``
  56. * support ``<xpath expr="$xpath" position="move" target="xpath" target_position="position" />``
  57. * support an ``eval`` attribute for our new node types
  58. Bug Tracker
  59. ===========
  60. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
  61. In case of trouble, please check there if your issue has already been reported.
  62. If you spotted it first, help us smashing it by providing a detailed and welcomed
  63. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  64. Do not contact contributors directly about support or help with technical issues.
  65. Credits
  66. =======
  67. Authors
  68. ~~~~~~~
  69. * Therp BV
  70. Contributors
  71. ~~~~~~~~~~~~
  72. * Holger Brunn <hbrunn@therp.nl>
  73. * Ronald Portier <rportier@therp.nl>
  74. * Sergio Teruel <sergio.teruel@tecnativa.com>
  75. Maintainers
  76. ~~~~~~~~~~~
  77. This module is maintained by the OCA.
  78. .. image:: https://odoo-community.org/logo.png
  79. :alt: Odoo Community Association
  80. :target: https://odoo-community.org
  81. OCA, or the Odoo Community Association, is a nonprofit organization whose
  82. mission is to support the collaborative development of Odoo features and
  83. promote its widespread use.
  84. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/11.0/base_view_inheritance_extension>`_ project on GitHub.
  85. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.