~openerp-community/openobject-doc/ksa-openobject-doc-6.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
.. i18n: .. index::
.. i18n:    single: Installation; OpenERP Web (Linux)
.. i18n:    single: OpenERP Web; Installation (Linux)
.. i18n: .. 
..

.. index::
   single: Installation; OpenERP Web (Linux)
   single: OpenERP Web; Installation (Linux)
.. 

.. i18n: .. _installation-linux-web-link:
.. i18n: 
.. i18n: ===============================================================================
.. i18n: OpenERP Web Installation
.. i18n: ===============================================================================
..

.. _installation-linux-web-link:

===============================================================================
OpenERP Web Installation
===============================================================================

.. i18n: Here is the installation instructions for Debian based Linux distributions.
.. i18n: Tested on Debian Etch and Ubuntu Hardy. The procedure might work with other 
.. i18n: Linux or similar distributions. See the docs on how to install the specified 
.. i18n: Packages on your favourite distro.
..

Here is the installation instructions for Debian based Linux distributions.
Tested on Debian Etch and Ubuntu Hardy. The procedure might work with other 
Linux or similar distributions. See the docs on how to install the specified 
Packages on your favourite distro.

.. i18n: -------------------------------------------------------------------------------
.. i18n: Prerequisites
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
Prerequisites
-------------------------------------------------------------------------------

.. i18n: #. Python >= 2.4
.. i18n: #. CherryPy >= 3.1.2
.. i18n: #. Mako >= 0.2.4
.. i18n: #. Babel >= 0.9.4
.. i18n: #. FormEncode >= 1.2.2
.. i18n: #. simplejson >= 2.0.9
.. i18n: #. pyparsing >= 1.5.0
.. i18n:     
.. i18n: Remember, this version requires CherryPy3 which is conflicting with 
.. i18n: CherryPy2 (used by TurboGears), so you can't install both in system area.
.. i18n: To overcome with the issue, we added support for local library installation
.. i18n: for OpenERP Web. In that case, just download the source package and do the 
.. i18n: following...
..

#. Python >= 2.4
#. CherryPy >= 3.1.2
#. Mako >= 0.2.4
#. Babel >= 0.9.4
#. FormEncode >= 1.2.2
#. simplejson >= 2.0.9
#. pyparsing >= 1.5.0
    
Remember, this version requires CherryPy3 which is conflicting with 
CherryPy2 (used by TurboGears), so you can't install both in system area.
To overcome with the issue, we added support for local library installation
for OpenERP Web. In that case, just download the source package and do the 
following...

.. i18n: -------------------------------------------------------------------------------
.. i18n: Python
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
Python
-------------------------------------------------------------------------------

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo apt-get install python python-dev build-essential
.. i18n:     $ sudo apt-get install python-setuptools
..

.. code-block:: bash

    $ sudo apt-get install python python-dev build-essential
    $ sudo apt-get install python-setuptools

.. i18n: This will install dependencies required for the following
..

This will install dependencies required for the following

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ cd /path/to/openerp-web/lib
.. i18n:     $ ./populate.sh
.. i18n:     $ cd ..
..

.. code-block:: bash

    $ cd /path/to/openerp-web/lib
    $ ./populate.sh
    $ cd ..

.. i18n: This will install all required dependencies in private lib directory, and you
.. i18n: don't need to install anything...
..

This will install all required dependencies in private lib directory, and you
don't need to install anything...

.. i18n: -------------------------------------------------------------------------------
.. i18n: OpenERP Web Client
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
OpenERP Web Client
-------------------------------------------------------------------------------

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo easy_install -U openerp-web
..

.. code-block:: bash

    $ sudo easy_install -U openerp-web

.. i18n: all other dependencies will be installed automatically by setuptools...
..

all other dependencies will be installed automatically by setuptools...

.. i18n: -------------------------------------------------------------------------------
.. i18n: Configuration
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
Configuration
-------------------------------------------------------------------------------

.. i18n: Locate the *config/default.cfg* in the installed *EGG*, and make appropriate
.. i18n: changes, especially:
..

Locate the *config/default.cfg* in the installed *EGG*, and make appropriate
changes, especially:

.. i18n: .. code-block:: ini
.. i18n: 
.. i18n:     [openerp]
.. i18n:     server = "localhost"
.. i18n:     port = 8070
.. i18n:     protocol = "socket"
..

.. code-block:: ini

    [openerp]
    server = "localhost"
    port = 8070
    protocol = "socket"

.. i18n: where:
..

where:

.. i18n:     * ``server`` is the OpenERP server host
.. i18n:     
.. i18n:     * ``port`` is the OpenERP server port which is by default 8070 for NET-RPC or 8069 for XML(S)-RPC.
.. i18n:       The web server itself listens by default on port 8080 and connects to the OpenERP server
.. i18n:       using one of the above-mentioned ports.
.. i18n:       The final web browser connects to the Web server, so usually port 8080. 
.. i18n: 
.. i18n:     * ``protocol`` is the protocol to be used (``socket`` for NET-RPC, ``http`` for XML-RPC or ``https`` for XMLS-RPC)
..

    * ``server`` is the OpenERP server host
    
    * ``port`` is the OpenERP server port which is by default 8070 for NET-RPC or 8069 for XML(S)-RPC.
      The web server itself listens by default on port 8080 and connects to the OpenERP server
      using one of the above-mentioned ports.
      The final web browser connects to the Web server, so usually port 8080. 

    * ``protocol`` is the protocol to be used (``socket`` for NET-RPC, ``http`` for XML-RPC or ``https`` for XMLS-RPC)

.. i18n: Now start the web server with ``openerp-web`` command:
..

Now start the web server with ``openerp-web`` command:

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ openerp-web
..

.. code-block:: bash

    $ openerp-web

.. i18n: If you see message showing ``IOError: Port 8080 not free on '0.0.0.0'`` make
.. i18n: sure no other application is running on the specified port (8080 is default).
..

If you see message showing ``IOError: Port 8080 not free on '0.0.0.0'`` make
sure no other application is running on the specified port (8080 is default).

.. i18n: You can change port by changing ``server.socket_port`` value in
.. i18n: ``config/openerp-web.cfg``.
..

You can change port by changing ``server.socket_port`` value in
``config/openerp-web.cfg``.

.. i18n: If everything is fine, open your favourite web browser and type 
.. i18n: http://localhost:8080/, and your can see welcome page with login screen.
..

If everything is fine, open your favourite web browser and type 
http://localhost:8080/, and your can see welcome page with login screen.

.. i18n: Please make sure cookies are enabled in your browser.
..

Please make sure cookies are enabled in your browser.

.. i18n: Of course, OpenERP Server must be running at that time. You should create a
.. i18n: database from the DBAdmin interface by clicking on Databases button that you can
.. i18n: see on the login screen. After creating a new database, login with the 
.. i18n: admin/admin or demo/demo user to see OpenERP in action...
..

Of course, OpenERP Server must be running at that time. You should create a
database from the DBAdmin interface by clicking on Databases button that you can
see on the login screen. After creating a new database, login with the 
admin/admin or demo/demo user to see OpenERP in action...

.. i18n: .. warning::
.. i18n: 
.. i18n:     Please make sure that the system time is properly set otherwise web browsers
.. i18n:     might fail to establish sessions. We strongly recommend you to synchronize
.. i18n:     system clock with NTP...
..

.. warning::

    Please make sure that the system time is properly set otherwise web browsers
    might fail to establish sessions. We strongly recommend you to synchronize
    system clock with NTP...

.. i18n: -------------------------------------------------------------------------------
.. i18n: Run as service (daemon)
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
Run as service (daemon)
-------------------------------------------------------------------------------

.. i18n: This has been tested on *ubuntu* only.To run openerp Web as a service you need to first locate the openerp_web-5.0.0-py2.5.egg ad copy the openerp-web file to etc/init.d/. An egg is a python package. "Eggs are to Pythons as Jars are to Java...".You can find the documentation about eggs at http://peak.telecommunity.com/DevCenter/PythonEggs
.. i18n: The location of the egg depends on your distribution.
.. i18n: For example path to openerp_web-5.0.6-py2.5.egg in Ubuntu 8.10 is:
.. i18n: ::
.. i18n:   
.. i18n:   /usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/
..

This has been tested on *ubuntu* only.To run openerp Web as a service you need to first locate the openerp_web-5.0.0-py2.5.egg ad copy the openerp-web file to etc/init.d/. An egg is a python package. "Eggs are to Pythons as Jars are to Java...".You can find the documentation about eggs at http://peak.telecommunity.com/DevCenter/PythonEggs
The location of the egg depends on your distribution.
For example path to openerp_web-5.0.6-py2.5.egg in Ubuntu 8.10 is:
::
  
  /usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/scripts/openerp-web /etc/init.d/
.. i18n:     $ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/config/openerp-web.cfg /etc/
.. i18n:     $ sudo chmod +x /etc/init.d/openerp-web
..

.. code-block:: bash

    $ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/scripts/openerp-web /etc/init.d/
    $ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/config/openerp-web.cfg /etc/
    $ sudo chmod +x /etc/init.d/openerp-web

.. i18n: edit */etc/init.d/openerp-web* using any editor example:
..

edit */etc/init.d/openerp-web* using any editor example:

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:    $ sudo gedit /etc/init.d/openerp-web
..

.. code-block:: bash

   $ sudo gedit /etc/init.d/openerp-web

.. i18n: .. code-block:: ini
.. i18n: 
.. i18n:     USER="your system username"
..

.. code-block:: ini

    USER="your system username"

.. i18n: and edit */etc/openerp-web.cfg*:
..

and edit */etc/openerp-web.cfg*:

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:    $ sudo gedit /etc/openerp-web.cfg
..

.. code-block:: bash

   $ sudo gedit /etc/openerp-web.cfg

.. i18n: .. code-block:: ini
.. i18n: 
.. i18n:     log.access_file = "/var/log/openerp-web/access.log"
.. i18n:     log.error_file = "/var/log/openerp-web/error.log"
..

.. code-block:: ini

    log.access_file = "/var/log/openerp-web/access.log"
    log.error_file = "/var/log/openerp-web/error.log"

.. i18n: Create ``/var/log/openerp-web/`` with proper ownership
..

Create ``/var/log/openerp-web/`` with proper ownership

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo mkdir /var/log/openerp-web/
.. i18n:     $ sudo chown username /var/log/openerp-web/
..

.. code-block:: bash

    $ sudo mkdir /var/log/openerp-web/
    $ sudo chown username /var/log/openerp-web/

.. i18n: Now run following command to start the OpenERP Web automatically on system
.. i18n: startup (Debian/Ubuntu).
..

Now run following command to start the OpenERP Web automatically on system
startup (Debian/Ubuntu).

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo update-rc.d openerp-web defaults
..

.. code-block:: bash

    $ sudo update-rc.d openerp-web defaults

.. i18n: Start the deamon:
..

Start the deamon:

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo /etc/init.d/openerp-web start
..

.. code-block:: bash

    $ sudo /etc/init.d/openerp-web start

.. i18n: .. note::
.. i18n: 
.. i18n:      The init script is compatible with all major Linux distributions. Please
.. i18n:      check docs of your distribution on how to enable services.
..

.. note::

     The init script is compatible with all major Linux distributions. Please
     check docs of your distribution on how to enable services.

.. i18n: -------------------------------------------------------------------------------
.. i18n: Configure HTTPS
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
Configure HTTPS
-------------------------------------------------------------------------------

.. i18n: The following text describes how to configure OpenERP Web for production
.. i18n: environment over HTTPS with Apache2.
..

The following text describes how to configure OpenERP Web for production
environment over HTTPS with Apache2.

.. i18n: **mod_proxy + mod_ssl (Apache2)**
..

**mod_proxy + mod_ssl (Apache2)**

.. i18n: See `Apache manual <http://httpd.apache.org/docs/>`_ for more information.
..

See `Apache manual <http://httpd.apache.org/docs/>`_ for more information.

.. i18n: **Apache configuration**
..

**Apache configuration**

.. i18n: .. code-block:: apache
.. i18n: 
.. i18n:     <VirtualHost *:443>
.. i18n: 
.. i18n:         SSLEngine on
.. i18n:         SSLCertificateFile /etc/apache2/ssl/apache.pem
.. i18n: 
.. i18n:         <Proxy *>
.. i18n:             Order deny,allow
.. i18n:             Allow from all
.. i18n:         </Proxy>
.. i18n: 
.. i18n:         ProxyRequests Off
.. i18n: 
.. i18n:         ProxyPass        /   http://127.0.0.1:8080/
.. i18n:         ProxyPassReverse /   http://127.0.0.1:8080/
.. i18n: 
.. i18n:         RequestHeader set "X-Forwarded-Proto" "https"
.. i18n: 
.. i18n:         # Fix IE problem (http error 408/409)
.. i18n:         SetEnv proxy-nokeepalive 1
.. i18n: 
.. i18n:     </VirtualHost>
..

.. code-block:: apache

    <VirtualHost *:443>

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/apache.pem

        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>

        ProxyRequests Off

        ProxyPass        /   http://127.0.0.1:8080/
        ProxyPassReverse /   http://127.0.0.1:8080/

        RequestHeader set "X-Forwarded-Proto" "https"

        # Fix IE problem (http error 408/409)
        SetEnv proxy-nokeepalive 1

    </VirtualHost>

.. i18n: **OpenERP Web configuration**
..

**OpenERP Web configuration**

.. i18n: .. code-block:: ini
.. i18n: 
.. i18n:      tools.proxy.on = True
..

.. code-block:: ini

     tools.proxy.on = True

.. i18n: **Block the OpenERP Web server port (firewall)**
..

**Block the OpenERP Web server port (firewall)**

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ iptables -A INPUT -i lo -j ACCEPT
.. i18n:     $ iptables -A INPUT -p tcp --dport 8080 -j REJECT
..

.. code-block:: bash

    $ iptables -A INPUT -i lo -j ACCEPT
    $ iptables -A INPUT -p tcp --dport 8080 -j REJECT

.. i18n: .. note::
.. i18n: 
.. i18n:     Don't block the localhost/121.0.0.1 (the first rule)
..

.. note::

    Don't block the localhost/121.0.0.1 (the first rule)

.. i18n: .. note::
.. i18n: 
.. i18n:     This method only works if you want your OpenERP Web application at the
.. i18n:     root of your server (https://www.example.com) and can't be deployed under
.. i18n:     a subdirectory, e.g. http://www.example.com/openerp.
.. i18n: 
.. i18n:     To overcome with the issue you can go with `subdomain`, like:
.. i18n: 
.. i18n:         https://openerp.example.com
..

.. note::

    This method only works if you want your OpenERP Web application at the
    root of your server (https://www.example.com) and can't be deployed under
    a subdirectory, e.g. http://www.example.com/openerp.

    To overcome with the issue you can go with `subdomain`, like:

        https://openerp.example.com

.. i18n: -------------------------------------------------------------------------------
.. i18n: Web Browser Compatibilities
.. i18n: -------------------------------------------------------------------------------
..

-------------------------------------------------------------------------------
Web Browser Compatibilities
-------------------------------------------------------------------------------

.. i18n: Supported browsers
.. i18n: ++++++++++++++++++
..

Supported browsers
++++++++++++++++++

.. i18n: *OpenERP Web* is known to work best with *Mozilla* based web browsers. Here is
.. i18n: the list of supported browsers.
..

*OpenERP Web* is known to work best with *Mozilla* based web browsers. Here is
the list of supported browsers.

.. i18n: #. Firefox >= 1.5
.. i18n: #. Internet Explorer >= 6.0
.. i18n: #. Safari >= 3.0
.. i18n: #. Google Chrome >= 1.0
.. i18n: #. Opera >= 9.0
..

#. Firefox >= 1.5
#. Internet Explorer >= 6.0
#. Safari >= 3.0
#. Google Chrome >= 1.0
#. Opera >= 9.0

.. i18n: Flash plugin
.. i18n: ++++++++++++
..

Flash plugin
++++++++++++

.. i18n: Your browser should have the Flash plugin installed because *OpenERP Web* uses
.. i18n: some Flash components.
..

Your browser should have the Flash plugin installed because *OpenERP Web* uses
some Flash components.

.. i18n: Here is how to install the Flash plugin on an Ubuntu system:
..

Here is how to install the Flash plugin on an Ubuntu system:

.. i18n: .. code-block:: bash
.. i18n: 
.. i18n:     $ sudo apt-get install flashplugin-nonfree
..

.. code-block:: bash

    $ sudo apt-get install flashplugin-nonfree