[DOC] getting_started: improved content
bzr revid: tde@openerp.com-20120417110940-b8mq1sqone0wpycp
This commit is contained in:
parent
efa85ca080
commit
8624a85a20
|
@ -1,12 +1,12 @@
|
|||
=========================================
|
||||
========================================
|
||||
Getting started with OpenERP development
|
||||
=========================================
|
||||
========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
Installation from sources
|
||||
++++++++++++++++++++++++++
|
||||
==========================
|
||||
|
||||
.. _getting_started_installation_source-link:
|
||||
|
||||
|
@ -45,8 +45,14 @@ This will create the following structure inside your ``source`` directory, and f
|
|||
|
||||
Some dependencies are necessary to use OpenERP. Depending on your environment, you might have to install the following packages::
|
||||
|
||||
sudo apt-get install graphviz ghostscript postgresql
|
||||
python-imaging python-matplotlib
|
||||
sudo apt-get install graphviz ghostscript postgresql-client
|
||||
|
||||
sudo apt-get install python-dateutil python-feedparser python-gdata
|
||||
python-ldap python-libxslt1 python-lxml python-mako, python-openid
|
||||
python-psycopg2 python-pybabel python-pychart python-pydot
|
||||
python-pyparsing python-reportlab python-simplejson python-tz
|
||||
python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt
|
||||
python-yaml python-zsi python-imaging python-matplotlib
|
||||
|
||||
Next step is to initialize the database. This will create a new openerp role::
|
||||
|
||||
|
@ -61,188 +67,45 @@ Testing your installation can be done on http://localhost:8069/ . You should see
|
|||
.. _Launchpad: https://launchpad.net/
|
||||
.. _Bazaar: http://bazaar.canonical.com/en/
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
.. _getrting_started_configuration-link:
|
||||
|
||||
Two configuration files are available:
|
||||
|
||||
* one for the client: ~/.openerprc
|
||||
* one for the server: ~/.openerp_serverrc
|
||||
|
||||
Those files follow the convention used by python's ConfigParser module.
|
||||
|
||||
Lines beginning with "#" or ";" are comments.
|
||||
|
||||
The client configuration file is automatically generated upon the first start. The one of the server can automatically be created using the command: ::
|
||||
|
||||
openerp-server.py -s
|
||||
|
||||
If they are not found, the server and the client will start with the default configuration.
|
||||
|
||||
|
||||
**Server Configuration File**
|
||||
|
||||
The server configuration file .openerp_serverrc is used to save server startup options. Here is the list of the available options:
|
||||
|
||||
:interface:
|
||||
Address to which the server will be bound
|
||||
|
||||
:port:
|
||||
Port the server will listen on
|
||||
|
||||
:database:
|
||||
Name of the database to use
|
||||
|
||||
:user:
|
||||
Username used when connecting to the database
|
||||
|
||||
:translate_in:
|
||||
File used to translate OpenERP to your language
|
||||
|
||||
:translate_out:
|
||||
File used to export the language OpenERP use
|
||||
|
||||
:language:
|
||||
Use this language as the language of the server. This must be specified as an ISO country code, as specified by the W3C.
|
||||
|
||||
:verbose:
|
||||
Enable debug output
|
||||
|
||||
:init:
|
||||
init a module (use "all" for all modules)
|
||||
|
||||
:update:
|
||||
update a module (use "all" for all modules)
|
||||
|
||||
:upgrade:
|
||||
Upgrade/install/uninstall modules
|
||||
|
||||
:db_name:
|
||||
specify the database name
|
||||
|
||||
:db_user:
|
||||
specify the database user name
|
||||
|
||||
:db_password:
|
||||
specify the database password
|
||||
|
||||
:pg_path:
|
||||
specify the pg executable path
|
||||
|
||||
:db_host:
|
||||
specify the database host
|
||||
|
||||
:db_port:
|
||||
specify the database port
|
||||
|
||||
:translate_modules:
|
||||
Specify modules to export. Use in combination with --i18n-export
|
||||
|
||||
|
||||
You can create your own configuration file by specifying -s or --save on the server command line. If you would like to write an alternative configuration file, use -c <config file> or --config=<config file>
|
||||
Here is a basic configuration for a server::
|
||||
|
||||
[options]
|
||||
verbose = False
|
||||
xmlrpc = True
|
||||
database = terp
|
||||
update = {}
|
||||
port = 8069
|
||||
init = {}
|
||||
interface = 127.0.0.1
|
||||
reportgz = False
|
||||
|
||||
Full Example for Server V5.0 ::
|
||||
|
||||
[printer]
|
||||
path = none
|
||||
softpath_html = none
|
||||
preview = True
|
||||
softpath = none
|
||||
|
||||
[logging]
|
||||
output = stdout
|
||||
logger =
|
||||
verbose = True
|
||||
level = error
|
||||
|
||||
[help]
|
||||
index = http://www.openerp.com/documentation/user-manual/
|
||||
context = http://www.openerp.com/scripts/context_index.php
|
||||
|
||||
[form]
|
||||
autosave = False
|
||||
toolbar = True
|
||||
|
||||
[support]
|
||||
recipient = support@openerp.com
|
||||
support_id =
|
||||
|
||||
[tip]
|
||||
position = 0
|
||||
autostart = False
|
||||
|
||||
[client]
|
||||
lang = en_US
|
||||
default_path = /home/user
|
||||
filetype = {}
|
||||
theme = none
|
||||
toolbar = icons
|
||||
form_tab_orientation = 0
|
||||
form_tab = top
|
||||
|
||||
[survey]
|
||||
position = 3
|
||||
|
||||
[path]
|
||||
pixmaps = /usr/share/pixmaps/openerp-client/
|
||||
share = /usr/share/openerp-client/
|
||||
|
||||
[login]
|
||||
db = eo2
|
||||
login = admin
|
||||
protocol = http://
|
||||
port = 8069
|
||||
server = localhost
|
||||
|
||||
|
||||
Command line options
|
||||
====================
|
||||
|
||||
Using the command ::
|
||||
|
||||
./openerp-server --help
|
||||
|
||||
gives you the available command line options. For OpenERP server at revision 4133, an output example is given in the `Command line options example`_. Here are a few interesting command line options.
|
||||
|
||||
General Options
|
||||
---------------
|
||||
+++++++++++++++
|
||||
|
||||
::
|
||||
|
||||
--version show program version number and exit
|
||||
-h, --help show this help message and exit
|
||||
-c CONFIG, --config=CONFIG
|
||||
specify alternate config file
|
||||
-c CONFIG, --config=CONFIG specify alternate config file
|
||||
-s, --save save configuration to ~/.terp_serverrc
|
||||
-v, --verbose enable debugging
|
||||
--pidfile=PIDFILE file where the server pid will be stored
|
||||
--logfile=LOGFILE file where the server log will be stored
|
||||
-n INTERFACE, --interface=INTERFACE
|
||||
specify the TCP IP address
|
||||
-n INTERFACE, --interface=INTERFACE specify the TCP IP address
|
||||
-p PORT, --port=PORT specify the TCP port
|
||||
--net_interface=NETINTERFACE
|
||||
specify the TCP IP address for netrpc
|
||||
--net_interface=NETINTERFACE specify the TCP IP address for netrpc
|
||||
--net_port=NETPORT specify the TCP port for netrpc
|
||||
--no-netrpc disable netrpc
|
||||
--no-xmlrpc disable xmlrpc
|
||||
-i INIT, --init=INIT init a module (use "all" for all modules)
|
||||
--without-demo=WITHOUT_DEMO
|
||||
load demo data for a module (use "all" for all
|
||||
modules)
|
||||
-u UPDATE, --update=UPDATE
|
||||
update a module (use "all" for all modules)
|
||||
--without-demo=WITHOUT_DEMO load demo data for a module (use "all" for all modules)
|
||||
-u UPDATE, --update=UPDATE update a module (use "all" for all modules)
|
||||
--stop-after-init stop the server after it initializes
|
||||
--debug enable debug mode
|
||||
-S, --secure launch server over https instead of http
|
||||
--smtp=SMTP_SERVER specify the SMTP server for sending mail
|
||||
|
||||
Database related options:
|
||||
-------------------------
|
||||
Database related options
|
||||
++++++++++++++++++++++++
|
||||
|
||||
::
|
||||
|
||||
-d DB_NAME, --database=DB_NAME
|
||||
specify the database name
|
||||
|
@ -254,11 +117,10 @@ Database related options:
|
|||
--db_host=DB_HOST specify the database host
|
||||
--db_port=DB_PORT specify the database port
|
||||
|
||||
Internationalization options:
|
||||
-----------------------------
|
||||
Internationalization options
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
Use these options to translate OpenERP to another language.See i18n
|
||||
section of the user manual. Option '-l' is mandatory.
|
||||
Use these options to translate OpenERP to another language.See i18n section of the user manual. Option '-l' is mandatory.::
|
||||
|
||||
-l LANGUAGE, --language=LANGUAGE
|
||||
specify the language of the translation file. Use it
|
||||
|
@ -272,8 +134,309 @@ Internationalization options:
|
|||
specify modules to export. Use in combination with
|
||||
--i18n-export
|
||||
|
||||
Options from previous versions:
|
||||
-------------------------------
|
||||
Some options were removed in version 6. For example, ``price_accuracy`` is now
|
||||
Options from previous versions
|
||||
++++++++++++++++++++++++++++++
|
||||
|
||||
Some options were removed in OpenERP version 6. For example, ``price_accuracy`` is now
|
||||
configured through the :ref:`decimal_accuracy` screen.
|
||||
|
||||
Configuration
|
||||
==============
|
||||
|
||||
.. _getting_started_configuration-link:
|
||||
|
||||
Two configuration files are available:
|
||||
|
||||
* one for the client: ``~/.openerprc``
|
||||
* one for the server: ``~/.openerp_serverrc``
|
||||
|
||||
If they are not found, the server and the client will start with a default configuration. Those files follow the convention used by python's ConfigParser module. Please note that lines beginning with "#" or ";" are comments. The client configuration file is automatically generated upon the first start. The sezrver configuration file can automatically be created using the command ::
|
||||
|
||||
./openerp-server -s or ./openerp-server --save
|
||||
|
||||
You can specify alternate configuration files with ::
|
||||
|
||||
-c CONFIG, --config=CONFIG specify alternate config file
|
||||
|
||||
An example of server configuration file for
|
||||
|
||||
Appendix
|
||||
========
|
||||
|
||||
Command line options example
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
Usage: openerp-server [options]
|
||||
|
||||
**Options**::
|
||||
|
||||
--version show program's version number and exit
|
||||
-h, --help show this help message and exit
|
||||
|
||||
**Common options**::
|
||||
|
||||
-c CONFIG, --config=CONFIG
|
||||
specify alternate config file
|
||||
-s, --save save configuration to ~/.openerp_serverrc
|
||||
-i INIT, --init=INIT
|
||||
install one or more modules (comma-separated list, use
|
||||
"all" for all modules), requires -d
|
||||
-u UPDATE, --update=UPDATE
|
||||
update one or more modules (comma-separated list, use
|
||||
"all" for all modules). Requires -d.
|
||||
--without-demo=WITHOUT_DEMO
|
||||
disable loading demo data for modules to be installed
|
||||
(comma-separated, use "all" for all modules). Requires
|
||||
-d and -i. Default is none
|
||||
-P IMPORT_PARTIAL, --import-partial=IMPORT_PARTIAL
|
||||
Use this for big data importation, if it crashes you
|
||||
will be able to continue at the current state. Provide
|
||||
a filename to store intermediate importation states.
|
||||
--pidfile=PIDFILE file where the server pid will be stored
|
||||
--addons-path=ADDONS_PATH
|
||||
specify additional addons paths (separated by commas).
|
||||
--load=SERVER_WIDE_MODULES
|
||||
Comma-separated list of server-wide modules
|
||||
default=web
|
||||
|
||||
**XML-RPC Configuration**::
|
||||
|
||||
--xmlrpc-interface=XMLRPC_INTERFACE
|
||||
Specify the TCP IP address for the XML-RPC protocol.
|
||||
The empty string binds to all interfaces.
|
||||
--xmlrpc-port=XMLRPC_PORT
|
||||
specify the TCP port for the XML-RPC protocol
|
||||
--no-xmlrpc disable the XML-RPC protocol
|
||||
--proxy-mode Enable correct behavior when behind a reverse proxy
|
||||
|
||||
**XML-RPC Secure Configuration**::
|
||||
|
||||
--xmlrpcs-interface=XMLRPCS_INTERFACE
|
||||
Specify the TCP IP address for the XML-RPC Secure
|
||||
protocol. The empty string binds to all interfaces.
|
||||
--xmlrpcs-port=XMLRPCS_PORT
|
||||
specify the TCP port for the XML-RPC Secure protocol
|
||||
--no-xmlrpcs disable the XML-RPC Secure protocol
|
||||
--cert-file=SECURE_CERT_FILE
|
||||
specify the certificate file for the SSL connection
|
||||
--pkey-file=SECURE_PKEY_FILE
|
||||
specify the private key file for the SSL connection
|
||||
|
||||
**NET-RPC Configuration**::
|
||||
|
||||
--netrpc-interface=NETRPC_INTERFACE
|
||||
specify the TCP IP address for the NETRPC protocol
|
||||
--netrpc-port=NETRPC_PORT
|
||||
specify the TCP port for the NETRPC protocol
|
||||
--no-netrpc disable the NETRPC protocol
|
||||
|
||||
**Web interface Configuration**::
|
||||
|
||||
--db-filter=REGEXP Filter listed database
|
||||
|
||||
**Static HTTP service**::
|
||||
|
||||
--static-http-enable
|
||||
enable static HTTP service for serving plain HTML
|
||||
files
|
||||
--static-http-document-root=STATIC_HTTP_DOCUMENT_ROOT
|
||||
specify the directory containing your static HTML
|
||||
files (e.g '/var/www/')
|
||||
--static-http-url-prefix=STATIC_HTTP_URL_PREFIX
|
||||
specify the URL root prefix where you want web
|
||||
browsers to access your static HTML files (e.g '/')
|
||||
|
||||
**Testing Configuration**::
|
||||
|
||||
--test-file=TEST_FILE
|
||||
Launch a YML test file.
|
||||
--test-report-directory=TEST_REPORT_DIRECTORY
|
||||
If set, will save sample of all reports in this
|
||||
directory.
|
||||
--test-enable Enable YAML and unit tests.
|
||||
--test-commit Commit database changes performed by YAML or XML
|
||||
tests.
|
||||
|
||||
**Logging Configuration**::
|
||||
|
||||
--logfile=LOGFILE file where the server log will be stored
|
||||
--no-logrotate do not rotate the logfile
|
||||
--syslog Send the log to the syslog server
|
||||
--log-handler=PREFIX:LEVEL
|
||||
setup a handler at LEVEL for a given PREFIX. An empty
|
||||
PREFIX indicates the root logger. This option can be
|
||||
repeated. Example: "openerp.orm:DEBUG" or
|
||||
"werkzeug:CRITICAL" (default: ":INFO")
|
||||
--log-request shortcut for --log-
|
||||
handler=openerp.netsvc.rpc.request:DEBUG
|
||||
--log-response shortcut for --log-
|
||||
handler=openerp.netsvc.rpc.response:DEBUG
|
||||
--log-web shortcut for --log-
|
||||
handler=openerp.addons.web.common.http:DEBUG
|
||||
--log-sql shortcut for --log-handler=openerp.sql_db:DEBUG
|
||||
--log-level=LOG_LEVEL
|
||||
specify the level of the logging. Accepted values:
|
||||
['info', 'debug_rpc', 'warn', 'test', 'critical',
|
||||
'debug_sql', 'error', 'debug', 'debug_rpc_answer',
|
||||
'notset'] (deprecated option).
|
||||
|
||||
**SMTP Configuration**::
|
||||
|
||||
--email-from=EMAIL_FROM
|
||||
specify the SMTP email address for sending email
|
||||
--smtp=SMTP_SERVER specify the SMTP server for sending email
|
||||
--smtp-port=SMTP_PORT
|
||||
specify the SMTP port
|
||||
--smtp-ssl specify the SMTP server support SSL or not
|
||||
--smtp-user=SMTP_USER
|
||||
specify the SMTP username for sending email
|
||||
--smtp-password=SMTP_PASSWORD
|
||||
specify the SMTP password for sending email
|
||||
|
||||
**Database related options**::
|
||||
|
||||
-d DB_NAME, --database=DB_NAME
|
||||
specify the database name
|
||||
-r DB_USER, --db_user=DB_USER
|
||||
specify the database user name
|
||||
-w DB_PASSWORD, --db_password=DB_PASSWORD
|
||||
specify the database password
|
||||
--pg_path=PG_PATH specify the pg executable path
|
||||
--db_host=DB_HOST specify the database host
|
||||
--db_port=DB_PORT specify the database port
|
||||
--db_maxconn=DB_MAXCONN
|
||||
specify the the maximum number of physical connections
|
||||
to posgresql
|
||||
--db-template=DB_TEMPLATE
|
||||
specify a custom database template to create a new
|
||||
database
|
||||
|
||||
**Internationalisation options**::
|
||||
|
||||
Use these options to translate OpenERP to another language.See i18n
|
||||
section of the user manual. Option '-d' is mandatory.Option '-l' is
|
||||
mandatory in case of importation
|
||||
|
||||
--load-language=LOAD_LANGUAGE
|
||||
specifies the languages for the translations you want
|
||||
to be loaded
|
||||
-l LANGUAGE, --language=LANGUAGE
|
||||
specify the language of the translation file. Use it
|
||||
with --i18n-export or --i18n-import
|
||||
--i18n-export=TRANSLATE_OUT
|
||||
export all sentences to be translated to a CSV file, a
|
||||
PO file or a TGZ archive and exit
|
||||
--i18n-import=TRANSLATE_IN
|
||||
import a CSV or a PO file with translations and exit.
|
||||
The '-l' option is required.
|
||||
--i18n-overwrite overwrites existing translation terms on updating a
|
||||
module or importing a CSV or a PO file.
|
||||
--modules=TRANSLATE_MODULES
|
||||
specify modules to export. Use in combination with
|
||||
--i18n-export
|
||||
|
||||
**Security-related options**::
|
||||
|
||||
--no-database-list disable the ability to return the list of databases
|
||||
|
||||
**Advanced options**::
|
||||
|
||||
--cache-timeout=CACHE_TIMEOUT
|
||||
set the timeout for the cache system
|
||||
--debug enable debug mode
|
||||
--stop-after-init stop the server after its initialization
|
||||
-t TIMEZONE, --timezone=TIMEZONE
|
||||
specify reference timezone for the server (e.g.
|
||||
Europe/Brussels
|
||||
--osv-memory-count-limit=OSV_MEMORY_COUNT_LIMIT
|
||||
Force a limit on the maximum number of records kept in
|
||||
the virtual osv_memory tables. The default is False,
|
||||
which means no count-based limit.
|
||||
--osv-memory-age-limit=OSV_MEMORY_AGE_LIMIT
|
||||
Force a limit on the maximum age of records kept in
|
||||
the virtual osv_memory tables. This is a decimal value
|
||||
expressed in hours, and the default is 1 hour.
|
||||
--max-cron-threads=MAX_CRON_THREADS
|
||||
Maximum number of threads processing concurrently cron
|
||||
jobs.
|
||||
--virtual-memory-limit=VIRTUAL_MEMORY_LIMIT
|
||||
Maximum allowed virtual memory per Gunicorn process.
|
||||
When the limit is reached, any memory allocation will
|
||||
fail.
|
||||
--virtual-memory-reset=VIRTUAL_MEMORY_RESET
|
||||
Maximum allowed virtual memory per Gunicorn process.
|
||||
When the limit is reached, the worker will be reset
|
||||
after the current request.
|
||||
--cpu-time-limit=CPU_TIME_LIMIT
|
||||
Maximum allowed CPU time per Gunicorn process. When
|
||||
the limit is reached, an exception is raised.
|
||||
--unaccent Use the unaccent function provided by the database
|
||||
when available.
|
||||
|
||||
Server configuration file
|
||||
+++++++++++++++++++++++++
|
||||
|
||||
::
|
||||
|
||||
[options]
|
||||
addons_path = /home/openerp/workspace/openerp-dev/addons/trunk,/home/openerp/workspace/openerp-dev/web/trunk/addons
|
||||
admin_passwd = admin
|
||||
cache_timeout = 100000
|
||||
cpu_time_limit = 60
|
||||
csv_internal_sep = ,
|
||||
db_host = False
|
||||
db_maxconn = 64
|
||||
db_name = False
|
||||
db_password = False
|
||||
db_port = False
|
||||
db_template = template0
|
||||
db_user = openerp
|
||||
dbfilter = .*
|
||||
debug_mode = False
|
||||
demo = {}
|
||||
email_from = False
|
||||
import_partial =
|
||||
list_db = True
|
||||
log_handler = [':INFO']
|
||||
log_level = info
|
||||
logfile = False
|
||||
login_message = False
|
||||
logrotate = True
|
||||
max_cron_threads = 4
|
||||
netrpc = True
|
||||
netrpc_interface =
|
||||
netrpc_port = 8070
|
||||
osv_memory_age_limit = 1.0
|
||||
osv_memory_count_limit = False
|
||||
pg_path = None
|
||||
pidfile = False
|
||||
proxy_mode = False
|
||||
reportgz = False
|
||||
secure_cert_file = server.cert
|
||||
secure_pkey_file = server.pkey
|
||||
server_wide_modules = None
|
||||
smtp_password = False
|
||||
smtp_port = 25
|
||||
smtp_server = localhost
|
||||
smtp_ssl = False
|
||||
smtp_user = False
|
||||
static_http_document_root = None
|
||||
static_http_enable = False
|
||||
static_http_url_prefix = None
|
||||
syslog = False
|
||||
test_commit = False
|
||||
test_enable = False
|
||||
test_file = False
|
||||
test_report_directory = False
|
||||
timezone = False
|
||||
translate_modules = ['all']
|
||||
unaccent = False
|
||||
virtual_memory_limit = 805306368
|
||||
virtual_memory_reset = 671088640
|
||||
without_demo = False
|
||||
xmlrpc = True
|
||||
xmlrpc_interface =
|
||||
xmlrpc_port = 8069
|
||||
xmlrpcs = True
|
||||
xmlrpcs_interface =
|
||||
xmlrpcs_port = 8071
|
||||
|
|
Loading…
Reference in New Issue