Child users cannot access their company information/logo in reports

Bug #772367 reported by Eric Caudal - www.elico-corp.com
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

How to reproduce it:
fresh database with purchases and dependencies and demo data
Link 2 companies, Shop1 being child of OpenERP SA
main company for demo user = shop1 and allowed companies = shop1

When user print a PO, there is an access error. User cannot print the logo and information company in the header of the purchase order even with default multi-company rules and in its own company.

[2011-04-28 21:32:45,074][test] WARNING:report:rml_except: " company.logo or removeParentNode('image') "
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/render/rml2pdf/utils.py", line 90, in _child_get
    eval(n.get('rml_except'), {}, self.localcontext)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/safe_eval.py", line 284, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 292, in __getattr__
    return self[name]
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 205, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2940, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2997, in _read_flat
    % (self._description,))
except_orm: (u'AccessError', u'Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Company).')

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

Thanks for the reporting!

There is not set the company logo and information for the child company in report.

And I am faced the another access problem as same this scenario when I am create a new record for the receive product by using another user(with child company) then I faced the following access error.

AccessError;

Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Location).

Thank you!

affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote : Re: [Bug 772367] Re: Child users cannot access their company information/logo in reports

If you set a logo with standard info in the header, the same problem
happens.
regards
--
Eric

Revision history for this message
Juanjo A (juanjoa) wrote :

Same error, with sending email with poweremail on a child company.

[tmp] WARNING:report:rml_except: " company.logo or removeParentNode('image') "
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/render/rml2pdf/utils.py", line 90, in _child_get
    eval(n.get('rml_except'), {}, self.localcontext)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/tools/safe_eval.py", line 284, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 292, in __getattr__
    return self[name]
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 205, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2940, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2997, in _read_flat
    % (self._description,))
except_orm: (u'ErrorAcceso', u'Operaci\xf3n prohibida por las reglas de acceso o realizada en un documento ya eliminado (Operaci\xf3n: lectura, Tipo documento: Companies).')

Changed in openobject-server:
status: Confirmed → In Progress
Changed in openobject-server:
status: In Progress → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Eric,

The issue seems to be fixed on Trunk with the latest merge of fixes from stable with revision-info:<email address hidden>

can you please try with the updated code. If you still face the problem please reopen the issue.

Thanks,

Changed in openobject-server:
status: Confirmed → Fix Released
Revision history for this message
Víctor Abad (p-info-e) wrote :

where is the code?

Revision history for this message
Jonathan Finlay (jmfinlayp) wrote :

I have the same problem with the current trunk 6.1 there's not fixed?

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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