openerp

Warning while saving opportunity in OpenERP

淺唱寂寞╮ 提交于 2019-12-04 05:31:44
问题 After creating an opportunity, when I click on save, it gives me this warning for some users: "Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: User Modification)." What's causing this problem? Update: I have created a new user of admin type and I added these groups: Sales/User,Sales/User All Leads,Survey/User,Tools/User. It gives me a warning while creating an opportunity. I added the following groups to the new user and it's

how can i debug openerp code in to the eclipse [closed]

可紊 提交于 2019-12-04 04:48:15
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . how can I debug python code in to the eclipse.if it will be done then we face less effort and fast do our work.can any one tell me??? 回答1: To debug your Openerp+python code in eclipse, start eclipse in debug

Can not import customize module in openERP

若如初见. 提交于 2019-12-04 04:37:15
问题 i have done simple customize module in openerp with using python and xml. but I cannot import in openerp. My module is not shown in openerp. this is __init__py import os os.environ['TZ'] = 'UTC' # Set the timezone... import time # ... *then* import time. del os del time # The hard-coded super-user id (a.k.a. administrator, or root user). SUPERUSER_ID = 1 import addons import cli import conf import loglevels import modules import netsvc import osv import pooler import release import report

Where OpenERP (Odoo) finds the modules path?

只谈情不闲聊 提交于 2019-12-04 04:23:40
I am using Odoo v.8. I want to find out where Odoo finds information where the modules are, to load them. I am aware there is a variable addons_path in the file openerp-server.conf. The only file I have found the variable in is opt/odoo/odoo/debian/openerp-server.conf. It has the following value: addons_path = /usr/lib/python2.7/dist-packages/openerp/addons However, the Odoo application is using modules from "/opt/odoo/odoo/addons" path. Where the Odoo retrieves this information from? If I have a new directory with new modules, where I can update the path? I have updated addons_path in opt

Odoo如何在IDE中调试单元测试

ε祈祈猫儿з 提交于 2019-12-04 02:02:00
部署odoo测试环境(windows下见 这里 ) 编码测试用例,如 foo -- tests -- __init__.py -- test_foo.py code in test_foo.py # -*- coding: utf-8 -*-. from openerp.tests.common import TransactionCase class MyTestCase(TransactionCase): def test_some_action(self): env = self.env['foo.ModelA'] records = env.search([]) for record in records: self.assertEqual(record.message, "test") 修改运行参数为: -c <config file path> -d <default db name> --stop-after-init --log-level=test --test-enable -i <target module name> 例如:-c C:\odoo\openerp-server.conf -d odoo --stop-after-init --log-level=test --test-enable -i foo Finish 来源: oschina 链接:

ERROR openerp.addons.website.models.ir_http: 500 Internal Server Error: after logout from odoo

给你一囗甜甜゛ 提交于 2019-12-04 02:01:47
问题 I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works. but when i install website module of odoo and after i log out from odoo it show following error: "500: Internal Server Error" and my log: "Traceback (most recent call last): File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception

One2many field on_change function can't change its own value?

会有一股神秘感。 提交于 2019-12-03 22:28:05
I have these two fields. 'name' : fields.char('Name'), 'addresses' : fields.one2many('res.partner.address', 'partner','Addresses'), This function: def addresses_change(self, cr, uid, ids, name, addresses, context=None): value = {} new_addresses = [] address_pool = self.pool.get('res.partner.address') for address in address_pool.browse(cr, uid, addresses[0][2], context=context): new_addresses.append((1,address.id,{'street':'wall street','zip':'7777','partner': ids[0],'active':True})) value.update(name='whatever') value.update(addresses=new_addresses) return {'value':value} And these view fields

different view form for edit and create in odoo

夙愿已清 提交于 2019-12-03 21:52:07
I'd like to know is it possible to have different form views for edit mode and create mode in odoo ? Actually I just want to hide some elements in create mode and show it in edit mode. I've tried to using attrs like : <button name="%(print_invoice)d" string="Cetak Struk" type="action" attrs="{'invisible':[('id', '!=', False)]}" /> But when i open the form it gives me error like this : Uncaught Error: Unknown field id in domain [["id","!=",false]] Any help would be appreciated. Thank you @qatz You cannot have different views based on "Edit" or "Create" of record. You can try this by adding

Performance Monitoring Openerp

早过忘川 提交于 2019-12-03 21:49:32
We are trying to implement new relic ( http://www.newrelic.com ) on a dev server to test openerp's performance . The below installation steps of newrelic asks us to to modify WSGI application file . I am new to openerp and I can't seem to figure this out. Any help will be highly appreciated. Within the same WSGI application file, you then need to add a wrapper around the actual WSGI application entry point. If the WSGI application entry point is a function declared in the file itself, then you can use a decorator. @newrelic.agent.wsgi_application() def application(environ, start_response): ...

List of deleted records in openerp

扶醉桌前 提交于 2019-12-03 21:49:07
Is there any way to get the list of deleted records in OpenERP? I have heard that openerp records the deleted record list.. but i don't know where to browse for it.. I'm trying to synchronize two databases. So I hardly require the deleted record's model name and id so that i can delete the corresponding record from the other database You can make something like a replication_automated_rule based on the base_action_rule model. Look for the code at addons/base_action_rule/base_action_rule.py . An action rule links server actions to objects (of a given model) that accomplish a given condition