[6.1/Trunk] Share module doesn't work

Bug #1004833 reported by Stéphane Bidoul (Acsone)
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP R&D Addons Team 1

Bug Description

Hello,

I'm trying to use the "share" function with a customer invoice.

The e-mail is sent correctly to the recipient, and the recipient can connect using his e-mail address as login and the password received. However the result is the following error message:

AccessError
You can not read this document (account.journal) ! Be sure your user belongs to one of these groups: User, Human Resources / User, Manager, Invoicing & Payments.

Best regards,

-sbi

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Medium
status: New → Confirmed
Amit Parik (amit-parik)
summary: - [6.1] share customer invoice: access error
+ [6.1/Trunk] Share module doesn't work
Changed in openobject-addons:
assignee: OpenERP Publisher's Warranty Team (openerp-opw) → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

This type of error faced because when the share user was created there is so many object's rights is missing.

That's why If you tried with any object, you have faced access error on all object.

Currently Share module doesn't work on webclient due to new design of webclient.That's why I have checked this on 6.1 and faced the same problem, in any case the behavior of the share did not change much in trunk yet. So if there's a bug in 6.1 it's likely to be present in trunk too. That's why I am assigning this for trunk.

Thank you!

Revision history for this message
Ferdinand (office-chricar) wrote :

Hmm
I though a certified modul (share) might work

Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Arnaud Pineux (OpenERP) (api-openerp) wrote :

Hello everybody,

The share module sent wrong url to share document but even if we just fixes it, we will not be able to share every document.
To read a document you need the access right for that document and also for its dependencies and its relation (many2many, ...).
Almost every model (document) is defined with these relationship but there are sometimes, fields "function" which need a specific model in their functions. In that case, we cannot create "read access right" because we cannot look inside every function.
In conclusion, the share module works (and will be soon released) for almost every model (document) but there are still limitations.
(For example: Invoice and sale order can be shared to anyone).
Good luck to everybody,

Arnaud Pineux

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote : Re: [Bug 1004833] Re: [6.1/Trunk] Share module doesn't work

2012/11/30 Arnaud Pineux (OpenERP) <email address hidden>

> Hello everybody,
>
> The share module sent wrong url to share document but even if we just
> fixes it, we will not be able to share every document.
> To read a document you need the access right for that document and also
> for its dependencies and its relation (many2many, ...).
> Almost every model (document) is defined with these relationship but there
> are sometimes, fields "function" which need a specific model in their
> functions. In that case, we cannot create "read access right"

IMHO this have solution, but is not a 2 hours one.

If you put a generic method that with created action to open the model and
created or linked user try to "read" the document, put in a try, the
traceback due to __internal permisions__ inside function fields will
appear, in this case catch the model AND ask the user if he is sure to
allow other user read that object, or simply hide it in the client side
(this should be the default behaviour)

Is really sad that a feature as cool as this is totally broken by default,
object per object you easylly can expend 20 hours in ACL testing to say "It
is working."

I am talking with experience on it.

At least you want to show one object without usefull information to
customer is so so so difficult put in production OOB this feature.

IMHO if this will be one of the social features ready to use in V7 we
should expend the necesary time to at least propose extra official addons
that enable object per object or improve the ACL rules in the core.

Regards.!

> because we cannot look inside every function.
> In conclusion, the share module works (and will be soon released) for
> almost every model (document) but there are still limitations.
> (For example: Invoice and sale order can be shared to anyone).
> Good luck to everybody,
>
> Arnaud Pineux
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Project Group.
> https://bugs.launchpad.net/bugs/1004833
>
> Title:
> [6.1/Trunk] Share module doesn't work
>
> Status in OpenERP Addons (modules):
> In Progress
>
> Bug description:
> Hello,
>
> I'm trying to use the "share" function with a customer invoice.
>
> The e-mail is sent correctly to the recipient, and the recipient can
> connect using his e-mail address as login and the password received.
> However the result is the following error message:
>
> AccessError
> You can not read this document (account.journal) ! Be sure your user
> belongs to one of these groups: User, Human Resources / User, Manager,
> Invoicing & Payments.
>
> Best regards,
>
> -sbi
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/1004833/+subscriptions
>

--
--------------------
Saludos Cordiales

Nhomar G. Hernandez M.
+58-414-4110269
Skype: nhomar00
Web-Blog: http://geronimo.com.ve
Servicios IT: http://vauxoo.com
Linux-Counter: 467724
Correos:
<email address hidden>
<email address hidden>
twitter @nhomar

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Arnaud Pineux (OpenERP) (api-openerp) wrote :

Hello Nhomar,

Thank you for your answer and your solution but we will not fix this module like that. We need a clean way to add access rights. A complete review of that module may be necessary.

Good luck to everyone,

Arnaud Pineux (API)

Revision history for this message
开阖软件 Jeff Wang (jeff.osbzr.com) wrote :

Why this marge is pending yet ? Can the share module been used in final 7.0 release ?

I patched the diff file manually and got following error:

  File "/home/jeff/openerp7/openerp/addons/share/wizard/share_wizard.py", line 107, in _share_root_url
    for cond in safe_eval(this.share_wizard_id.domain):
  File "/home/jeff/openerp7/openerp/osv/orm.py", line 487, in __getattr__
    raise AttributeError(e)
AttributeError: "Field 'share_wizard_id' does not exist in object 'browse_record(share.wizard, 7)'"

Do I missed anything important?

Revision history for this message
Arnaud Pineux (OpenERP) (api-openerp) wrote :

The share module is still under construction so this fix will certainly be removed. There are difficult situations to handle in the share module before release it in the 7.0.

Good luck,

API

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.