improving ir_sequence to rely on its own security rule instead of the company rule

Bug #808672 reported by Leonardo Pistone
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

A few words of explanation: the merge for OPW case 10420 changed the code of ir.sequence to make it select all sequences that belong to companies that are visible to the user. This could be improved by having a default security rule on ir.sequence and use it to select the visible sequences (by default, all sequences of the currently visible companies: the current one and its children), instead of using the companies rules implicitly.

However the code change must be done very carefully, as we must not disrupt the logic of the SELECT FOR UPDATE NOWAIT, used to properly guard concurrent transactions.
See also the comments on the merge, as linked below.

-- original description --
Hello! Please give a look at my comment here https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-10420-ira/+merge/66546. I'm opening a bug as well because that branch has been merged already. thanks!

description: updated
description: updated
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hi Leonardo,

I've updated the description to sum up what we discussed on the merge proposal, I hope it matches what you had in mind.
After further discussions, I think this change might be too big for stable, as it requires introducing a new ir.rule for ir.sequence, which does not exist now, and will absolutely require a data update - otherwise it will cause regressions in all existing multi-company setups which were not even affected by the original problem.

I suggest we keep the current behavior in 6.0, relying on the security rules of res.company when determining the sequences to use (in essence delegating the visibility of ir.sequence to res.company). It should not be a major problem for stable, provided that bug 809178 is fixed (I could not reproduce it, btw).

Then for 6.1, we can improve it as described above.

What do you think?

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
milestone: none → 6.1
status: New → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Note that this should only be fixed in trunk after ensuring that the original merge in 6.0 (mentioned in the description) has already been forward-ported to trunk

summary: - ir_sequence regression
+ improving ir_sequence to rely on its own security rule instead of the
+ company rule
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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