Odoo install old module error handling

Source: Internet
Author: User

Some older versions of the modules are not upgraded, so they often encounter problems with modules that cannot be installed.

No Module Name OSV

Change module from OSV import Osv,fields to from OPENERP.OSV import Osv,fields

In fact, this is a programming specification problem, the old version of the module code a lot of this import way, a change to do not understand the code or new OpenERP novice is unrealistic.

As we all know, OpenERP's running portal is openerp-server.py, in 6.0 and earlier versions, this portal file and other server packages are in the same directory,
But openerp6.1 started this directory was promoted by a directory. The server packages are placed in a directory called OpenERP,
The openerp-server.py is renamed to Openerp-server (no suffix) and the OpenERP directory sibling.
The nature of Python, however, determines that it is looking for a relative path at the location of the entry file when importing the package.
So the result of this top-level directory structure change is that we need to add openerp to all the import statements. This prefix.

There has to be a temporary solution, and that's openerp/conf/deprecation.py the file.

It defines a variable, open_openerp_namespace, in 7.0, this value is true, that is, even if the import OSV in your module will not error,
Because server obediently drops to openerp this directory to find OSV directory, without error.

But 8.0 is different, OPENERP has changed all the modules they are responsible for, they no longer need this temporary solution,
And then we see in version 8.0 that this variable value is set to False

This is the 7.0 can be installed in the oecn_base_fonts, Auto_backup and other modules in 8.0 cannot install the reason.

If you wish to use other unofficial modules, I suggest you change this value to True

Odoo install old module error handling

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.