Hi, I would like to understand why party code is set to read only by default before I change it to allow users to set their own codes for parties.
It’s set to readonly when you want the party code to be generated by Tryton. If you want users to specify the code, you can configure in Party > Configuration not to use a sequence, and then the field becomes read/write and users will be forced to provide a code.
I tried this with a new default tryton-env with a databse with only party and country modules.
It works in web, but it needs a page refresh after change.
It does not work for me in the client gtk (I may have some wrong in my configuration).
The generated id It feels almost like exposing the party id to the user.
Would it be better if the user could provide one and if none is provided then the system generates one?
This works if you bypass the UI. I mean I can provide the code or not to trytond and it will use the sequence if no code provided.
Finally it seems like if I change from one to the other (sequence/no sequence) if I add ids allowing to edit the code and then later add a sequence that generates the same ids, its likely that there either be an exception.
For me, this has the problem that if the user forgets to provide a code, it will be generated, which seems a bit strange.
As I understand it, many things go into parties (customers, companies, providers). Some you care about code so you provide it or edit it to find it easily later using the code, others you don’t care so you let the system give the code.
As it is now it seems to me that is an all or nothing option.
I don’t understand why not make code optional and unique. I don’t understand the use case for the sequence code. I am guessing that you give that code to somebody/something external to request parties in the system.