Merge branch 'develop'
This commit is contained in:
commit
c516e1871d
@ -1,2 +1,2 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
__version__ = '5.1.2'
|
__version__ = '5.1.3'
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Name",
|
"label": "Supplier Name",
|
||||||
"oldfieldname": "supplier_name",
|
"oldfieldname": "supplier_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -940,7 +940,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-22 07:30:06.743438",
|
"modified": "2015-07-03 03:26:32.934540",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Name",
|
"label": "Customer Name",
|
||||||
"oldfieldname": "customer_name",
|
"oldfieldname": "customer_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -1253,7 +1253,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-22 06:39:22.072544",
|
"modified": "2015-07-03 03:25:40.519956",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Name",
|
"label": "Supplier Name",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
@ -882,7 +882,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-22 07:30:36.259753",
|
"modified": "2015-07-03 03:26:43.080551",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Purchase Order",
|
"name": "Purchase Order",
|
||||||
|
|||||||
3
erpnext/change_log/v5/v5_1_3.md
Normal file
3
erpnext/change_log/v5/v5_1_3.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- Hide zero balance rows in batch-wise balance history report
|
||||||
|
- Autocomplete issue fixed in Manage Variants
|
||||||
|
- Remove user permission (Employee role) if user id is unset from Employee record
|
||||||
@ -73,6 +73,11 @@ def get_data():
|
|||||||
"label": _("Setup"),
|
"label": _("Setup"),
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
"items": [
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Company",
|
||||||
|
"description": _("Company (not Customer or Supplier) master.")
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Fiscal Year",
|
"name": "Fiscal Year",
|
||||||
|
|||||||
@ -110,43 +110,7 @@ def get_data():
|
|||||||
"description": _("Setup SMS gateway settings")
|
"description": _("Setup SMS gateway settings")
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"label": _("Masters"),
|
|
||||||
"icon": "icon-star",
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Company",
|
|
||||||
"description": _("Company (not Customer or Supplier) master.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Item",
|
|
||||||
"description": _("Item master.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Customer",
|
|
||||||
"description": _("Customer master.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Supplier",
|
|
||||||
"description": _("Supplier master.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Contact",
|
|
||||||
"description": _("Contact master.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Address",
|
|
||||||
"description": _("Address master.")
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for module, label, icon in (
|
for module, label, icon in (
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Contact Name",
|
"label": "Person Name",
|
||||||
"oldfieldname": "lead_name",
|
"oldfieldname": "lead_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -344,7 +344,7 @@
|
|||||||
],
|
],
|
||||||
"icon": "icon-user",
|
"icon": "icon-user",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-04-02 15:13:02.621854",
|
"modified": "2015-07-03 03:26:18.579905",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Lead",
|
"name": "Lead",
|
||||||
|
|||||||
@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors"
|
|||||||
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
|
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
|
||||||
app_icon = "icon-th"
|
app_icon = "icon-th"
|
||||||
app_color = "#e74c3c"
|
app_color = "#e74c3c"
|
||||||
app_version = "5.1.2"
|
app_version = "5.1.3"
|
||||||
|
|
||||||
error_report_email = "support@erpnext.com"
|
error_report_email = "support@erpnext.com"
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,10 @@ class Employee(Document):
|
|||||||
if self.user_id:
|
if self.user_id:
|
||||||
self.validate_for_enabled_user_id()
|
self.validate_for_enabled_user_id()
|
||||||
self.validate_duplicate_user_id()
|
self.validate_duplicate_user_id()
|
||||||
|
else:
|
||||||
|
existing_user_id = frappe.db.get_value("Employee", self.name, "user_id")
|
||||||
|
if existing_user_id:
|
||||||
|
frappe.permissions.remove_user_permission("Employee", self.name, existing_user_id)
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
if self.user_id:
|
if self.user_id:
|
||||||
|
|||||||
@ -75,8 +75,20 @@ def get_conditions(filters):
|
|||||||
filters["month"] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
filters["month"] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
||||||
"Dec"].index(filters["month"]) + 1
|
"Dec"].index(filters["month"]) + 1
|
||||||
|
|
||||||
|
from frappe.model.document import Document
|
||||||
|
fiscal_years = frappe.get_doc("Fiscal Year",filters["fiscal_year"])
|
||||||
|
import datetime
|
||||||
|
year_start = fiscal_years.year_start_date.strftime("%Y")
|
||||||
|
year_end = fiscal_years.year_end_date.strftime("%Y")
|
||||||
|
dt_test = datetime.datetime.strptime(year_end + "-" + str(100+int(filters["month"]))[2:3] + "-01", "%Y-%m-%d")
|
||||||
|
date_test = datetime.date(dt_test.year, dt_test.month, dt_test.day)
|
||||||
|
if date_test > fiscal_years.year_end_date:
|
||||||
|
year_target = year_start
|
||||||
|
else:
|
||||||
|
year_target = year_end
|
||||||
|
|
||||||
from calendar import monthrange
|
from calendar import monthrange
|
||||||
filters["total_days_in_month"] = monthrange(cint(filters["fiscal_year"].split("-")[-1]),
|
filters["total_days_in_month"] = monthrange(cint(year_target),
|
||||||
filters["month"])[1]
|
filters["month"])[1]
|
||||||
|
|
||||||
conditions = " and month(att_date) = %(month)s and fiscal_year = %(fiscal_year)s"
|
conditions = " and month(att_date) = %(month)s and fiscal_year = %(fiscal_year)s"
|
||||||
|
|||||||
@ -11,6 +11,9 @@ def execute():
|
|||||||
manage_variant.attributes = frappe.db.sql("select item_attribute as attribute, item_attribute_value as attribute_value \
|
manage_variant.attributes = frappe.db.sql("select item_attribute as attribute, item_attribute_value as attribute_value \
|
||||||
from `tabItem Variant` where parent = %s", d.name, as_dict=1)
|
from `tabItem Variant` where parent = %s", d.name, as_dict=1)
|
||||||
if manage_variant.attributes:
|
if manage_variant.attributes:
|
||||||
|
if not frappe.get_list("Item", filters={"variant_of": d.name}, limit_page_length=1):
|
||||||
|
frappe.db.sql("delete from `tabItem Variant` where parent=%s", d.name)
|
||||||
|
else:
|
||||||
manage_variant.generate_combinations()
|
manage_variant.generate_combinations()
|
||||||
manage_variant.create_variants()
|
manage_variant.create_variants()
|
||||||
frappe.delete_doc("DocType", "Item Variant")
|
frappe.delete_doc("DocType", "Item Variant")
|
||||||
@ -2,7 +2,9 @@ frappe.listview_settings['Quotation'] = {
|
|||||||
add_fields: ["customer_name", "base_grand_total", "status",
|
add_fields: ["customer_name", "base_grand_total", "status",
|
||||||
"company", "currency"],
|
"company", "currency"],
|
||||||
get_indicator: function(doc) {
|
get_indicator: function(doc) {
|
||||||
if(doc.status==="Ordered") {
|
if(doc.status==="Submitted") {
|
||||||
|
return [__("Submitted"), "blue", "status,=,Submitted"];
|
||||||
|
} else if(doc.status==="Ordered") {
|
||||||
return [__("Ordered"), "green", "status,=,Ordered"];
|
return [__("Ordered"), "green", "status,=,Ordered"];
|
||||||
} else if(doc.status==="Lost") {
|
} else if(doc.status==="Lost") {
|
||||||
return [__("Lost"), "darkgrey", "status,=,Lost"];
|
return [__("Lost"), "darkgrey", "status,=,Lost"];
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
"fieldname": "customer_name",
|
"fieldname": "customer_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Name",
|
"label": "Customer Name",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
@ -1089,7 +1089,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"modified": "2015-06-22 07:29:24.379272",
|
"modified": "2015-07-03 03:25:20.180721",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
|
|||||||
@ -8,8 +8,14 @@ from frappe import _
|
|||||||
|
|
||||||
class ItemAttribute(Document):
|
class ItemAttribute(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
self.validate_duplication()
|
||||||
|
self.validate_attribute_values()
|
||||||
|
|
||||||
|
|
||||||
|
def validate_duplication(self):
|
||||||
values, abbrs = [], []
|
values, abbrs = [], []
|
||||||
for d in self.item_attribute_values:
|
for d in self.item_attribute_values:
|
||||||
|
d.abbr = d.abbr.upper()
|
||||||
if d.attribute_value in values:
|
if d.attribute_value in values:
|
||||||
frappe.throw(_("{0} must appear only once").format(d.attribute_value))
|
frappe.throw(_("{0} must appear only once").format(d.attribute_value))
|
||||||
values.append(d.attribute_value)
|
values.append(d.attribute_value)
|
||||||
@ -17,3 +23,14 @@ class ItemAttribute(Document):
|
|||||||
if d.abbr in abbrs:
|
if d.abbr in abbrs:
|
||||||
frappe.throw(_("{0} must appear only once").format(d.abbr))
|
frappe.throw(_("{0} must appear only once").format(d.abbr))
|
||||||
abbrs.append(d.abbr)
|
abbrs.append(d.abbr)
|
||||||
|
|
||||||
|
def validate_attribute_values(self):
|
||||||
|
attribute_values = []
|
||||||
|
for d in self.item_attribute_values:
|
||||||
|
attribute_values.append(d.attribute_value)
|
||||||
|
|
||||||
|
variant_attributes = frappe.db.sql("select DISTINCT attribute_value from `tabVariant Attribute` where attribute=%s", self.name)
|
||||||
|
if variant_attributes:
|
||||||
|
for d in variant_attributes:
|
||||||
|
if d[0] not in attribute_values:
|
||||||
|
frappe.throw(_("Attribute Value {0} cannot be removed from {1} as Item Variants exist with this Attribute.").format(d[0], self.name))
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
frappe.ui.form.on("Manage Variants", {
|
frappe.ui.form.on("Manage Variants", {
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
var df = frappe.meta.get_docfield("Variant Attribute", "attribute_value");
|
var df = frappe.meta.get_docfield("Variant Attribute", "attribute_value", "Manage Variants");
|
||||||
df.on_make = function(field) {
|
df.on_make = function(field) {
|
||||||
$(field.input_area).addClass("ui-front");
|
$(field.input_area).addClass("ui-front");
|
||||||
field.$input.autocomplete({
|
field.$input.autocomplete({
|
||||||
|
|||||||
@ -20,6 +20,7 @@ def execute(filters=None):
|
|||||||
for wh in sorted(iwb_map[item]):
|
for wh in sorted(iwb_map[item]):
|
||||||
for batch in sorted(iwb_map[item][wh]):
|
for batch in sorted(iwb_map[item][wh]):
|
||||||
qty_dict = iwb_map[item][wh][batch]
|
qty_dict = iwb_map[item][wh][batch]
|
||||||
|
if qty_dict.opening_qty or qty_dict.in_qty or qty_dict.out_qty or qty_dict.bal_qty:
|
||||||
data.append([item, item_map[item]["item_name"], item_map[item]["description"], wh, batch,
|
data.append([item, item_map[item]["item_name"], item_map[item]["description"], wh, batch,
|
||||||
flt(qty_dict.opening_qty, float_precision), flt(qty_dict.in_qty, float_precision),
|
flt(qty_dict.opening_qty, float_precision), flt(qty_dict.in_qty, float_precision),
|
||||||
flt(qty_dict.out_qty, float_precision), flt(qty_dict.bal_qty, float_precision)
|
flt(qty_dict.out_qty, float_precision), flt(qty_dict.bal_qty, float_precision)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
|
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
|
||||||
<div class="pull-left" style="max-width: 38.2%; margin-right: 10px;">
|
<div class="pull-left" style="max-width: 38.2%; margin-right: 10px;">
|
||||||
<img src="{{ doc.image }}" style="max-width: 100%">
|
<!-- width: 100% is a mozilla bug -->
|
||||||
|
<img src="{{ doc.image }}" class="img-responsive" style="width: 100%;">
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
version = "5.1.2"
|
version = "5.1.3"
|
||||||
|
|
||||||
with open("requirements.txt", "r") as f:
|
with open("requirements.txt", "r") as f:
|
||||||
install_requires = f.readlines()
|
install_requires = f.readlines()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user