[hotfix] item on web

This commit is contained in:
Anand Doshi 2016-01-04 17:50:40 +05:30
parent 22b956d33c
commit 13bf123b24
4 changed files with 15 additions and 7 deletions

View File

@ -35,7 +35,7 @@ class Item(WebsiteGenerator):
if not self.item_code:
item_code_suffix = ""
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")
item_code_suffix += "-" + str(attribute_abbr or attribute.attribute_value)
self.item_code = str(self.variant_of) + item_code_suffix

View File

@ -125,7 +125,7 @@ class StockReconciliation(StockController):
for msg in self.validation_messages:
msgprint(msg)
raise frappe.ValidationError
raise frappe.ValidationError(self.validation_messages)
def validate_item(self, item_code, row_num):
from erpnext.stock.doctype.item.item import validate_end_of_life, \
@ -250,15 +250,15 @@ class StockReconciliation(StockController):
@frappe.whitelist()
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("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)
res = []
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)
res.append({
"item_code": item[0],
"warehouse": warehouse,

View File

@ -8,6 +8,10 @@
{% include 'templates/includes/product_search_box.html' %}
{% endblock %}
{% block breadcrumbs %}
{% include "templates/includes/breadcrumbs.html" %}
{% endblock %}
{% block page_content %}
{% from "erpnext/templates/includes/macros.html" import product_image %}
<div class="item-content">

View File

@ -4,6 +4,10 @@
{% include 'templates/includes/product_search_box.html' %}
{% endblock %}
{% block breadcrumbs %}
{% include "templates/includes/breadcrumbs.html" %}
{% endblock %}
{% block page_content %}
<div class="item-group-content">
<div>