安装模块时出现此错误
我试着做两个水平
销售订单验证
回溯(最近一次呼叫)Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/http.py", line 537, in handle_exception
return super(JsonRequest, self).handle_exception(exception)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/http.py", line 574, in dispatch
result = self._call_function(*self.params)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/service/model.py", line 118, in wrapper
return f(dbname, args, *kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/http.py", line 307, in checked_call
return self.endpoint(a, *kw)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/http.py", line 803, in __call
return self.method(args, *kw)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/http.py", line 403, in response_wrap
response = f(args, *kw)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self.call_kw(model, method, args, {})
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/addons/web/controllers/main.py", line 936, in call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, args, *kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/api.py", line 256, in wrapper
return old_api(self, args, *kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/addons/base/module/module.py", line 447, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/api.py", line 256, in wrapper
return old_api(self, args, *kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/addons/base/module/module.py", line 495, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/modules/loading.py", line 355, in load_modules
loaded_modules, update_module)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/modules/loading.py", line 143, in load_module_graph
load_openerp_module(package.name)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/modules/module.py", line 315, in load_openerp_module
__import('openerp.addons.' + module_name)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/modules/module.py", line 80, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/addons/sales_approval/init.py", line 1, in
import salesapproval
File "/opt/bitnami/apps/odoo/lib/odoo-8.0.post20151126-py2.7.egg/openerp/addons/sales_approval/salesapproval.py",
line 3
_inherit = 'sale.order'
^
IndentationError: expected an indented block
这是我的档案
初始化.py
^{pr2}$
打开程序.py
^{3}$
出售_近似xml在<?xml version="1.0" encoding="utf-8"?>
sale.order
states="draft,sent" groups="base.group_user"/>
art_approved
draft,sent,art_approved
draft,sent,art_approved
在销售审批.py在from openerp.osv import osv, fields
class salesapproval_sale_order(osv.Model):
_inherit = 'sale.order'
_columns = {
'state': fields.selection(
[('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')],
'Status', required=True, readonly=True, copy=False,
help='* The \'Draft\' status is set when the related sales order in draft status. \
\n* The \'Confirmed\' status is set when the related sales order is confirmed. \
\n* The \'Exception\' status is set when the related sales order is set as exception. \
\n* The \'Done\' status is set when the sales order line has been picked. \
\n* The \'Cancelled\' status is set when a user cancel the sales order related.'),
}
提前谢谢