Quantcast
Channel: OpenERP Help - Individual question feed
Viewing all 6389 articles
Browse latest View live

How can I pass context to a one2many field?

$
0
0
I have the following code: class product_product(osv.osv): _name = 'product.product' _inherit = 'product.product' def test(self, cr, uid, ids, field_names=None, arg=None, context=None): result = {} if not ids: return result context['only_with_stock'] = True for id in ids: context['product_id'] = id location_obj = self.pool.get('stock.location') result[id] = location_obj.search(cr, uid, [('usage', '=', 'internal')], context=context) return result _columns = { 'test': fields.function(test, method=True, type='one2many', relation='stock.location', string='Stock by Location'), } product_product() and: nfx_product.normal.procurement.locations.inheritproduct.product The `test()` function works well. It creates a `one2many` field with the stock locations. The `complete_name` field in the treeview is ok but the `stock_real` and `stock_virtual` fields are empty(0.00). I think because this fields calls `_product_value()` from `stock/stock.py` and `_product_value()` needs the `product_id` passed in the `context`. But it is not passed. ![image description](/upfiles/13644773161527904.jpg) What I'm doing wrong?

When install new App have error ? "No such external ID...."

$
0
0
i try to install new apps on openerp version 7.0 and receive this error ... ? can help me for my erp? **" Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 90, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 295, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 614, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server/openerp/osv/osv.py", line 169, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server/openerp/osv/osv.py", line 123, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server/openerp/osv/osv.py", line 179, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server/openerp/osv/osv.py", line 166, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server/openerp/addons/base/module/wizard/base_module_upgrade.py", line 90, in upgrade_module pooler.restart_pool(cr.dbname, update_module=True) File "/opt/openerp/server/openerp/pooler.py", line 39, in restart_pool registry = RegistryManager.new(db_name, force_demo, status, update_module) File "/opt/openerp/server/openerp/modules/registry.py", line 214, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/opt/openerp/server/openerp/modules/loading.py", line 347, in load_modules processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module) File "/opt/openerp/server/openerp/modules/loading.py", line 258, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/openerp/server/openerp/modules/loading.py", line 190, in load_module_graph load_data(module_name, idref, mode) File "/opt/openerp/server/openerp/modules/loading.py", line 75, in load_data = lambda *args: _load_data(cr, *args, kind='data') File "/opt/openerp/server/openerp/modules/loading.py", line 126, in _load_data tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) File "/opt/openerp/server/openerp/tools/convert.py", line 954, in convert_xml_import obj.parse(doc.getroot()) File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse self._tags[rec.tag](self.cr, rec, n) File "/opt/openerp/server/openerp/tools/convert.py", line 805, in _tag_record f_val = self.id_get(cr, f_ref) File "/opt/openerp/server/openerp/tools/convert.py", line 824, in id_get res = self.model_id_get(cr, id_str) File "/opt/openerp/server/openerp/tools/convert.py", line 833, in model_id_get return model_data_obj.get_object_reference(cr, self.uid, mod, id_str) File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 861, in get_object_reference data_id = self._get_id(cr, uid, module, xml_id) File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 854, in _get_id raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id)) ValueError: No such external ID currently defined in the system: crm.section_sales_department "**

How can a button use its method?

$
0
0
Such as: I can't find a method named 'order_confirm' in its .py. I'm curious how this button use its method......

Cannot find costing method

$
0
0
Hi there I'm testing v7 before migration from v6, and on a product I cannot see the costing method, though I'm connected as admin. Any idea where I can find that?

Project management video for v7?

$
0
0
Does anybody know where I could find some videos or short presentation of the project management module for v7? I found some for v6, but it has drastically changed so it would help a lot. Thx

OperationalError: FATAL: password authentication failed for user "openpg"

$
0
0
I faced following error please give resolution.. OpenERP Server Error Client Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\openerp\addons\web\http.py", line 203, in dispatch File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\openerp\addons\web\controllers\main.py", line 759, in get_list File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\openerp\addons\web\controllers\main.py", line 89, in db_list File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\openerp\addons\web\session.py", line 31, in proxy_method File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\openerp\addons\web\session.py", line 104, in send Server Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\openerp\addons\web\session.py", line 90, in send File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\netsvc.py", line 293, in dispatch_rpc File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\service\web_services.py", line 122, in dispatch File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\service\web_services.py", line 359, in exp_list File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\sql_db.py", line 484, in cursor File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\sql_db.py", line 182, in __init__ File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\sql_db.py", line 377, in _locked File "C:\Program Files (x86)\OpenERP 7.0-20130328-001657\Server\server\.\openerp\sql_db.py", line 440, in borrow File "psycopg2\__init__.pyc", line 178, in connect OperationalError: FATAL: password authentication failed for user "openpg"

how Bank Reconciliation works in OpenERP?

How this popup loaded ?

$
0
0
in MRP module i found this feature.please tell me where is this function located & where is this button defined.? (i go through code but unable to find where is the exact location that triggered) its flow is ADD --> comed popup window to select products -->if selected then those products loaded in section ![popup window with select option](/upfiles/13645357643986144.png)

Automatic generation of counterpart entries in Journal

$
0
0
why the OpenERP v6.1 (web client) don't propose automatic generation of counterpart entries when we are recording account move lines manually in jouranl entries ?

Sale order of multiple shop

$
0
0
When creating a sale order, you must select a shop . but the sale order contains two product. every product in a shop. for example Sale Order SO016 : 1 --- product1 --- of magasin1-entropot1 2 --- product2 --- of magasin2-entropot2 how I can do that? thanks.

Where is the configuration file for ubuntu repository method install?

$
0
0
I was able to successfully use this method for installing OpenERP in Ubuntu. To install the Debian/Ubuntu package, add the following line to your /etc/apt/sources.list: deb nightly.openerp.com/7.0/nightly/deb/ ./ And type: sudo apt-get update sudo apt-get install openerp The service fires up great and I can access on port 8069. But now I need to change the admin password and secure OpenERP so that people can't just get in and make their own databases. I have looked around but for the life of me I can't find the openerp-server.conf file. I can't seem to find where you would pass the command paramters on in the start up to generate the config file. Is there someone that can help me out here?

Problems when using "import tools" instead of "import openerp.tools"

$
0
0
Hello, I often see modules which are using import tools instead of import openerp.tools My installation cannot resolve a library without the preceeding "openerp.". I think that this depends on the type of installation and it would not be a problem if a deb-Package is installed. So my question: What can I do, than modules without the preceeding "openerp." are working for my installation? Here is the log of the installation of a module: > File> "/opt/openerp/openerp-7.0-bzr/server/openerp/modules/module.py",> line 346, in load_openerp_module> __import__('openerp.addons.' + module_name) File> "/opt/openerp/openerp-7.0-bzr/server/openerp/modules/module.py",> line 82, in load_module> mod = imp.load_module('openerp.addons.' +> module_part, f, path, descr) File> "/opt/openerp/addons-elbati/hr_attendance_analysis/__init__.py",> line 22, in > import hr_attendance File "/opt/openerp/addons-elbati/hr_attendance_analysis/hr_attendance.py",> line 24, in > from tools.translate import _ ImportError: No module named> tools.translate

OpenERP V6.x Scheduler vs OpenERP V7.0 Scheduler

$
0
0
Hello, In OpenERP 6.x The scheduler runs everyday night. We can re-configure to run periodically according to our needs. In OpenERP 7.0 there is no configuration to run nightly or periodically. Under Warehouse there is an option to Run Schedulers and Check Box to Set Automatic Order Point. My Question is 1. How do I enable Scheduler Periodically like OpenERP 6.x? 2. What does the Automatic Order Point exactly means? What difference between if I don't enable Automatic Order Point vs enable Automatic Order Point? Thank you

how to remove first empty element from fields.selection

$
0
0
need to remove first empty element from selection drop down list.and one is selected default.please advice me to do that friends.. ![selection field](/upfiles/13645570728206266.png) its comes like
Gender
-----------------------------
|                         |v|
-----------------------------
EMPTY ELEMENT
-----------------------------
Male
-----------------------------
Female
-----------------------------

Behaviour of forcasted quantity(virtual stock) after executing "run scheduler" for procurement.

$
0
0
When I run procurement scheduler, after that if I am checking Forecasted qty.. All related products' forecasted Qty values are changed. Even **though my newly created Purchase order is still in draft(RFQ) mode**. In previous versions, Forecasted Stock(Virtual Stock) was only changed after we confirming the Draft Purchase order or after creating Incoming Shipment. Is forecasted stock(virtual stock) behaviour is changed in Version 7?? or It's a bug of Procurement Scheduler???

Settings to session timeout?

$
0
0
Hi, Is there any option to set time for automatically logout or expire session if no user activity is monitored (say 10 minutes)? If the user forget to logout and keeps signed in will cause issues, because the others can access data. Does OpenERP have the feature to sign out remotely? Thanks

How quick create XML with demo data?

$
0
0
In previous versions was module `base_module_record`. Version 7.0 have anything for it?

repeatIn doesn't work

$
0
0
Hi, I'm trying to write a further "bill of materials" report. The first use of repeatIn() works fine : [[repeatIn(objects,'pricelist')]] [[pricelist.name]] ([[pricelist.product_qty]] [[pricelist.product_uom.name]]) But the second use of repeatIn() doesn't work: [[repeatIn(get_children(pricelist.bom_lines), 'l')]] When I'm try to printing the report I get an error message: name 'get_children' is not defined (, NameError("name 'get_children' is not defined",), ) Can somebody help me? Thanks BR Torsten

date format issue in v61

$
0
0
Hi all, getting an issue with a v6.1 installation - the date format has been altered to Date Format :%d/%m/%Y in languages, etc as documented - However, a user is reporting an issue where, once this has been applied, when they try to 'quick add' an ambiguous date - the sample we were using was 10/02 (meaning Feb 10th), this saves as Oct 2nd. If I were to enter one that would definitely be in the UK date format, such as '31/03', the date is saved correctly (Mar 31st) - its just where there are dates that are under 12 that the issue happens. The user has to *explicitly* enter 10/02/2013 into the date field for it to take, so this isn't the problem - it's the validation check performed on the 'quick add' that is causing the issue. I have also attempted creating a new language (GB), as a workaround, as documented elsewhere, but that didn't work either... Any suggestions?

Tax Deduction at the time of Payment

$
0
0
Kindly give me solution: In Pakistan we deduct the supplier tax at the time of payment and deposited to government after few days. But in Openerp i still not found this functionality on any version. I need this functionality. At the time of make payment tax amount will deduct and create Journal Entry. Like : Supplier DR 100 Bank / Cash Cr 90 Tax payable Cr 10 (I think at the time of configuration of Accounts OpenErp should ask for tax calculation / deduction, That would like on Invoice recording stage or payment creating stage) Waiting your response
Viewing all 6389 articles
Browse latest View live