← Back to team overview

openerp-india team mailing list archive

[Bug 1042871] Re: Fields relateds

 

Hello thank you very much for reviewing my report:

Reviewing the code I realize that the error still continues, because
they follow a browse solitiando do with supperuser_admin and that's
wrong.

My problem is this:

I have a property field (which as we know is unique by company) many2one
relationship is a model and my related field is a field related to the
property that I mentioned above.

Well that happens, if you are asked to do a browse with SUPERUSER_ID, I
will make reading the company that has the admin user for that time,
which may be different from the user who is logged in viewing the
record, because I'm working in a multi-companies.

If I'm logged in with a company A and the admin user is assigned to a
company B, I'm watching the data from B Company, not my company, because
forced to do the browse with SUPERUSER_ID.

My problem is particularly good and I q almost alone lol, because I have
a field related to a field in a multi property company

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1042871

Title:
  Fields relateds

Status in OpenERP Server:
  Incomplete

Bug description:
  I have related fields and field properties I have the problem in multi
  environment companies, because in _fnct_read function that returns the
  value field of my relationship, I take this property to the user's
  company manager because at the time of the browse, and are going
  directly uid 1, which is the uid of root.

  The solution is to browse to the uid of the user that logged

  line 920
  Error:
  obj.browse objlst = (cr, 1, ids, context = context)

  solution:
  obj.browse objlst = (cr, uid, ids, context = context)

  If Permitting issues placed directly by the admin user was not a
  proper solution, because you are not taking into account the property
  type field

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1042871/+subscriptions


References