[FR] Adding parameters to POs
Please verify that this feature request has NOT been suggested before.
- [x] I checked and didn't find a similar feature request
Problem statement
Hi, I need some help on something I'm currently working on. I'm doing a template for future purchase orders and I wish to add extra info, that is custom to each PO. In this case, it will usually be either lead time (number of weeks), delivery type (DDP, EXW, etc.) and/or payment terms.
It's similar to the existing feature of custom parts parameters. With multiple ways to store the value (value, checkbox, list). But I can't find a way to do the same for POs. If it's not yet implemented, I would love to have that feature
Thank you in advance for your time !
Suggested solution
Adding custom field parameters to POs like the feature for custom part parameters
Describe alternatives you've considered
(Trying to find it) As a potential temporary solution (or something else that is proposed by someone more knowledgeable than me): Is it possible to use the notes section in a PO to be exported into the document when generated with the template ?
Examples of other systems
No response
Do you want to develop this?
- [x] I want to develop this.
Parameters are only on parts / categories right now. Expanding them to a more generic system like metadata or custom states would be very interesting. Main thing to watch out for is to cleanly separate the mechanism from parts and improve inline docs to enable devs of InvenTree or plugins correct usage in models. This could either be bound to specific models or one could use generic content type based m2m foreign key
You can always add additional data into the metadata field. This is accessible from the reporting system too. You can have a look at the plugin for additional build order data. It does exactly this https://github.com/SergeoLacruz/inventree-build-data/tree/main
Thank you for your help. I see now with metadata, the problem is I can't spend to much time tinkering around for the moment, I trying to convince my colleagues to use Inventree as the main inventory system of our team and they are asking if it's possible to do extra things like the PO template I'm currently working on.
For a temporary solution until a future update, is the one I proposed possible (using the PO notes field as data) ? And if yes what variable name should I add to the PO template for Inventree to make the link on generation ?
You can write to the notes field whatever you like.The notes field is accessible from the report engine. I do not understand you point with variable name and link on.
Yes sorry "variable" is maybe not the best word. I meant the text that links to the PO parameter in this case the notes, similar to "{ line.part.description }" for example. I didn't manage to find it in the docs.
Thank you again for your help @SergeoLacruz
Try the context variable "notes". It should do the job. See example here: https://docs.inventree.org/en/stable/report/samples/#purchase-order
In the example it's for a part, I would like to have the notes from the purchase order instead.
Oh and btw I think I've found a bug, the save button when I edit the notes of the PO doesn't always register when I click on it (no pop up confirming save and leaving loses the modifications).
try order.notes
Thank you so much @SergeoLacruz ! You have no idea how much it helps me !!
@asnreadily3d are you working on this or is this up for dev by someone else?
I'm currently working on it, the plan in the near future is to implement as our new inventory system. I'll manage production, I didn't knew much about html and context variables for making templates but now I'm better at it.
So I can assign you to this issue - you will submit a patch that enables usage of parameters in purchase orders?
Oh I'm sorry I didn't get the point of your previous message. I'm not going to dev a solution.