Code review comment for lp:~therp-nl/openerp-web/lp1179839

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> I talk about empty attrs (meaning, no create/delete/edit properties in attrs) because this is what you end up with if you don't define this attributes on your form/tree view.

No, that's what you end up with if you don't define the attribute *and
the user has these access rights to the corresponding model*.

> I would like to understand which check you think the original function breaks.

I've told you: if you have an M2M between two objects A and B, and the
user has c/u/d access to A but not to B the attributes will be set (to
false) on the view for B inside the form of A. Even though the user is
perfectly able to create *links* between A and B objects, he just isn't
able to create (or delete or edit) B objects.

> I think the function is_action_enabled only is about the UI telling whether or not the developer writing a form wants to have certain buttons there

You think wrong.

> Do we agree on that?

No, we most definitely do not, the ability for view writers to override
these attributes was added as a side-benefit but their original user
case is to indicate to the client that the current user does not have
create, write and/or delete right on the model without an extra request:
http://bazaar.launchpad.net/~openerp/openobject-server/7.0/revision/4393#openerp/osv/orm.py

« Back to merge proposal