Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] partner_relations - Error when deleting a res.partner #154

Closed
rafaelbn opened this issue Aug 11, 2015 · 22 comments
Closed

[8.0] partner_relations - Error when deleting a res.partner #154

rafaelbn opened this issue Aug 11, 2015 · 22 comments
Assignees

Comments

@rafaelbn
Copy link
Member

Tested in OCA's runbot
https://runbot.odoo-community.org/runbot/repo/github-com-oca-partner-contact-134

  • Create a partner
  • Don't select "is a company"
  • Filled "firstname" and "lastname"
  • Save partner
  • Delete the partner we have created
  • You get this error:

AccessError
No value found for res.partner(75,).birthdate_date

I have tested in Odoo's runbot and you can delete any res.partner if it hasn't any other relation with other objects.

Maybe this bug it not from this module partner_contact_birthdate

@pedrobaeza I think that any module in this project must at least pass test of creating, modifying and deleting a res.partner, if not shouldn't be merged.

cc @sysadminmatmoz @yajo

@pedrobaeza
Copy link
Member

Tests are not mandatory for now in OCA to not discourage the contributions, and the review process usually detect these things.

I also think that this module is not the guilty, but something is happening.

@yajo
Copy link
Member

yajo commented Aug 12, 2015

Is base_contact installed? If so, try going to modules list, searching for base_contact and pressing Update.

@rafaelbn
Copy link
Member Author

@yajo base_contact is installed. After update still error.

I have uninstall lots of modules. Test & Try...

After uninstalling partner_firstname the problems disapears...

So ther is a bug in partner_firstname module #139

@eLBati
Copy link
Member

eLBati commented Aug 14, 2015

@rafaelbn just tested on
http://3112595-8-0-359f6c.runbot1.odoo-community.org/
using the base database, installed partner_firstname, partner_contact_birthdate and base_contact: the error does not happen.

Please try to reproduce it on a new database, pointing out the modules to install. Traceback would be useful too.

Thanks

@yajo
Copy link
Member

yajo commented Aug 14, 2015

As a rule of thumb, I always press Update in the base module after pulling new changes to any modules (core or OCA, any). That makes Odoo perform any updates needed and usually makes everything work smoothly. You could try that.

This bug seems to me more related to #120 than to #139. You can sniff all the code in partner_firstname and will find nothing related to birthdate.

And also you should try what @eLBati says.

@rafaelbn
Copy link
Member Author

Please @yajo add a test for deleting res.partner to partner_firstname, this could help now and in the future. Eventhogh I'm going now to test runbot again.

@eLBati howto traceback?

@rafaelbn rafaelbn changed the title [8.0] partner_contact_birthdate - Error when deleting a res.partner [8.0] partner_relations - Error when deleting a res.partner Aug 14, 2015
@rafaelbn
Copy link
Member Author

@yajo @eLBati

The error I get is:

AccessError
No value found for res.partner(51,).street_name

  • Log in in runbot OCA - partner-contact in a clean data base
    ^ Install crm module --> DELETION OK
  • Install partner_relations --> DELETION OK
  • Install partner_contact_birthdate --> DELETION OK
  • Install partner_firstname --> FAILS DELETION. So here comes the problem.

The error I get is:

AccessError
No value found for res.partner(17,).lastname

Something between partners_firstname and partner_relations it's happening. Because why with all modules installed the error get fixed when uninstalling partner_firstname?

Please let me know, thanks.

cc @pedrobaeza @antespi @JavierIniesta

@rafaelbn
Copy link
Member Author

openerp.http:540 _handle_exception
Exception during JSON request handling.
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/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 "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/partner_contact_in_several_companies/models.py", line 127, in unlink
    return super(res_partner, self).unlink(cr, user, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/base/res/res_partner.py", line 537, in unlink
    return super(res_partner, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/mail/mail_thread.py", line 455, in unlink
    res = super(mail_thread, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 3663, in unlink
    recs.recompute()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5690, in recompute
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5690, in <dictcomp>
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5574, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/fields.py", line 823, in __get__
    return record._cache[self]
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5934, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/fields.py", line 55, in get
    raise self.exception
AccessError: ('AccessError', 'No value found for res.partner(75,).street_name')
openerp.http:540 _handle_exception
Exception during JSON request handling.
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/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 "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/partner_contact_in_several_companies/models.py", line 127, in unlink
    return super(res_partner, self).unlink(cr, user, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/base/res/res_partner.py", line 537, in unlink
    return super(res_partner, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/mail/mail_thread.py", line 455, in unlink
    res = super(mail_thread, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 3663, in unlink
    recs.recompute()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5690, in recompute
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5690, in <dictcomp>
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5574, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/fields.py", line 823, in __get__
    return record._cache[self]
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5934, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/fields.py", line 55, in get
    raise self.exception
AccessError: ('AccessError', 'No value found for res.partner(75,).birthdate_date')
openerp.http:540 _handle_exception
Exception during JSON request handling.
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/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 "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/base/res/res_partner.py", line 537, in unlink
    return super(res_partner, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/mail/mail_thread.py", line 455, in unlink
    res = super(mail_thread, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 3630, in unlink
    pool_model_data.unlink(cr, SUPERUSER_ID, reference_ids)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/addons/base/ir/ir_model.py", line 1018, in unlink
    return super(ir_model_data,self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 3663, in unlink
    recs.recompute()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5690, in recompute
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5690, in <dictcomp>
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5574, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/fields.py", line 823, in __get__
    return record._cache[self]
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/models.py", line 5934, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3112595-8-0-359f6c/openerp/fields.py", line 55, in get
    raise self.exception
AccessError: ('AccessError', 'No value found for res.partner(17,).lastname')

@rafaelbn
Copy link
Member Author

Please @antespi could you review this issue? Thanks

@rafaelbn
Copy link
Member Author

@eLBati did you chack this? #154 (comment) Thanks

@pedrobaeza pedrobaeza changed the title [8.0] partner_relations - Error when deleting a res.partner [8.0] partner_firstname - Error when deleting a res.partner Aug 20, 2015
@eLBati
Copy link
Member

eLBati commented Sep 1, 2015

I reproduced it installing partner_contact_birthdate and partner_relations.

Maybe modules authors can give some hint? ping @yajo @hbrunn

@hbrunn
Copy link
Member

hbrunn commented Sep 1, 2015

put some breakpoints in the triggers involved, I assume some trigger tries to read the deleted patner afterwards

@rafaelbn
Copy link
Member Author

rafaelbn commented Sep 3, 2015

@hbrunn @eLBati @pedrobaeza @antespi @yajo question: if anyone add the test of deleting a partner in all modules in repo partner-contact then we will see when it happends. And by the way is a nice test.

@yajo yajo mentioned this issue Sep 7, 2015
@yajo
Copy link
Member

yajo commented Sep 8, 2015

The point is that partner_firstname and partner_contact_birthdate work flawlessly unless partner_relations is installed. It fails when there's a computed field trying to set a value in the model. This is expected behavior, that raises a MissingError, which gets skipped by the ORM. But when partner_relations is installed, computed fields raise AccessError, which bubbles to the user and prevents deletion.

Let me guess that any module adding a computed field to res.partner will fail.

I'm fixing partner_firstname and partner_contact_birthdate, but I'm pretty sure the real bug is in partner_relations.

Does anybody know what is partner_relations doing? It's a very low-level module and I think it does something wrong, but after debugging for awhile I cannot find it.

hbrunn added a commit to hbrunn/partner-contact that referenced this issue Sep 8, 2015
@hbrunn
Copy link
Member

hbrunn commented Sep 8, 2015

@yajo don't, the bug is fixed in #171

hbrunn added a commit to hbrunn/partner-contact that referenced this issue Sep 8, 2015
@yajo
Copy link
Member

yajo commented Sep 9, 2015

Testing #171 with #170 I discovered accidentally that partner_event is affected too:

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 307, in checked_call
return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 944, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python2.7/site-packages/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 "/usr/lib/python2.7/site-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/addons/base/res/res_partner.py", line 537, in unlink
return super(res_partner, self).unlink(cr, uid, ids, context=context)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/addons/mail/mail_thread.py", line 455, in unlink
res = super(mail_thread, self).unlink(cr, uid, ids, context=context)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 3630, in unlink
pool_model_data.unlink(cr, SUPERUSER_ID, reference_ids)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/addons/base/ir/ir_model.py", line 1018, in unlink
return super(ir_model_data,self).unlink(cr, uid, ids, context=context)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 3663, in unlink
recs.recompute()
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 5690, in recompute
name: rec[name] for name in names
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 5690, in <dictcomp>
name: rec[name] for name in names
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 5574, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/usr/lib/python2.7/site-packages/openerp/fields.py", line 823, in __get__
return record._cache[self]
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 5934, in __getitem__
return value.get() if isinstance(value, SpecialValue) else value
File "/usr/lib/python2.7/site-packages/openerp/fields.py", line 55, in get
raise self.exception
AccessError: ('AccessError', 'No value found for res.partner(43,).registrations')

@hbrunn
Copy link
Member

hbrunn commented Sep 9, 2015

@yajo set a breakpoint in https://github.com/OCA/OCB/blob/8.0/openerp/fields.py#L53 and inspect what's going on when the failed value is created. Afterwards, the backtrace doesn't help a lot

@yajo
Copy link
Member

yajo commented Sep 11, 2015

One funny thing: if you remove this read() method, the bug is fixed in all other modules. The bug resides in that method. I tested manually and with the tests in #170.

But partner_relation has no tests, so no way to check if that breaks it (and it will, probably).

This module needs much love. Migrating to v8 api would benefit it a lot (or to a more readable v7, it's very low-level even for that). And a test suite is a must for it.

I hope I have helped you to triage it, but I'm not going to touch this module's source for now. I'll keep #170 until you wish to merge it, as it does not hurt.

@yajo
Copy link
Member

yajo commented Sep 21, 2015

This is not fixed. See #170 (comment).

@rafaelbn
Copy link
Member Author

@pedrobaeza @hbrunn I reopen this issue again. As @yajo says is not fixed.

I have tested in this moment again in OCA runbot (partner-contact) and we still cannot delete a res.partner.

Problem is in module partner_relations (users could help @bwrsandman @antespi @hbrunn )

http://3115439-8-0-0c0503.runbot2.odoo-community.org/web?db=3115439-8-0-0c0503-all#menu_id=107&action=103

2015-09-22 00:48:47     ERROR   server  openerp.http:540 _handle_exception

Exception during JSON request handling.
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/addons/web/controllers/main.py", line 948, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/addons/web/controllers/main.py", line 940, in _call_kw
    return checked_call(request.db, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/addons/web/controllers/main.py", line 939, in checked_call
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/addons/partner_contact_in_several_companies/models.py", line 127, in unlink
    return super(res_partner, self).unlink(cr, user, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/addons/base/res/res_partner.py", line 537, in unlink
    return super(res_partner, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/addons/mail/mail_thread.py", line 455, in unlink
    res = super(mail_thread, self).unlink(cr, uid, ids, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/models.py", line 3665, in unlink
    recs.recompute()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/models.py", line 5721, in recompute
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/models.py", line 5721, in <dictcomp>
    name: rec[name] for name in names
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/models.py", line 5605, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/fields.py", line 823, in __get__
    return record._cache[self]
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/models.py", line 5965, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115439-8-0-0c0503/openerp/fields.py", line 55, in get
    raise self.exception
AccessError: ('AccessError', 'No value found for res.partner(75,).street_name')

From #103

eLBati added a commit to eLBati/partner-contact that referenced this issue Nov 11, 2015
…ed together, get

AccessError: ('AccessError', 'No value found for res.partner(43,).birthdate_date')
See OCA#154
@eLBati
Copy link
Member

eLBati commented Nov 11, 2015

Hello, see my fix proposal at #200

@rafaelbn
Copy link
Member Author

Fixed here: #200

Please review, thanks

eLBati added a commit to eLBati/partner-contact that referenced this issue Nov 12, 2015
…ed together, get

AccessError: ('AccessError', 'No value found for res.partner(43,).birthdate_date')
See OCA#154
eLBati added a commit to eLBati/partner-contact that referenced this issue Nov 13, 2015
…ed together, get

AccessError: ('AccessError', 'No value found for res.partner(43,).birthdate_date')
See OCA#154
yvaucher pushed a commit to yvaucher/partner-contact that referenced this issue Jan 18, 2016
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py
yvaucher pushed a commit to yvaucher/partner-contact that referenced this issue Jan 18, 2016
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py
etobella pushed a commit to etobella/partner-contact that referenced this issue Oct 9, 2017
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py
etobella pushed a commit to etobella/partner-contact that referenced this issue Oct 10, 2017
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py
JordiBForgeFlow pushed a commit to ForgeFlow/partner-contact that referenced this issue Nov 17, 2017
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py
gdgellatly pushed a commit to odoonz/partner-contact that referenced this issue Oct 29, 2018
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py
gdgellatly pushed a commit to odoonz/partner-contact that referenced this issue Nov 6, 2018
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
yajo pushed a commit that referenced this issue Nov 22, 2018
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in #171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
victormmtorres pushed a commit to Tecnativa/partner-contact that referenced this issue Mar 25, 2019
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
rven pushed a commit to rven/partner-contact that referenced this issue Sep 30, 2019
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
rven pushed a commit to rven/partner-contact that referenced this issue Oct 26, 2019
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
ermannognan pushed a commit to ermannognan/partner-contact that referenced this issue Nov 25, 2019
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
luistorresm pushed a commit to vauxoo-dev/partner-contact that referenced this issue Oct 12, 2020
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
bjornbillen pushed a commit to bjornbillen/partner-contact that referenced this issue Nov 12, 2021
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
bjornbillen pushed a commit to bjornbillen/partner-contact that referenced this issue Feb 8, 2022
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
FrancoMaxime pushed a commit to acsone/partner-contact that referenced this issue Aug 24, 2022
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
baimont pushed a commit to acsone/partner-contact that referenced this issue Oct 6, 2022
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
victor-champonnois pushed a commit to coopiteasy/partner-contact that referenced this issue Feb 3, 2023
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
moitabenfdz pushed a commit to DynAppsNV/partner-contact that referenced this issue Nov 16, 2023
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
edlopen pushed a commit to moduon/partner-contact that referenced this issue Mar 1, 2024
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
edlopen pushed a commit to moduon/partner-contact that referenced this issue Mar 1, 2024
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
SonoDavid pushed a commit to DynAppsNV/partner-contact that referenced this issue Oct 14, 2024
Conflicts:
	partner_firstname/__openerp__.py
	partner_firstname/tests/__init__.py

Fix flake8 error

After all, this was just a workaround. Remove it.

The real fix was in OCA#171. I leave the tests.

Fix test that was having sentences after return.

PEP8 fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants