Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, i got error "The company hierarchy cannot be changed" when i try to set parent company for sub company #162192

Open
DaoThang3797 opened this issue Apr 17, 2024 · 9 comments

Comments

@DaoThang3797
Copy link

I got error "The company hierarchy cannot be changed" when I try to set the parent company for a sub company

ref code: base/model/res_company.py
image
image

raise UserError(_("The company hierarchy cannot be changed."))

image

Anyone can explain the purpose of this code.
Setup parent company still works in other versions, 14,15,16 , but only 17 we can do that

@lathama
Copy link
Contributor

lathama commented Apr 17, 2024

From reading your comment I guess this an issue with Odoo 17.

Can you be clear about the steps to reproduce this?

I see you commented on dc4dcea already.

@lathama
Copy link
Contributor

lathama commented Apr 17, 2024

I was able to reproduce this.

Maybe related #86237

@DaoThang3797
Copy link
Author

DaoThang3797 commented Apr 18, 2024

Hi @lathama , please check my video reproduce this
https://vimeo.com/936335983/8ec0bd2e52

@DaoThang3797
Copy link
Author

DaoThang3797 commented Apr 19, 2024 via email

@lathama
Copy link
Contributor

lathama commented Apr 19, 2024

#147912 (comment) found the why

@lathama
Copy link
Contributor

lathama commented Apr 19, 2024

So maybe that field in the view needs to be read-only after it is set once.

@Rakoun
Copy link

Rakoun commented Apr 28, 2024

Hello,

I notice this error also on Odoo 17.
When will it be fixed?

Regards

@lathama
Copy link
Contributor

lathama commented Apr 28, 2024

@Rakoun it is working as designed as noted at #147912 (review)

@Rakoun
Copy link

Rakoun commented Apr 28, 2024

@lathama it is weird because the notion of branches don't allow to create own chart of account. So if I want to create an holding that have children with their own chart of account I can't with this way. I mean that there is no way to understand that there are children companies. I will need to add a new field with odoo studio for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants