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.

88 lines
3.0 KiB

  1. in the field's options dict
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. ``create`` *boolean* (Default: depends if user have create rights)
  4. Whether to display the "Create..." entry in dropdown panel.
  5. ``create_edit`` *boolean* (Default: depends if user have create rights)
  6. Whether to display "Create and Edit..." entry in dropdown panel
  7. ``m2o_dialog`` *boolean* (Default: depends if user have create rights)
  8. Whether to display the many2one dialog in case of validation error.
  9. ``limit`` *int* (Default: openerp default value is ``7``)
  10. Number of displayed record in drop-down panel
  11. ``search_more`` *boolean*
  12. Used to force disable/enable search more button.
  13. ``field_color`` *string*
  14. A string to define the field used to define color.
  15. This option has to be used with colors.
  16. ``colors`` *dictionary*
  17. A dictionary to link field value with a HTML color.
  18. This option has to be used with field_color.
  19. ``no_open_edit`` *boolean* (Default: value of ``no_open`` which is ``False`` if not set)
  20. Causes a many2one not to offer to click through in edit mode, but well in read mode
  21. ``open`` *boolean* (Default: ``False``)
  22. Makes many2many_tags buttons that open the linked resource
  23. ``no_color_picker`` *boolean* (Default: ``False``)
  24. Deactivates the color picker on many2many_tags buttons to do nothing (ignored if open is set)
  25. ir.config_parameter options
  26. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. Now you can disable "Create..." and "Create and Edit..." entry for all widgets in the odoo instance.
  28. If you disable one option, you can enable it for particular field by setting "create: True" option directly on the field definition.
  29. ``web_m2x_options.create`` *boolean* (Default: depends if user have create rights)
  30. Whether to display the "Create..." entry in dropdown panel for all fields in the odoo instance.
  31. ``web_m2x_options.create_edit`` *boolean* (Default: depends if user have create rights)
  32. Whether to display "Create and Edit..." entry in dropdown panel for all fields in the odoo instance.
  33. ``web_m2x_options.m2o_dialog`` *boolean* (Default: depends if user have create rights)
  34. Whether to display the many2one dialog in case of validation error for all fields in the odoo instance.
  35. ``web_m2x_options.limit`` *int* (Default: openerp default value is ``7``)
  36. Number of displayed record in drop-down panel for all fields in the odoo instance
  37. ``web_m2x_options.search_more`` *boolean* (Default: default value is ``False``)
  38. Whether the field should always show "Search more..." entry or not.
  39. To add these parameters go to Configuration -> Technical -> Parameters -> System Parameters and add new parameters like:
  40. - web_m2x_options.create: False
  41. - web_m2x_options.create_edit: False
  42. - web_m2x_options.m2o_dialog: False
  43. - web_m2x_options.limit: 10
  44. - web_m2x_options.search_more: True
  45. Example
  46. ~~~~~~~
  47. Your XML form view definition could contain::
  48. ...
  49. <field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false, 'search_more':true 'field_color':'state', 'colors':{'active':'green'}}"/>
  50. ...