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.

109 lines
3.1 KiB

  1. .. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
  3. :alt: License: LGPL-3
  4. =========================
  5. Extended view inheritance
  6. =========================
  7. This module was written to make it simple to add custom operators for view
  8. inheritance.
  9. Usage
  10. =====
  11. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  12. :alt: Try me on Runbot
  13. :target: https://runbot.odoo-community.org/runbot/149/9.0
  14. Change a python dictionary (context for example)
  15. ------------------------------------------------
  16. .. code-block:: xml
  17. <attribute name="$attribute" operation="python_dict" key="$key">
  18. $new_value
  19. </attribute>
  20. Note that views are subject to evaluation of xmlids anyways, so if you need
  21. to refer to some xmlid, say ``%(xmlid)s``.
  22. Move an element in the view
  23. ---------------------------
  24. .. code-block:: xml
  25. <xpath expr="$xpath" position="move" target="$targetxpath" />
  26. This can also be used to wrap some element into another, create the target
  27. element first, then move the node youwant to wrap there.
  28. Add to values in a list (states for example)
  29. --------------------------------------------
  30. .. code-block:: xml
  31. <attribute name="$attribute" operation="list_add">
  32. $new_value(s)
  33. </attribute>
  34. Remove values from a list (states for example)
  35. ----------------------------------------------
  36. .. code-block:: xml
  37. <attribute name="$attribute" operation="list_remove">
  38. $remove_value(s)
  39. </attribute>
  40. Known issues / Roadmap
  41. ======================
  42. * add ``<attribute operation="json_dict" key="$key">$value</attribute>``
  43. * support ``<xpath expr="$xpath" position="move" target="xpath" target_position="position" />``
  44. * support an ``eval`` attribute for our new node types
  45. Bug Tracker
  46. ===========
  47. Bugs are tracked on `GitHub Issues
  48. <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  49. check there if your issue has already been reported. If you spotted it first,
  50. help us smashing it by providing a detailed and welcomed feedback.
  51. Credits
  52. =======
  53. Images
  54. ------
  55. * Odoo Community Association:
  56. `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  57. Contributors
  58. ------------
  59. * Holger Brunn <hbrunn@therp.nl>
  60. * Ronald Portier <rportier@therp.nl>
  61. Do not contact contributors directly about help with questions or problems
  62. concerning this addon, but use the
  63. `community mailing list <mailto:community@mail.odoo.com>`_ or the
  64. `appropriate specialized mailinglist <https://odoo-community.org/groups>`_
  65. for help, and the bug tracker linked in `Bug Tracker`_ above for
  66. technical issues.
  67. Maintainer
  68. ----------
  69. .. image:: https://odoo-community.org/logo.png
  70. :alt: Odoo Community Association
  71. :target: https://odoo-community.org
  72. This module is maintained by the OCA.
  73. OCA, or the Odoo Community Association, is a nonprofit organization whose
  74. mission is to support the collaborative development of Odoo features and
  75. promote its widespread use.
  76. To contribute to this module, please visit https://odoo-community.org.