Multi-company - can't count stock location product values

Bug #873166 reported by Paulius Sladkevičius @ hbee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Incomplete
Undecided
Unassigned

Bug Description

Two company: A, B.
If A and B are not related companies (no child relation), then when you want to select stock location with A (e.g. making stock move) it gives error that you can't read product.template records. But before that you need to have B company stock moves.

Main problem comes from stock _product_value function in the stock.location class. There are SQL queries in the stock.py #L121, #L123 lines where nobody check if product belongs to user company or other relation.

OpenERP v6.0.3 addons rev. 4883

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

Hello Paulius,

I have checked your issue but I am not agree with you.
Because we have set a record rule on stock move object which is ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])].

It means that the user can seen only his company's location and also seen his child company's location but on bug report you have described that A and B are not related companies (no child relation).

So If your user belongs to company A, he will see only Company A 's locations not the Company B's location.

I have attached a video for your more reference so would you please check it and notify us where you face the problem and also provide the more information on this.

Thanks and waiting for your reply!

Revision history for this message
Amit Parik (amit-parik) wrote :
Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hello Amit,

sorry I didn't mention that I have changed that record rule by my requirements. I think to depend only on this record rule is not good solution because rules are only for security purpose, so without it this functionality must work on.

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.