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"?>
<openerp>
<data>
<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>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit' ]" position="before">
<field name="base_price"/>
</xpath>
</field>
</record>
</data>
</openerp>
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
XmlHttpRequestError INTERNAL SERVER ERROR
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<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.