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

Problem with GetDotNetModel method at Odoo 18 #108

Open
MarianoGomezBidondo opened this issue Nov 12, 2024 · 6 comments
Open

Problem with GetDotNetModel method at Odoo 18 #108

MarianoGomezBidondo opened this issue Nov 12, 2024 · 6 comments

Comments

@MarianoGomezBidondo
Copy link

MarianoGomezBidondo commented Nov 12, 2024

In Odoo 18 when using the “GetDotNetModel” method it throws the exception “Not expected Property Value Type”.
To correct this make the following modifications

1-In OdooModelMapper.cs method ConvertToDotNetPropertyTypeTypeName
Add the lines in the case:

                case OdooValueTypeEnum.Properties:
                    return “string”;

                case OdooValueTypeEnum.PropertiesDefinition:
                    return “string”;

2-In OdooPropertyInfo.cs method ToOdooValueTypeEnum
Add in the case

                case “properties”:
                    return OdooValueTypeEnum.Properties;
                
                case “properties_definition”:
                    return OdooValueTypeEnum.PropertiesDefinition;

3-In OdooPropertyInfo.cs OdooValueTypeEnum
Add this value to the enum type

        PropertiesDefinition,
        Properties
@Pinscher-TDM
Copy link

had to implement this for our latest update to odoo 17 but all seems ok now.

@pscordeiro
Copy link

I have the same problem here, is there any way i can fix this locally in my project ?

@Pinscher-TDM
Copy link

Pinscher-TDM commented Dec 9, 2024

I have the same problem here, is there any way i can fix this locally in my project ?

i copied the github repo, made the changed described above and rebuild the dll for my project.

i'll have a look tomorrow to upload the changed repo and i'll post the link

@Pinscher-TDM
Copy link

I have the same problem here, is there any way i can fix this locally in my project ?

https://github.com/Pinscher-TDM/OdooJsonRpcClient

the link is to a fork with the changes applied

@pscordeiro
Copy link

Thank you, I will clone it to test

@galaxystef
Copy link

Thank you, I will clone it to test

Hi! Any updates on this?

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

4 participants