Field seller_ids not found in browse_record

Bug #1111584 reported by kunthar

This bug report was converted into a question: question #220730: Field seller_ids not found in browse_record.

278
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Go to HR
#view_type=form&model=hr.employee&menu_id=311&action=363

2. Go to Employee and click Create

3. Every time we have this error:

OpenERP Server Error

Client Traceback (most recent call last):
  File "/opt/openerp/web/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/web/addons/web/controllers/main.py", line 1078, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/web/addons/web/controllers/main.py", line 1070, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/web/addons/web/session.py", line 43, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/web/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/web/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/web/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 289, 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/addons/product/product.py", line 636, in name_get
    sellers = filter(lambda x: x.name.id == partner_id, product.seller_ids)
  File "/opt/openerp/server/openerp/osv/orm.py", line 486, in __getattr__
    raise AttributeError(e)
AttributeError: 'Field seller_ids not found in browse_record(product.product, 1)'

I couldn't get the relation between employees and product???

Revision history for this message
kunthar (kunthar) wrote :

If you bypass this error and fill the form and click Save you'll have this error:

Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: Product - product.product]

affects: openobject-server → openobject-addons
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Kunthar,

I have checked your Issue with latest revision on runbot_trunk. But I did not face any error. so would you please check It again with latest and notify us where you have faced the problem.

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

I suspect you've removed the product and there still exists a reference of it.
Thanks.

Revision history for this message
kunthar (kunthar) wrote :

@serpent you possibly right. Could you please give me a hand which tables i should trace to see left overs for product?
btw, thank you for quick insight.

Changed in openobject-addons:
status: Incomplete → Invalid
Revision history for this message
Eric H (m-eric) wrote :

Was this resolved? I still get a similar error when I enable auditing on product.product.

Revision history for this message
Asgardinho (felipereyesazul) wrote :

I got the same problem, and a product with id '1' doesn't not exist, I don't even understand why it calls this function name_get from product.py on the creation of an employee, or why it find a product in the object with an id that doesn't exist in product_product nor product_template.
For the moment I just added this line before the line 636 and tabulate
if ids != [1]:

Revision history for this message
Asgardinho (felipereyesazul) wrote :

well the above solution didn't work because, even after changing the product_id of the employee object it still reefer to id 1,
so what it worked for me was to create a product_product with id 1 and a product_template with id 1 via postgresql

Revision history for this message
Fabian Semal (fabian.semal) wrote :

Hello, I just had the same problem. The name_get of product was called by an audit rule on product. Unsubscribing the product audit rule fixed the problem for me.

Dev Team (development-z)
information type: Public → Public Security
Revision history for this message
Jibin John K.J (jibin) wrote :

Try this

INSERT INTO product_template
(id,supply_method,list_price,standard_price,mes_type,uom_id,uos_coeff,purchase_ok,company_id,name,uom_po_id,type,procure_method,cost_method,categ_id)
VALUES
(1,'buy',75.00,30.00,'fixed',4,1.00,'f',1,'Service on Timesheet',4,'service','make_to_stock','standard',1);

INSERT INTO product_product
(id,name_template,active,product_tmpl_id,price_margin,valuation)
VALUES
(1,'Service on Timesheet','t',1,1.00,'manual_periodic');

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.