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.

74 lines
2.0 KiB

10 years ago
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. * no validation yet
  40. * it would be better to instantiate the proper field widget and let it render the input
  41. Credits
  42. =======
  43. Contributors
  44. ------------
  45. * Holger Brunn <hbrunn@therp.nl>
  46. Maintainer
  47. ----------
  48. .. image:: http://odoo-community.org/logo.png
  49. :alt: Odoo Community Association
  50. :target: http://odoo-community.org
  51. This module is maintained by the OCA.
  52. 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.
  53. To contribute to this module, please visit http://odoo-community.org.