c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #25394
[Bug 789215] Re: print followup fails when can't read partner with id=1
Thanks Jay.
When clicking "print follow ups" I get the traceback below.
With a little debugging I found out that the partner that can't be read
is the one with id=1.
In our customer's case, partner id=1 is the partner associated with the
parent company. Users work on child companies and can't read data from
the parent. That is correct. What is wrong is that the follow-up report
tries to access it.
A simpler way to reproduce that (not a realistic one though) is to just
prevent a user from accessing the partner with id=1. For example, with
the security rule [('id','<>',1)] on res.partner.
Thanks!
[2011-05-30 18:01:12,685][apz_20110527] ERROR:web-services:[01]: Exception: (u'AccessError', u'Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Partner).')
[2011-05-30 18:01:12,685][apz_20110527] ERROR:web-services:[02]: Traceback (most recent call last):
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[03]: File "/home/leo/devel/src/v6/server/bin/service/web_services.py", line 724, in go
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[04]: (result, format) = obj.create(cr, uid, ids, datas, context)
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[05]: File "/home/leo/devel/src/v6/server/bin/report/report_sxw.py", line 428, in create
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[06]: fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[07]: File "/home/leo/devel/src/v6/server/bin/report/report_sxw.py", line 491, in create_source_pdf
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[08]: return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
[2011-05-30 18:01:12,686][apz_20110527] ERROR:web-services:[09]: File "/home/leo/devel/src/v6/server/bin/report/report_sxw.py", line 505, in create_single_pdf
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[10]: rml_parser.set_context(objs, data, ids, report_xml.report_type)
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[11]: File "/home/leo/devel/src/v6/server/bin/report/report_sxw.py", line 372, in set_context
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[12]: objects[0].exists() and 'company_id' in objects[0] and objects[0].company_id:
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[13]: File "/home/leo/devel/src/v6/server/bin/osv/orm.py", line 292, in __getattr__
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[14]: return self[name]
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[15]: File "/home/leo/devel/src/v6/server/bin/osv/orm.py", line 205, in __getitem__
[2011-05-30 18:01:12,687][apz_20110527] ERROR:web-services:[16]: field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
[2011-05-30 18:01:12,688][apz_20110527] ERROR:web-services:[17]: File "/home/leo/devel/src/v6/server/bin/osv/orm.py", line 2942, in read
[2011-05-30 18:01:12,688][apz_20110527] ERROR:web-services:[18]: result = self._read_flat(cr, user, select, fields, context, load)
[2011-05-30 18:01:12,688][apz_20110527] ERROR:web-services:[19]: File "/home/leo/devel/src/v6/server/bin/osv/orm.py", line 2999, in _read_flat
[2011-05-30 18:01:12,688][apz_20110527] ERROR:web-services:[20]: % (self._description,))
[2011-05-30 18:01:12,688][apz_20110527] ERROR:web-services:[21]: except_orm: (u'AccessError', u'Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Partner).')
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/789215
Title:
print followup fails when can't read partner with id=1
Status in OpenERP Modules (addons):
Incomplete
Bug description:
observed in v6
to reproduce, make sure that a user can't read partner with id = 1 (like assign it to another company, or set a security rule on res_partner to [('id','<>',1)].
Printing of a followup on any partner then fails.
thanks!
References