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.

73 lines
2.0 KiB

10 years ago
  1. 2D matrix for x2many fields
  2. ===========================
  3. This module allows to show an x2many field with 3-tuples
  4. ($x_value, $y_value, $value) in a table
  5. +-----------+-----------+-----------+
  6. | | $x_value1 | $x_value2 |
  7. +===========+===========+===========+
  8. | $y_value1 | $value1/1 | $value2/1 |
  9. +-----------+-----------+-----------+
  10. | $y_value2 | $value1/2 | $value2/2 |
  11. +-----------+-----------+-----------+
  12. where `valuen/n` is editable.
  13. Usage
  14. =====
  15. Use this widget by saying::
  16. <field name="my_field" widget="x2many_2d_matrix" />
  17. This assumes that my_field refers to a model with the fields `x`, `y` and
  18. `value`. If your fields are named differently, pass the correct names as
  19. attributes::
  20. <field name="my_field" widget="x2many_2d_matrix"
  21. field_x_axis="my_field1" field_y_axis="my_field2" field_value="my_field3" />
  22. You can pass the following parameters:
  23. field_x_axis
  24. The field that indicates the x value of a point
  25. field_y_axis
  26. The field that indicates the y value of a point
  27. field_label_x_axis
  28. Use another field to display in the table header
  29. field_label_y_axis
  30. Use another field to display in the table header
  31. field_value
  32. Show this field as value
  33. show_row_totals
  34. If field_value is a numeric field, calculate row totals
  35. show_column_totals
  36. If field_value is a numeric field, calculate column totals
  37. Known issues / Roadmap
  38. ======================
  39. * it would be worth trying to instantiate the proper field widget and let it render the input
  40. Credits
  41. =======
  42. Contributors
  43. ------------
  44. * Holger Brunn <hbrunn@therp.nl>
  45. Maintainer
  46. ----------
  47. .. image:: http://odoo-community.org/logo.png
  48. :alt: Odoo Community Association
  49. :target: http://odoo-community.org
  50. This module is maintained by the OCA.
  51. OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
  52. To contribute to this module, please visit http://odoo-community.org.