Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Installing Modules when behind Apache SSL Proxy fails.

By
Eugen Don
on 8/18/14, 9:10 AM 2,218 views

Hi Friends.

Im new to this community and to openerp so today i did my first install of V8 and put it behind a Apache2 SSL Proxy.

The Openerpserver listens to 127.0.0.1...

If im behind the proxy i get strange errors when installing modules: E-Commerce

Maybe someone had similar issues and cen help me resolve the problem?

 

So heres my proxy conf:

<VirtualHost 81.1xx.xxx.x:443 >
        ServerName "my-domain.de:443"
        ServerAlias "*.my-domain.de" // Use this if you want dbfillter on subdomain
        ServerAdmin "my-mail@gmail.com"
        UseCanonicalName on

        ErrorLog /var/log/openerp/openerp-error.log
        CustomLog /var/log/openerp/openerp-access.log combined

    SSLCertificateFile /etc/ssl/openerp/server.crt
    SSLCertificateKeyFile /etc/ssl/openerp/server.key

        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        
        
        ProxyRequests Off
        ProxyVia On
        ProxyPreserveHost On
    
        ProxyPass / http://127.0.0.1:8xxx/ retry=1 acquire=3000 timeout=1800 Keepalive=On
        ProxyPassReverse / http://127.0.0.1:8xxx/
        

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

        # Fix IE problem (httpapache proxy dav error 408/409)
        SetEnv proxy-nokeepalive 1
        
    </VirtualHost>

 


And heres the error message im getting:

OpenERP Server Error

Traceback (most recent call last): File "/home/openerp/server/openerp/http.py", line 476, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/openerp/server/openerp/http.py", line 495, in dispatch result = self._call_function(**self.params) File "/home/openerp/server/openerp/http.py", line 311, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/openerp/server/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/home/openerp/server/openerp/http.py", line 308, in checked_call return self.endpoint(*a, **kw) File "/home/openerp/server/openerp/http.py", line 685, in __call__ return self.method(*args, **kw) File "/home/openerp/server/openerp/http.py", line 360, in response_wrap response = f(*args, **kw) File "/home/openerp/server/addons/web/controllers/main.py", line 987, in call_button action = self._call_kw(model, method, args, {}) File "/home/openerp/server/addons/web/controllers/main.py", line 975, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/home/openerp/server/openerp/api.py", line 204, in wrapper return old_api(self, *args, **kwargs) File "/home/openerp/server/openerp/addons/base/module/module.py", line 450, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/home/openerp/server/openerp/api.py", line 204, in wrapper return old_api(self, *args, **kwargs) File "/home/openerp/server/openerp/addons/base/module/module.py", line 497, in _button_immediate_function registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True) File "/home/openerp/server/openerp/modules/registry.py", line 322, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/home/openerp/server/openerp/modules/loading.py", line 357, in load_modules loaded_modules, update_module) File "/home/openerp/server/openerp/modules/loading.py", line 263, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/home/openerp/server/openerp/modules/loading.py", line 185, in load_module_graph _load_data(cr, module_name, idref, mode, kind='demo') File "/home/openerp/server/openerp/modules/loading.py", line 118, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) File "/home/openerp/server/openerp/tools/convert.py", line 984, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) File "/home/openerp/server/openerp/tools/convert.py", line 1070, in convert_xml_import obj.parse(doc.getroot()) File "/home/openerp/server/openerp/tools/convert.py", line 937, in parse self._tags[rec.tag](self.cr, rec, n) File "/home/openerp/server/openerp/tools/convert.py", line 855, in _tag_record id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context ) File "/home/openerp/server/openerp/api.py", line 204, in wrapper return old_api(self, *args, **kwargs) File "/home/openerp/server/openerp/addons/base/ir/ir_model.py", line 1027, in _update res_id = model_obj.create(cr, uid, values, context=context) File "/home/openerp/server/openerp/api.py", line 204, in wrapper return old_api(self, *args, **kwargs) File "/home/openerp/server/openerp/api.py", line 297, in old_api result = method(recs, *args, **kwargs) File "/home/openerp/server/openerp/models.py", line 3885, in create record = self.browse(self._create(old_vals)) File "/home/openerp/server/openerp/api.py", line 202, in wrapper return new_api(self, *args, **kwargs) File "/home/openerp/server/openerp/api.py", line 429, in new_api result = method(self._model, cr, uid, *args, **kwargs) File "/home/openerp/server/openerp/models.py", line 4076, in _create recs._validate_fields(vals) File "/home/openerp/server/openerp/api.py", line 202, in wrapper return new_api(self, *args, **kwargs) File "/home/openerp/server/openerp/models.py", line 1261, in _validate_fields raise except_orm('ValidateError', '\n'.join(errors)) ParseError: "ValidateError Field(s) `date_stop` failed against a constraint: Error! The period is invalid. Either some periods are overlapping or the period's dates are not matching the scope of the fiscal year." while parsing /home/openerp/server/addons/account/demo/account_demo.xml:30, near <record id="period_1" model="account.period"> <field eval="'01/'+time.strftime('%Y')" name="code"/> <field eval="'X 01/'+time.strftime('%Y')" name="name"/> <field name="fiscalyear_id" ref="data_fiscalyear"/> <field eval="time.strftime('%Y')+'-01-01'" name="date_start"/> <field eval="time.strftime('%Y')+'-01-31'" name="date_stop"/> <field name="company_id" ref="base.main_company"/> </record>

I get the same error message when trying to install modules in a recent pull of 8.0rc1. I am NOT running it behind any kind of server or SSL configuration (just a local development instance). My installation also fails with a ParseError, same file, same line.

Atte Isopuro
on 8/22/14, 3:19 AM

Update: the problem persists even if I remove the offending record from account_demo.xml: the next record raises ParseError instead. They are all defined in the same way (first of month to last of month) so it would seem to me that the error lies with the installer, rather than the xml file.

Atte Isopuro
on 8/22/14, 3:31 AM
1
Atte Isopuro
On 8/22/14, 4:01 AM

This is a workaround that worked for me: I hope someone can provide a more complete answer.
The problem is in the demo files for the account-module; for some reason they aren't getting parsed correctly. If you don't need the demos for the account module, you can change the settings so that they aren't included:

# disable loading demo data for modules to be installed (comma-separated, use "all" for all modules)

without_demo = account

There are more examples at this address: 

http://www.vionblog.com/openerp-server-conf-for-openerp-7-explained/

You can pass these configurations to Odoo (as it's now called, previously OpenERP) either in a configuration file (as in the example above) or directly from the command line, if you run your server that way. To do it on the command line, you will have to pass the -d and -i options, and then pass --without-demo=account. For more infromation on command line options, you can run the openerp-server script with the -h option (/path/to/odoo/openerp-server -h).

Thanks for the answer, i also realized that it really only happens sometimes, so basically i uninstalled the e-commerce module and tried reinstalling it with demo data and on the second try everything went well....

Eugen Don
on 8/22/14, 6:42 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 8/18/14, 9:10 AM
Seen: 2218 times
Last updated: 3/16/15, 8:10 AM