Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Adding custom parameters to POs #9192

Open
2 tasks done
asnreadily3d opened this issue Feb 26, 2025 · 9 comments
Open
2 tasks done

[FR] Adding custom parameters to POs #9192

asnreadily3d opened this issue Feb 26, 2025 · 9 comments
Labels
enhancement This is an suggested enhancement or new feature

Comments

@asnreadily3d
Copy link

asnreadily3d commented Feb 26, 2025

Please verify that this feature request has NOT been suggested before.

  • 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?

  • I want to develop this.
@asnreadily3d asnreadily3d added enhancement This is an suggested enhancement or new feature triage:not-checked Item was not checked by the core team labels Feb 26, 2025
@matmair matmair removed the triage:not-checked Item was not checked by the core team label Feb 26, 2025
@matmair
Copy link
Member

matmair commented Feb 26, 2025

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

@SergeoLacruz
Copy link
Contributor

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

@asnreadily3d
Copy link
Author

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 ?

@SergeoLacruz
Copy link
Contributor

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.

@asnreadily3d
Copy link
Author

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

@SergeoLacruz
Copy link
Contributor

SergeoLacruz commented Feb 27, 2025

Try the context variable "notes". It should do the job. See example here:
https://docs.inventree.org/en/stable/report/samples/#purchase-order

@asnreadily3d
Copy link
Author

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).

@SergeoLacruz
Copy link
Contributor

try order.notes

@asnreadily3d
Copy link
Author

Thank you so much @SergeoLacruz ! You have no idea how much it helps me !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an suggested enhancement or new feature
Projects
None yet
Development

No branches or pull requests

3 participants