[hotfix] item on web
This commit is contained in:
parent
22b956d33c
commit
13bf123b24
@ -35,7 +35,7 @@ class Item(WebsiteGenerator):
|
|||||||
if not self.item_code:
|
if not self.item_code:
|
||||||
item_code_suffix = ""
|
item_code_suffix = ""
|
||||||
for attribute in self.attributes:
|
for attribute in self.attributes:
|
||||||
attribute_abbr = frappe.db.get_value("Item Attribute Value",
|
attribute_abbr = frappe.db.get_value("Item Attribute Value",
|
||||||
{"parent": attribute.attribute, "attribute_value": attribute.attribute_value}, "abbr")
|
{"parent": attribute.attribute, "attribute_value": attribute.attribute_value}, "abbr")
|
||||||
item_code_suffix += "-" + str(attribute_abbr or attribute.attribute_value)
|
item_code_suffix += "-" + str(attribute_abbr or attribute.attribute_value)
|
||||||
self.item_code = str(self.variant_of) + item_code_suffix
|
self.item_code = str(self.variant_of) + item_code_suffix
|
||||||
|
@ -125,7 +125,7 @@ class StockReconciliation(StockController):
|
|||||||
for msg in self.validation_messages:
|
for msg in self.validation_messages:
|
||||||
msgprint(msg)
|
msgprint(msg)
|
||||||
|
|
||||||
raise frappe.ValidationError
|
raise frappe.ValidationError(self.validation_messages)
|
||||||
|
|
||||||
def validate_item(self, item_code, row_num):
|
def validate_item(self, item_code, row_num):
|
||||||
from erpnext.stock.doctype.item.item import validate_end_of_life, \
|
from erpnext.stock.doctype.item.item import validate_end_of_life, \
|
||||||
@ -250,15 +250,15 @@ class StockReconciliation(StockController):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_items(warehouse, posting_date, posting_time):
|
def get_items(warehouse, posting_date, posting_time):
|
||||||
items = frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse}, as_list=1)
|
items = frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse}, as_list=1)
|
||||||
|
|
||||||
items += frappe.get_list("Item", fields=["name"], filters= {"is_stock_item": 1, "has_serial_no": 0,
|
items += frappe.get_list("Item", fields=["name"], filters= {"is_stock_item": 1, "has_serial_no": 0,
|
||||||
"has_batch_no": 0, "has_variants": 0, "default_warehouse": warehouse}, as_list=1)
|
"has_batch_no": 0, "has_variants": 0, "default_warehouse": warehouse}, as_list=1)
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
for item in set(items):
|
for item in set(items):
|
||||||
stock_bal = get_stock_balance(item[0], warehouse, posting_date, posting_time,
|
stock_bal = get_stock_balance(item[0], warehouse, posting_date, posting_time,
|
||||||
with_valuation_rate=True)
|
with_valuation_rate=True)
|
||||||
|
|
||||||
res.append({
|
res.append({
|
||||||
"item_code": item[0],
|
"item_code": item[0],
|
||||||
"warehouse": warehouse,
|
"warehouse": warehouse,
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
{% include 'templates/includes/product_search_box.html' %}
|
{% include 'templates/includes/product_search_box.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
{% include "templates/includes/breadcrumbs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
{% from "erpnext/templates/includes/macros.html" import product_image %}
|
{% from "erpnext/templates/includes/macros.html" import product_image %}
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
{% include 'templates/includes/product_search_box.html' %}
|
{% include 'templates/includes/product_search_box.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
{% include "templates/includes/breadcrumbs.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="item-group-content">
|
<div class="item-group-content">
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user