2-letter rectangle

quick question:

We use 2-char codes for all suppliers (but need to be unique) so was planning to utilize this same rectangle with our internal code instead of the auto-generated one.

you can write your code hear :

and it will be called hear:


Thx Mohammed,

I believe abbreviations is great for use in filenames, number-series, ‘hide full supplier-names’ from documents etc.

Just had a look in the code-base for how and where the .abbr (''.join([c[0] for c in self.company_name.split()]).upper()) is created and there are quite a few places that do this. I vote for making this a “pluggable util” so that we can control this behaviour, edit upon creation and also setup some rules like uniqueness etc.

Not sure if there is a generic way to build generated fields things like this.

best /d

I agree this would be nice. We also use a 2 digit unique identifier for our suppliers.

If you have any help on this and how you implemented, that would be great. I created a custom field on supplier called supplier code but it always seems to link and pull supplier full name instead of the generated code.

Point of the supplier code is as you mentioned to hide this information from customer documents.