Odoo Help


Error when trying install custom module

rudyanto santoso
on 9/6/15, 12:48 AM 2,262 views

I have strange conditions, I made a simple module like this

from openerp.osv import orm, fields

import openerp.addons.decimal_precision as dp

class sale_order_line(orm.Model):

_name = 'sale.order.line'

_inherit = 'sale.order.line'

_columns = {

'base_price':fields.float('Base Price', required=True, digits_compute=dp.get_precision('Product Price'), readonly=True, states={'draft':[('readonly', False)]}),


_default = {

'base_price': 0.0,


and made a view like this

<?xml version="1.0"?>



<record model="ir.ui.view" id="view_order_form">

<field name="name">sale.order.form</field>

<field name="model">sale.order</field>

<field name="inherit_id" ref="sale.view_order_form"/>

<field name="type">form</field>

<field name="arch" type="xml">

<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/form/group/group/field[@name='price_unit' ]" position="before">

<field name="base_price"/>


<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit' ]" position="before">

<field name="base_price"/>






After i installed this module, I cannot install another module anymore even built-in module from odoo.

I have an error like this

Odoo Server Error

Traceback (most recent call last):

File "E:\Odoo 8.0\server\.\openerp\http.py", line 537, in _handle_exception

File "E:\Odoo 8.0\server\.\openerp\http.py", line 574, in dispatch

File "E:\Odoo 8.0\server\.\openerp\http.py", line 310, in _call_function

File "E:\Odoo 8.0\server\.\openerp\service\model.py", line 113, in wrapper

File "E:\Odoo 8.0\server\.\openerp\http.py", line 307, in checked_call

File "E:\Odoo 8.0\server\.\openerp\http.py", line 803, in __call__

File "E:\Odoo 8.0\server\.\openerp\http.py", line 403, in response_wrap

File "E:\Odoo 8.0\server\openerp\addons\web\controllers\main.py", line 948, in call_button

File "E:\Odoo 8.0\server\openerp\addons\web\controllers\main.py", line 936, in _call_kw

File "E:\Odoo 8.0\server\.\openerp\api.py", line 241, in wrapper

File "E:\Odoo 8.0\server\openerp\addons\base\module\module.py", line 446, in button_immediate_install

File "E:\Odoo 8.0\server\.\openerp\api.py", line 241, in wrapper

File "E:\Odoo 8.0\server\openerp\addons\base\module\module.py", line 494, in _button_immediate_function

File "E:\Odoo 8.0\server\.\openerp\modules\registry.py", line 370, in new

File "E:\Odoo 8.0\server\.\openerp\modules\loading.py", line 351, in load_modules

File "E:\Odoo 8.0\server\.\openerp\modules\loading.py", line 255, in load_marked_modules

File "E:\Odoo 8.0\server\.\openerp\modules\loading.py", line 152, in load_module_graph

File "E:\Odoo 8.0\server\.\openerp\modules\registry.py", line 163, in load

File "E:\Odoo 8.0\server\.\openerp\models.py", line 596, in _build_model

File "E:\Odoo 8.0\server\.\openerp\modules\registry.py", line 102, in __getitem__

KeyError: 'sale.order.line'

After that, my odoo server hang up with error like this



<title>500 Internal Server Error</title>

<h1>Internal Server Error</h1>

<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

Please help me, what kind of mistake i already made with this module. I already made another module before this and not found any error like this.

FYI, this module running well when installed, just after that, I cannot installing another module anymore.

Thanks Axel, It's worked!! I'm forgot to update depends because copy-paste.

rudyanto santoso
on 9/6/15, 10:11 PM

Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 9/6/15, 1:36 PM

You need to put a depends with sale module in your __openerp__.py

rudyanto santoso
On 9/6/15, 4:25 AM

Thanks Dep, but I don't see solutions from link you gave to me. can you explain for me?



--Odoo --

| 5 2 5
--Odoo --

Working in Odoo TEchnologies

On 9/6/15, 1:23 AM


Please Refer this Answer ,it will resolve your issue.......


About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/6/15, 12:48 AM
Seen: 2262 times
Last updated: 9/6/15, 10:12 PM