I have been working on creating object types, assigning properties, and then updating them over time. I just realized there is a feature that is a bit annoying, especially when managing large masterdata.
To reproduce:
Create an object type with some properties assigned inside a section
Add some more properties in a different section
Define a new property in the section of step 1
What I get is two separate, yet identical sections:
Hello, each property also has an “ordinal” attribute which determines in what order the properties are displayed. So if you need to insert property before other you have to change the ordinal attribute of the new property to be between the ones that already exist.
So for example when you are creating new object type you can give the properties ordinals by 10, so first one would have 10, second one 20, etc. And then you can easily insert properties between them.
Or reorder them in admin UI. But I did not found a way to modify existing properties in Python other than creating custom request to the server.
I basically had to create extension of the pybis that allows you to define entity types as classes with attributes and then automatically creates/updates them according to the changes.