在安装openerp 6的过程时,我想用这个命令生成一个配置文件,
cd/home/openerp/openerp-server/bin /
./openerp-server.py -s --stop-after-init -c /home/openerp/openerp-server.cfg
但它总是显示出一个信息
ImportError: No module named psycopg2
当我检查psycopg2包时,它已经安装好,
包python-psycopg2-2.4.5-1.rhel5.x86_64已安装和最新版本
没事做
这有什么问题?我的服务器是centos,我安装了python 2.6.7.
真的需要你的帮助..
我想account.bank.statement.line通过其他对象向对象添加行但是我收到此错误:account.bank.statement.line
def action_account_line_create(self, cr, uid, ids):
res = False
cash_id = self.pool.get('account.bank.statement.line')
for exp in self.browse(cr, uid, ids):
company_id = exp.company_id.id
#statement_id = exp.statement_id.id
lines = []
for l in exp.line_ids:
lines.append((0, 0, {
'name': l.name,
'date': l.date,
'amount': l.amount,
'type': l.type,
'statement_id': exp.statement_id.id,
'account_id': l.account_id.id,
'account_analytic_id': l.analytic_account_id.id,
'ref': l.ref,
'note': l.note,
'company_id': l.company_id.id
}))
inv_id = cash_id.create(cr, uid, lines,context=None)
res = inv_id
return res
Run Code Online (Sandbox Code Playgroud)
我改变了它,但后来我遇到了这个错误:
File "C:\Program Files (x86)\OpenERP 6.1-20121029-003136\Server\server\.\openerp\workflow\wkf_expr.py", line 68, in execute
File "C:\Program …Run Code Online (Sandbox Code Playgroud) 我试图找到一个临时目录,但当我试图使用目录
tempfile.gettempdir()
Run Code Online (Sandbox Code Playgroud)
它给了我错误
File "/usr/lib/python2.6/tempfile.py", line 254, in gettempdir
tempdir = _get_default_tempdir()
File "/usr/lib/python2.6/tempfile.py", line 201, in _get_default_tempdir
("No usable temporary directory found in %s" % dirlist))
IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/openerp/openerp-server']
Run Code Online (Sandbox Code Playgroud)
该目录的权限由root拥有777.
我使用命令启动PostgreSQL:
$ sudo /etc/init.d/postgresql start
Run Code Online (Sandbox Code Playgroud)
Pg没有启动.报告的错误是:
* Starting PostgreSQL 8.4 database server
* The PostgreSQL server failed to start. Please check the log output:
2010-01-21 22:10:00 PST FATAL: private key file "server.key" has group or world access
2010-01-21 22:10:00 PST DETAIL: File must be owned by the database user or root, must have no write permission for "group", and must have no permissions for "other".
Run Code Online (Sandbox Code Playgroud)
......当我尝试访问psql的postgres与用户:
$ sudo su postgres
$ psql
Run Code Online (Sandbox Code Playgroud)
它给了我一个错误:
could not connect …Run Code Online (Sandbox Code Playgroud) 我试图在odoo(以前的OpenERP)中将值插入到many2many或one2manhy关系表中.你知道怎么做吗?
谢谢
我在这里读到你可以使用命令构建一个模块,因此你不需要手动创建一些初始文件.但是这样的命令对master(在Odoo开发分支上)不起作用:
./oe scaffold Academy ../my-modules
Run Code Online (Sandbox Code Playgroud)
因为oe在openerp目录中没有调用这样的文件.这个东西在最新版本中有变化吗?如何在Odoo中构建模块?
在Odoo v8中,使用了许多API装饰器.但我不明白@ api.depends和@ api.onchange之间的主要区别.
任何人都可以帮我解决这个问题吗?
谢谢.
我使用odoo移动框架.如何在应用启动时启用同步选项?(默认情况下禁用该选项.)
我想fields_view_get在做一些函数后动态触发函数.我重写该函数fields_view_get并返回我的结果.仅在第一次调用实际函数时才会影响XML视图.所以我需要刷新视图以影响arch的新值.
有没有办法让odoo视图fields_view_get在第一次调用函数后才能通过函数改变?
我的尝试:
# here fields view get changes the button string from getting arch
# I overrided the fields_view_get on event model and its get affected and works
# perfectly when I click on main menu Event.but not after the records loaded.
@api.multi
def send_mail_event(self):
x = self.event_id.fields_view_get(view_id=None, view_type='form', toolbar=False, submenu=False)
self.send_mail_event_reg_link(test=True)
return x
Run Code Online (Sandbox Code Playgroud) 我有一些模块可以扩展Odoo的附加功能.例如,my_module扩展的模型crm:
class Lead(models.Model):
_inherit = 'crm.lead'
# exmaple fields
field_1 = fields.Char(...)
field_2 = fields.Many2one(...)
# ... field 99
class Stage(models.Model):
_inherit = 'crm.stage'
# exmaple fields
field_1 = fields.Char(...)
field_2 = fields.Many2one(...)
# ... field 99
Run Code Online (Sandbox Code Playgroud)
同样的情况是其扩展模块hr,product等我需要做一些改变的车型.例如,在中my_module_1,我需要更改几个字段(类型,关系)my_module_2,仅删除几个字段等.当然,我还需要更改每个模块的视图.当然,我的自定义模型与不同应用程序/模块的模型有依赖关系.但我有必须存储的生产数据.我没有在Odoo中找到有关迁移(或模块同步)的任何信息.
我的问题是:在生产中更新模块/应用程序的最佳方法是什么(如果我们在模型和视图领域有很多变化)?提前致谢.
odoo ×10
python ×5
openerp ×2
android ×1
centos ×1
centos5 ×1
insert ×1
linux ×1
many-to-many ×1
models ×1
odoo-10 ×1
odoo-8 ×1
odoo-9 ×1
odoo-mobile ×1
odoo-view ×1
openerp-8 ×1
postgresql ×1
private-key ×1
scaffold ×1