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.

120 lines
3.8 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/12.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-12-0/server-tools-12-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/12.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. **Add to values in a list (states for example)**
  39. .. code-block:: xml
  40. <attribute name="$attribute" operation="list_add">
  41. $new_value(s)
  42. </attribute>
  43. **Remove values from a list (states for example)**
  44. .. code-block:: xml
  45. <attribute name="$attribute" operation="list_remove">
  46. $remove_value(s)
  47. </attribute>
  48. **Move an element in the view**
  49. This feature is now native, cf the `official Odoo documentation <https://www.odoo.com/documentation/12.0/reference/views.html#inheritance-specs>`_.
  50. Known issues / Roadmap
  51. ======================
  52. * add ``<attribute operation="json_dict" key="$key">$value</attribute>``
  53. * support ``<xpath expr="$xpath" position="move" target="xpath" target_position="position" />``
  54. * support an ``eval`` attribute for our new node types
  55. Bug Tracker
  56. ===========
  57. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
  58. In case of trouble, please check there if your issue has already been reported.
  59. If you spotted it first, help us smashing it by providing a detailed and welcomed
  60. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  61. Do not contact contributors directly about support or help with technical issues.
  62. Credits
  63. =======
  64. Authors
  65. ~~~~~~~
  66. * Therp BV
  67. Contributors
  68. ~~~~~~~~~~~~
  69. * Holger Brunn <hbrunn@therp.nl>
  70. * Ronald Portier <rportier@therp.nl>
  71. * Sergio Teruel <sergio.teruel@tecnativa.com>
  72. Maintainers
  73. ~~~~~~~~~~~
  74. This module is maintained by the OCA.
  75. .. image:: https://odoo-community.org/logo.png
  76. :alt: Odoo Community Association
  77. :target: https://odoo-community.org
  78. OCA, or the Odoo Community Association, is a nonprofit organization whose
  79. mission is to support the collaborative development of Odoo features and
  80. promote its widespread use.
  81. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/base_view_inheritance_extension>`_ project on GitHub.
  82. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.