Good morning everyone,
I wanted to know if anyone uses coding rules for products. I would like to be able to create a coding structure based on the product class, I’m attaching an example:
Raw material – MP{XXXX} ONIONS, PUMPKINS,
• MP0001
• MP0002
• MP0003
• MP0004
Hello, what is the ultimate goal for wanting to use different “numbering series” for your products based on their category for the product references in Dolibarr? I mean, what would it bring to you?
From the image you shared, I assume you are interested in being able to differentiate products by category in the product listings. If that’s the case, I think the following might help:
If you assign product tags for each category, you will be able to easily filter products by category:
The “bad news” is that I can’t find a way to display the tag in the listing, so that, as shown in your image, it would be possible to differentiate products by category in a listing with all products. It’s strange that this doesn’t exist. Maybe I missed something and I’m not seeing it.
In summary, wouldn’t managing your products with CATEGORY TAGS be sufficient for your needs?
By the way, another more “manual” approach comes to mind to achieve both things, and I think it could bring additional benefits in other scenarios (PDFs, etc.):
Why not include a 1-3 letter prefix in the product “label” (in the product name) to indicate its category?
Something like:
C | Product Sheet
C | Cube Price
R | Red Death
This would allow you to ALWAYS distinguish the category of the products, and you could also filter them by applying a filter like “R |” in the “label” filter box
Furthermore, these “marks” can be modified when you need it, without AFFECTING the REFERENCE of the product, which usually appears already in too much places: invoices, proposals, shipments, pricing sheets, etc. and it’s not very convenient to modify.
Hi Chaos!
Thanks a lot for the support and the quick reply. I like having the encoding with the speaking code, I have always been used to working like this and I find it easy to understand.
yours is the only solution at the moment, but if you could buy a module I would be the first to invest.
hi jonbendtsen!
thanks for the reply.
I like this thing, however since it’s the first time I insert a pull request, I’m having some problems because I’m not a collaborator, calmly I’ll understand how to do it because this thing is fundamental for me. All the plm I’ve used implemented it.
Thank you for your input! I just wanted to clarify something about the term “pull request” on GitHub. From what I understand, a pull request is typically opened when someone has already developed code that improves the software and is requesting to have that code added to the official project.
In this case, I’m not sure if the OP has developed a code solution for their specific need. Could you confirm if you were suggesting that someone else should open a pull request for this improvement?
I apologize if I misunderstood your comment—I just want to make sure we’re on the same page. Thanks for your patience, and I appreciate the discussion!
I’ve been developing for Dolibarr since 2017, so I have a decent understanding of how it works. That said, I often need to check the code to provide precise answers to certain questions, especially since Dolibarr is constantly evolving every semester! Based on what you’ve described, I suspect that what you’re requesting or proposing might not be as “easy” to implement as it seems. Let me explain.
If I’m understanding your proposal correctly: you’re suggesting the ability to define endless reference schemas for generating auto-referencing for products added to your Dolibarr database, depending on for example their type or category.
First, let me say that the current system in Dolibarr for defining “reference masks” for different types of objects (products, invoices, projects, etc.) is already quite sophisticated. It’s a beautifully designed technical system.
However, it’s also quite complex at this point. Adding a modification like the one you’re suggesting would be a significant challenge. It’s not impossible, but it could potentially introduce instability or break certain functionalities before reaching a stable state.
You can change the automatically assigned reference
That said, are you aware that in the settings area of the PRODUCTS module, there’s an option (a switch) to enable the MODE Leopard to let you generate mannually the references for the PRODUCTS?
HI!
sorry for the late reply…
yes I had seen this possibility, and reasoning with u I convinced myself that I will use the leopard module. in this way there aren’t rules and I can write what I want.
then I am introducing tags a lot, but I am a square head and I am very fond of the speaking code, I made an excel sheet with the progressive codes.
that said I thank you very much for sharing your experience and your time, it’s thanks to you and others that this program holds up.
By the way, I have just been tasked with creating a “semi-automatic” system for a client to generate references (codes) and labels for new products (and also rename existing ones).
In their case, they have several people adding products, and there’s a lot of disorder in this matter: each one adds it as they can, and even with certain internal rules, some users “don’t understand well” how to apply them.
So I’m working on a button that will appear on the product edit card that allows you to generate a new CODE (REFERENCE) and LABEL (TITLE) for that product with one click (without saving it, just suggesting it for you to edit or save as is).
This generation has to be based on a collection of “extra fields” (additional attributes) of product type list that they will fill in previously for each product (brand, family, color, size, etc.), and my “magic generator button” will produce a CODE and a LABEL according to these policies based on the values of these fields.
Anyway, I imagine many other Dolibarr users have this same challenge. So once I have it functional, I’m going to publish it on Dolistore.
Although in these cases, the challenge is to make it “easily configurable” for anyone else who wants to use it. But well, I think it would be an interesting first step.
It’s not to disparage the good work done natively in Dolibarr, but we know there are all types of clients, and you can’t always keep everyone happy