Property fields does not replicated when login with another company's user or change the company from user preference

Bug #813238 reported by Kevin McMenamin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
OpenERP's Framework R&D

Bug Description

When I create a partner in a multicompany environment and leave the company filed blank, the same partner is available for all companies.
However, the following fields are not being replicated to the other instances:
 - customer payment term - this is set up by company so may not be possible, but is linked to problem that you cannot make group payments at present.
 - payment term - this should be there as not company specific
 - delivery method - should be there

Thanks

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

Hello Kevin,

Would you please elaborate with proper example on this because I did not find any company field in the related relation field (customer payment term,payment term,delivery method).

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Kevin McMenamin (kevin-mcmenamin) wrote :

Amit

I have attached screenshots of process and results.

Thanks
Kevin

PS while you are looking at my bugs can you look at 805697 as this is quite serious

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

Hello,

I have checked this bug report.

The problem occurs on the property field which is does not populated (replicated) for another company.
The Same problem occurs in product from which have income account and expanse account is a property field.
Once we have assigned it and login with the another user with another company or changed the company from the user preference the property fields date will be lost or not displayed.

So this is the generalise issue for property field that's why I am assigning this to server side.

Thanks.

summary: - Fields not replicated for partner in multicompany environment
+ Property fields does not replicated when login with another company's
+ user or change the company from user preference
affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Kevin, Amit

This seems interesting use case and I think you are missing some functional aspect here.
kevin started by login in with user "Kevin" then created customer payment term and delivery method and saved them. now as these both fields are property fields they will be saved along with the company_id of the current logged in user.(ir.properrty has a M20 to company_id).
So next Kevin logs out and logs in with user Auckland and does not sees the properties that he created this is true and the reason is the ir_property table with return only those values that are related to current user company that is logged in. As here Auckland company does not have any entry yet in the ir.property table so it returns blank.

Work Around : Try to change the company of Auckland to user kevins company and you will get the properties.

I hope you understood what I meant.

correct me if I am missing something !

Thanks,

Changed in openobject-server:
status: Confirmed → Incomplete
Revision history for this message
Kevin McMenamin (kevin-mcmenamin) wrote :

I am not sure I understand what you mean, but I will describe the business situation and you can tell me if there is an issue.

In a normal multi-company situation, there will be a limited set of users that have access to many all companies and most users will have access to one company.

So a multi-company user sets up a new customer that is to be shared across all companies (ie company field left blank).

When all the other users go to use that customer they will expect all the fields to be populated. This is not happening as described in my bug.

Your solution above will not work as user Auckland does not have access to all the companies that user Kevin has.

Thanks

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Kevin,

I think my explanation was not good enough ! Well I will give another explanation which hopefully should help you out to figure out how the property fields are dealt in OpenERP.

Here customer and the fields (payment term, delivery method are property fields) both depends on the company_id of the user(his main company to which he belongs) that is logged in and there value will be returned based on the the rule defined on these object. By default the rule on ir.property object is ['|',('company_id','=',user.company_id.id),('company_id','=',False)] which means only return those properties if the company_id of the property is users.comany_id or the company_id of the property is False. In short the per-company filtering is in fact implemented by the ir.rule records that are applied on the ir.property object. So as per your example the company to which Auckland belongs does not have any property associated and hence you are not able to view them. You need to create property for those companies too.

I hope this could help you out !

Correct me if I am missing something !

Thanks,

Revision history for this message
Ravish(OpenERP) (rmu-openerp) wrote :

Hello ,

Currently I had look a lp:918509 issue, which is describe the same problem means our property field doesn't populated with another company.

I am agree with Naresh (Nch) and his explanation about the property field aspect. This thing working fine with the normal environment, whenever we have using a multi-company environment and If our user have multi-company group then he(user) can able to create a invoice,sale, purchase records. At this time it seems like a problem because our linked property is removed for another company rather than user company.

For this point of view, I am setting this as a "Triaged" and our framework team will take the correct decision on it.

Thanks you!

Changed in openobject-server:
status: Incomplete → Triaged
Revision history for this message
Numérigraphe (numerigraphe) wrote :

I don't see how this is a server of framework problem. For the sake of clarity, I'd rather suggest you
- mark this bug "invalid" because properties are meant to not be replicated between companies, as Naresh explained
- and mark Bug #918509 as "not a duplicate" of this bug, and investigate whether invoices are correct or not in a multicompany environment.
Or am I missing something?
Lionel.

Changed in openobject-server:
importance: Low → Undecided
status: Triaged → Invalid
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.