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.

85 lines
2.1 KiB

8 years ago
8 years ago
  1. CLI shell for Odoo
  2. ==================
  3. Makes available in Odoo 8 the `shell` server command available for Odoo 9.
  4. Installation
  5. ============
  6. Just install the module.
  7. Configuration
  8. =============
  9. Nothing special to be configured.
  10. Usage
  11. =====
  12. To have this feature available this module just need to be in the
  13. addons path. To use it, in a terminal window run:
  14. $ ./odoo.py shell -d <dbname>
  15. This will initialize a server instance and then jump into a Pyhton
  16. interactive shell, with full access to the Odoo API.
  17. Example session:
  18. >>> self
  19. res.users(1,)
  20. >>> self.name
  21. u'Administrator'
  22. >>> self._name
  23. 'res.users'
  24. >>> self.env
  25. <openerp.api.Environment object at 0xb3f4f52c>
  26. >>> self.env['res.partner'].search([('name', 'like', 'Ag')])
  27. res.partner(7, 51)
  28. Troubleshooting
  29. ===============
  30. If the command does nothing, or if you have the error::
  31. Usage: odoo.py [options]
  32. odoo.py: error: unrecognized parameters: 'shell'
  33. it is surely because of the order of the parameters. Try the following::
  34. $ ./odoo.py --addons-path=<your_path1>,<your_path2> shell --config=<your_config_file> -d <dbname>
  35. Bug Tracker
  36. ===========
  37. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
  38. In case of trouble, please check there if your issue has already been reported.
  39. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  40. `here <https://github.com/OCA/server-tools/issues/new?body=module:%20shell%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  41. Credits
  42. =======
  43. Contributors
  44. ------------
  45. * OpenERP S.A.
  46. * Daniel Reis <dgreis@sapo.pt>
  47. Maintainer
  48. ----------
  49. .. image:: http://odoo-community.org/logo.png
  50. :alt: Odoo Community Association
  51. :target: http://odoo-community.org
  52. This module is maintained by the OCA.
  53. OCA, or the Odoo Community Association, is a nonprofit organization whose
  54. mission is to support the collaborative development of Odoo features and
  55. promote its widespread use.
  56. To contribute to this module, please visit http://odoo-community.org.