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.

93 lines
2.8 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. =====================================
  5. Abstract Model to manage SQL Requests
  6. =====================================
  7. This module provide an abstract model to manage SQL Select request on database.
  8. It is not usefull for itself. You can see an exemple of implementation in the
  9. 'sql_export' module. (same repository).
  10. Implemented features
  11. --------------------
  12. * Add some restrictions in the sql request:
  13. * you can only read datas. No update, deletion or creation are possible.
  14. * some tables are not allowed, because they could contains clear password
  15. or keys. For the time being ('ir_config_parameter').
  16. * The request can be in a 'draft' or a 'SQL Valid' status. To be valid,
  17. the request has to be cleaned, checked and tested. All of this operations
  18. can be disabled in the inherited modules.
  19. * This module two new groups:
  20. * SQL Request / User : Can see all the sql requests by default and execute
  21. them, if they are valid.
  22. * SQL Request / Manager : has full access on sql requests.
  23. Usage
  24. =====
  25. Inherit the model:
  26. from openerp import models
  27. class MyModel(models.model)
  28. _name = 'my.model'
  29. _inherit = ['sql.request.mixin']
  30. _sql_request_groups_relation = 'my_model_groups_rel'
  31. _sql_request_users_relation = 'my_model_users_rel'
  32. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  33. :alt: Try me on Runbot
  34. :target: https://runbot.odoo-community.org/runbot/149/8.0
  35. Bug Tracker
  36. ===========
  37. Bugs are tracked on `GitHub Issues
  38. <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  39. check there if your issue has already been reported. If you spotted it first,
  40. help us smash it by providing detailed and welcomed feedback.
  41. Credits
  42. =======
  43. Images
  44. ------
  45. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  46. Contributors
  47. ------------
  48. * Florian da Costa <florian.dacosta@akretion.com>
  49. * Sylvain LE GAL (https://twitter.com/legalsylvain)
  50. Funders
  51. -------
  52. The development of this module has been financially supported by:
  53. * Akretion (<http://www.akretion.com>)
  54. * GRAP, Groupement Régional Alimentaire de Proximité (<http://www.grap.coop>)
  55. Maintainer
  56. ----------
  57. .. image:: https://odoo-community.org/logo.png
  58. :alt: Odoo Community Association
  59. :target: https://odoo-community.org
  60. This module is maintained by the OCA.
  61. OCA, or the Odoo Community Association, is a nonprofit organization whose
  62. mission is to support the collaborative development of Odoo features and
  63. promote its widespread use.
  64. To contribute to this module, please visit https://odoo-community.org.