mirror of
https://github.com/inventree/inventree-website.git
synced 2025-04-27 21:16:45 +00:00
349 lines
14 KiB
HTML
349 lines
14 KiB
HTML
<!DOCTYPE html>
|
||
<html lang=" en-US ">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
||
<link rel="stylesheet" href="/assets/splide/css/splide.min.css">
|
||
<link rel="stylesheet" href="/assets/index.css">
|
||
<link rel="shortcut icon" type="image/png" href="/assets/icon/favicon.ico">
|
||
|
||
<script src="/assets/splide/js/splide.min.js"></script>
|
||
|
||
<!-- Fontawesome integration -->
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
|
||
|
||
<title>InvenTree - Inventree Ipn Generator</title>
|
||
<meta itemprop="description" name="description"
|
||
content="InvenTree is an open-source inventory management system which provides intuitive parts management and stock control. It is at the center of an ecosystem of a..." />
|
||
|
||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||
<title>Inventree Ipn Generator | InvenTree</title>
|
||
<meta name="generator" content="Jekyll v4.3.3" />
|
||
<meta property="og:title" content="Inventree Ipn Generator" />
|
||
<meta name="author" content="LavissaWoW" />
|
||
<meta property="og:locale" content="en_US" />
|
||
<meta name="description" content="Introduction Installing this plugin enables the automatic generation if Internal Part Numbers (IPN) for parts." />
|
||
<meta property="og:description" content="Introduction Installing this plugin enables the automatic generation if Internal Part Numbers (IPN) for parts." />
|
||
<link rel="canonical" href="/LavissaWoW/inventree-ipn-generator" />
|
||
<meta property="og:url" content="/LavissaWoW/inventree-ipn-generator" />
|
||
<meta property="og:site_name" content="InvenTree" />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="article:published_time" content="2025-04-26T01:13:50+00:00" />
|
||
<meta name="twitter:card" content="summary" />
|
||
<meta property="twitter:title" content="Inventree Ipn Generator" />
|
||
<script type="application/ld+json">
|
||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"LavissaWoW"},"dateModified":"2025-04-26T01:13:50+00:00","datePublished":"2025-04-26T01:13:50+00:00","description":"Introduction Installing this plugin enables the automatic generation if Internal Part Numbers (IPN) for parts.","headline":"Inventree Ipn Generator","mainEntityOfPage":{"@type":"WebPage","@id":"/LavissaWoW/inventree-ipn-generator"},"url":"/LavissaWoW/inventree-ipn-generator"}</script>
|
||
<!-- End Jekyll SEO tag -->
|
||
|
||
</head>
|
||
|
||
<body class="flex flex-col antialiased cm-gray-1 min-h-screen">
|
||
<div class="flex-none">
|
||
<header class="cm-gray-2 body-font sticky top-0 z-50 bg-gradient-to-r from-white to-secondary">
|
||
<div class="container mx-auto flex flex-wrap p-5 flex-row items-center">
|
||
<a class="flex title-font font-medium items-center cm-gray-1 mb-0 mr-2" href="/">
|
||
<img src="/assets/logo.png" alt="logo" height="32" width="32" class="h-8">
|
||
<span class="ml-3 text-xl">InvenTree</span>
|
||
</a>
|
||
|
||
<div class="flex-grow xs:flex-none"></div>
|
||
|
||
<nav class="md:mr-auto md:py-1 xs:ml-4 xs:pl-4 xs:border-l xs:border-gray-400 flex flex-wrap items-center text-base justify-center">
|
||
<a class="mr-5 hover:cm-gray-1" href="/deploy.html">Deploy</a>
|
||
<a class="mr-5 hover:cm-gray-1" href="https://docs.inventree.org/en/stable/">Docs</a>
|
||
<a class="mr-5 hover:cm-gray-1" href="/blog">Blog</a>
|
||
</nav>
|
||
|
||
|
||
</div>
|
||
</header> <article class="max-w-p90">
|
||
|
||
<h2>inventree-ipn-generator
|
||
<span class="sm:ml-2 text-sm">
|
||
<a href="/LavissaWoW">
|
||
<span class="inline-flex">
|
||
<img src="https://github.com/LavissaWoW.png?size=40" alt="mdo" class="self-center w-5 h-5 rounded-full" style="margin:0px">
|
||
<p> LavissaWoW</p>
|
||
</span>
|
||
</a></span>
|
||
<span class="sm:ml-2 text-sm">last modified: 26 Apr 2025</span>
|
||
</h2>
|
||
|
||
<div class="flex-wrap md:flex md:flex-nowrap">
|
||
<div class="w-full md:w-auto md:mr-4">
|
||
<h2 id="introduction">Introduction</h2>
|
||
<p>Installing this plugin enables the automatic generation if Internal Part Numbers (IPN) for parts.</p>
|
||
|
||
<h2 id="installation">Installation</h2>
|
||
<p>To automatically install the plugin when running <code class="language-plaintext highlighter-rouge">invoke install</code>:
|
||
Add <code class="language-plaintext highlighter-rouge">inventree-ipn-generator</code> to your plugins.txt file.</p>
|
||
|
||
<p>Or, install the plugin manually:</p>
|
||
|
||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pip install inventree-ipn-generator
|
||
</code></pre></div></div>
|
||
|
||
<p>For the plugin to be listed as available, you need to enable “Event Integration” in your plugin settings.
|
||
This setting is located with the Plugin Settings on the settings page.</p>
|
||
|
||
<h2 id="settings">Settings</h2>
|
||
|
||
<ul>
|
||
<li>Active - Enables toggling of plugin without having to disable it</li>
|
||
<li>On Create - If on, the plugin will assign IPNs to newly created parts</li>
|
||
<li>On Change - If on, the plugin will assign IPNs to parts after a change has been made.
|
||
Enabling this setting will remove the ability to have parts without IPNs.</li>
|
||
</ul>
|
||
|
||
<h2 id="pattern">Pattern</h2>
|
||
<p>Part Number patterns follow three basic groups. Literals, Numerics, and characters.
|
||
When incrementing a part number, the rightmost group that is mutable will be incremented.
|
||
All groups can be combined in any order.</p>
|
||
|
||
<p>A pattern cannot consist of <em>only</em> Literals.</p>
|
||
|
||
<p>For any pattern, only the rightmost non-literal group will be incremented.
|
||
When this group rolls over its max, the next non-literal group to the left will be incremented.
|
||
Example: Given the groups (named for demo): L1C1N1C2L2
|
||
Incrementing follows this order: C2, N1, C1.</p>
|
||
|
||
<blockquote>
|
||
<p><strong><em>NOTE:</em></strong> When C1 in the above example rolls over, the plugin will loop back to the first IPN.
|
||
This will cause duplicate IPNs if your InvenTree allows duplicate IPNs.
|
||
If your InvenTree does not allow duplicate IPNs, this will cause an error at the moment!
|
||
This will be addressed in an upcoming update.</p>
|
||
</blockquote>
|
||
|
||
<h3 id="literals-immutable">Literals (Immutable)</h3>
|
||
<p>Anything encased in <code class="language-plaintext highlighter-rouge">()</code> will be rendered as-is. no change will be made to anything within.</p>
|
||
|
||
<p>Example: <code class="language-plaintext highlighter-rouge">(A6C)</code> will <em>always</em> render as “A6C”, regardless of other groups</p>
|
||
|
||
<h3 id="numeric">Numeric</h3>
|
||
<p>Numbers that should change over time should be encased in <code class="language-plaintext highlighter-rouge">{}</code></p>
|
||
<ul>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">{5}</code> respresents a number with max 5 digits</li>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">{25+}</code> represents a number 25-99</li>
|
||
</ul>
|
||
|
||
<p>Example: <code class="language-plaintext highlighter-rouge">{5+}{3}</code> will result in this range: 5000-9999</p>
|
||
|
||
<h3 id="characters">Characters</h3>
|
||
<p>Characters that change should be encased in <code class="language-plaintext highlighter-rouge">[]</code></p>
|
||
<ul>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">[abc]</code> represents looping through the letters <code class="language-plaintext highlighter-rouge">a</code>, <code class="language-plaintext highlighter-rouge">b</code>, <code class="language-plaintext highlighter-rouge">c</code> in order.</li>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">[a-f]</code> represents looping through the letters from <code class="language-plaintext highlighter-rouge">a</code> to <code class="language-plaintext highlighter-rouge">f</code> alphabetaically</li>
|
||
</ul>
|
||
|
||
<p>These two directives can be combined.</p>
|
||
<ul>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">[aQc-f]</code> represents:</li>
|
||
<li>
|
||
<ul>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">a</code>, <code class="language-plaintext highlighter-rouge">Q</code>, <code class="language-plaintext highlighter-rouge">c-f</code>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h3 id="examples">Examples</h3>
|
||
<ol>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">(AB){3}[ab]</code> -> AB001a, AB001b, AB002a, AB021b, AB032a, etc</li>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">{2}[Aq](BD)</code> -> 01ABD, 01qBD, 02ABD, 02qBD, etc</li>
|
||
<li>
|
||
<code class="language-plaintext highlighter-rouge">{1}[a-d]{8+}</code> -> 1a8, 1a9, 1b8, 1b9, 1c8, 1c9, 1d8, 1d9, 2a8, etc</li>
|
||
</ol>
|
||
|
||
</div>
|
||
|
||
<div class="w-full md:w-1/4">
|
||
<h2 class="block sm:hidden">Detail section</h2>
|
||
<div>
|
||
<p class="mb-0">License:
|
||
<small>
|
||
<i class="fa-brands fa-osi"></i>
|
||
MIT<br>
|
||
</small>
|
||
</p>
|
||
<div class="">
|
||
Status:<br>
|
||
<div>
|
||
<small>
|
||
|
||
<i class="fa-regular fa-circle-check success"></i>Stable
|
||
|
||
</small>
|
||
</div>
|
||
<div>
|
||
<small>
|
||
|
||
<i class="fa-regular fa-circle-check success"></i>Maintained
|
||
|
||
</small>
|
||
</div>
|
||
</div>
|
||
Package on PyPI:<pre class="my-0">inventree-ipn-generator</pre>
|
||
|
||
|
||
|
||
|
||
|
||
<a href="https://github.com/LavissaWoW/inventree-ipn-generator/issues" class="no-underline" aria-label="open the issue tracker">
|
||
<div>
|
||
<h4 class="plugin_links">Issue Tracker <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i>
|
||
</h4>
|
||
</div>
|
||
</a>
|
||
|
||
|
||
|
||
<a href="https://github.com/LavissaWoW/inventree-ipn-generator" class="no-underline" aria-label="open source on GitHub">
|
||
<div>
|
||
<h4 class="plugin_links">Sourcecode on GitHub <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i>
|
||
</h4>
|
||
<p class="font-normal">LavissaWoW/inventree-ipn-generator</p>
|
||
</div>
|
||
</a>
|
||
|
||
|
||
|
||
|
||
<div>
|
||
<h4 class="plugin_links">Categories</h4>
|
||
<div>
|
||
|
||
<a href="/plugins/categories/#event"><span class="plugin_cat">Event</span></a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div>
|
||
<h4 class="plugin_links">Tags</h4>
|
||
<div>
|
||
|
||
<a href="/plugins/tags/#part"><span class="plugin_tag">Part</span></a>
|
||
|
||
<a href="/plugins/tags/#ipn"><span class="plugin_tag">IPN</span></a>
|
||
|
||
<a href="/plugins/tags/#generator"><span class="plugin_tag">Generator</span></a>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</article>
|
||
|
||
</div>
|
||
|
||
<div class="flex-grow"></div>
|
||
<div class="flex-none">
|
||
<footer class="cm-gray-2 body-font">
|
||
<div class="container px-5 pt-8 mx-auto flex md:flex-row md:flex-nowrap flex-wrap flex-col">
|
||
<div class="w-64 flex-shrink-0 md:mx-0 mx-auto text-center md:text-left">
|
||
<div class="flex title-font font-medium items-center md:justify-start justify-center cm-gray-1">
|
||
<img src="/assets/logo.png" alt="logo" height="32" width="32" class="h-8">
|
||
<span class="ml-3 text-xl">InvenTree</span>
|
||
</div>
|
||
<p class="mt-2 text-sm cm-gray-3">Intuitive Inventory Management</p>
|
||
</div>
|
||
|
||
<div class="flex-grow flex flex-wrap md:pl-10 mb-1 md:mt-0 mt-10 md:text-left text-center md:justify-left justify-center">
|
||
|
||
|
||
<div class="md:w-1/4 px-4">
|
||
<h2 class="footer-categorie title-font">
|
||
Quick
|
||
</h2>
|
||
<nav class="list-none mb-10"><ul>
|
||
|
||
<li><a href="/demo.html" class="footer-link">Demo</a></li>
|
||
|
||
<li><a href="/deploy.html" class="footer-link">Deploy</a></li>
|
||
|
||
<li><a href="https://docs.inventree.org/en/stable/" class="footer-link">Docs</a></li>
|
||
|
||
<li><a href="/news" class="footer-link">News</a></li>
|
||
|
||
<li><a href="/plugins" class="footer-link">Plugin List</a></li>
|
||
|
||
</ul></nav>
|
||
</div>
|
||
|
||
<div class="md:w-1/4 px-4">
|
||
<h2 class="footer-categorie title-font">
|
||
<a href="/extend/">Ecosystem</a>
|
||
</h2>
|
||
<nav class="list-none mb-10"><ul>
|
||
|
||
<li><a href="/extend/api.html" class="footer-link">API</a></li>
|
||
|
||
<li><a href="/extend/app.html" class="footer-link">App</a></li>
|
||
|
||
<li><a href="/extend/plugin/" class="footer-link">Plugins</a></li>
|
||
|
||
<li><a href="/extend/integrate/" class="footer-link">Integrations</a></li>
|
||
|
||
</ul></nav>
|
||
</div>
|
||
|
||
<div class="md:w-1/4 px-4">
|
||
<h2 class="footer-categorie title-font">
|
||
Sitemap
|
||
</h2>
|
||
<nav class="list-none mb-10"><ul>
|
||
|
||
<li><a href="/about/" class="footer-link">About</a></li>
|
||
|
||
<li><a href="/alternatives/" class="footer-link">Alternatives</a></li>
|
||
|
||
<li><a href="/blog" class="footer-link">Blog</a></li>
|
||
|
||
<li><a href="/contribute.html" class="footer-link">Contribute</a></li>
|
||
|
||
<li><a href="/support.html" class="footer-link">Support</a></li>
|
||
|
||
</ul></nav>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bg-gray-100">
|
||
<div class="container mx-auto py-4 px-5 flex flex-wrap flex-col sm:flex-row">
|
||
<p class="cm-gray-2 text-sm text-center sm:text-left">© 2021-now InvenTree by<a href="https://github.com/inventree" rel="noopener" class="cm-gray-2 ml-1" target="_blank">@inventree</a>— website made with ♥ by<a href="https://github.com/matmair" rel="noopener" class="cm-gray-2 ml-1" target="_blank">@matmair</a></p>
|
||
<span class="inline-flex sm:ml-auto sm:mt-0 mt-2 justify-center sm:justify-start">
|
||
<a href="https://github.com/inventree/inventree" alt="github repo" class="ml-3 cm-gray-3">
|
||
<img class="h-5 w-5" alt="GitHub logo" src="/assets/github.svg">
|
||
</a>
|
||
<a href="https://reddit.com/r/inventree" alt="Reddit" class="ml-3 cm-gray-3">
|
||
<img class="h-5 w-5" alt="Reddit logo" src="/assets/reddit.svg">
|
||
</a>
|
||
<a href="https://twitter.com/inventreedb" alt="Twitter" class="ml-3 cm-gray-3">
|
||
<img class="h-5 w-5" alt="Twitter logo" src="/assets/twitter.svg">
|
||
</a>
|
||
<a href="https://chaos.social/@InvenTree" rel="me" alt="Mastodon" class="ml-3 cm-gray-3">
|
||
<img class="h-5 w-5" alt="Mastodon logo" src="/assets/mastodon.svg">
|
||
</a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
</div>
|
||
</body>
|
||
|
||
</html>
|