brotherton-erpnext/erpnext/docs/current/api/controllers/erpnext.controllers.item_variant.html
2015-11-09 14:40:34 +05:30

170 lines
4.8 KiB
HTML

<!-- title: erpnext.controllers.item_variant --><div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.7.3</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/controllers/item_variant.py"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<h3 style="font-weight: normal;">Class <b>InvalidItemAttributeValueError</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<h3 style="font-weight: normal;">Class <b>ItemTemplateCannotHaveStock</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<h3 style="font-weight: normal;">Class <b>ItemVariantExistsError</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<p class="docs-attr-name">
<a name="erpnext.controllers.item_variant.copy_attributes_to_variant" href="#erpnext.controllers.item_variant.copy_attributes_to_variant" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.item_variant.<b>copy_attributes_to_variant</b>
<i class="text-muted">(item, variant)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.controllers.item_variant.create_variant</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.controllers.item_variant.create_variant" href="#erpnext.controllers.item_variant.create_variant" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.item_variant.<b>create_variant</b>
<i class="text-muted">(item, args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.controllers.item_variant.find_variant" href="#erpnext.controllers.item_variant.find_variant" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.item_variant.<b>find_variant</b>
<i class="text-muted">(item, args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.controllers.item_variant.get_variant</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.controllers.item_variant.get_variant" href="#erpnext.controllers.item_variant.get_variant" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.item_variant.<b>get_variant</b>
<i class="text-muted">(item, args)</i>
</p>
<div class="docs-attr-desc"><p>Validates Attributes and their Values, then looks for an exactly matching Item Variant</p>
<p><strong>Parameters:</strong></p>
<ul>
<li><strong><code>item</code></strong> - Template Item</li>
<li><strong><code>args</code></strong> - A dictionary with "Attribute" as key and "Attribute Value" as value</li>
</ul>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.controllers.item_variant.make_variant_item_code" href="#erpnext.controllers.item_variant.make_variant_item_code" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.item_variant.<b>make_variant_item_code</b>
<i class="text-muted">(template, variant)</i>
</p>
<div class="docs-attr-desc"><p>Uses template's item code and abbreviations to make variant's item code</p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.controllers.item_variant.validate_item_variant_attributes" href="#erpnext.controllers.item_variant.validate_item_variant_attributes" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.item_variant.<b>validate_item_variant_attributes</b>
<i class="text-muted">(item, args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<!-- autodoc -->