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.

111 lines
4.0 KiB

  1. ====================
  2. Configuration Helper
  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-AGPL--3-blue.png
  12. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  13. :alt: License: AGPL-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/configuration_helper
  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-configuration_helper
  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 is intended for developer only. It does nothing used alone.*
  25. It helps to create `config.settings` by providing an abstract Class.
  26. This class:
  27. * creates automatically related fields in 'res.config.settings'
  28. using those defined in 'res.company': it avoids duplicated field definitions.
  29. * company_id field with default value is created
  30. * onchange_company_id is defined to update all related fields
  31. * supported fields: char, text, integer, float, datetime, date, boolean, m2o
  32. **Table of contents**
  33. .. contents::
  34. :local:
  35. Usage
  36. =====
  37. .. code-block:: python
  38. from . company import ResCompany
  39. class WhatiwantConfigSettings(models.TransientModel):
  40. _inherit = ['res.config.settings', 'abstract.config.settings']
  41. _name = 'res.config.settings'
  42. # fields must be defined in ResCompany class
  43. # related fields are automatically generated from previous definitions
  44. _companyObject = ResCompany
  45. # all prefixed field with _prefix in res.company, will be available in 'res.config.settings' model
  46. _prefix = 'prefixyouchoose_'
  47. Known issues / Roadmap
  48. ======================
  49. * support (or check support) for these field types : o2m, m2m, reference, property, selection
  50. * automatically generate a default view for 'res.config.settings' (in --debug ?)
  51. Bug Tracker
  52. ===========
  53. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
  54. In case of trouble, please check there if your issue has already been reported.
  55. If you spotted it first, help us smashing it by providing a detailed and welcomed
  56. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20configuration_helper%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  57. Do not contact contributors directly about support or help with technical issues.
  58. Credits
  59. =======
  60. Authors
  61. ~~~~~~~
  62. * Akretion
  63. Contributors
  64. ~~~~~~~~~~~~
  65. * Yannick Vaucher <yannick.vaucher@camptocamp.com>
  66. * David BEAL <david.beal@akretion.com>
  67. * Sébastien BEAU <sebastien.beau@akretion.com>
  68. * Angel Moya <angel.moya@pesol.es>
  69. * Akim Juillerat <akim.juillerat@camptocamp.com>
  70. * Patrick Tombez <patrick.tombez@camptocamp.com>
  71. Maintainers
  72. ~~~~~~~~~~~
  73. This module is maintained by the OCA.
  74. .. image:: https://odoo-community.org/logo.png
  75. :alt: Odoo Community Association
  76. :target: https://odoo-community.org
  77. OCA, or the Odoo Community Association, is a nonprofit organization whose
  78. mission is to support the collaborative development of Odoo features and
  79. promote its widespread use.
  80. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/configuration_helper>`_ project on GitHub.
  81. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.