chore: Sider and Semgrep
This commit is contained in:
parent
1d94914102
commit
71f4b98d0c
@ -5,6 +5,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.doctype.contact.contact import get_contact_name
|
from frappe.contacts.doctype.contact.contact import get_contact_name
|
||||||
from frappe.utils import flt, cint
|
from frappe.utils import flt, cint
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Website Item', {
|
frappe.ui.form.on('Website Item', {
|
||||||
|
onload: function(frm) {
|
||||||
|
// should never check Private
|
||||||
|
frm.fields_dict["website_image"].df.is_private = 0;
|
||||||
|
},
|
||||||
|
|
||||||
image: function() {
|
image: function() {
|
||||||
refresh_field("image_view");
|
refresh_field("image_view");
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _dict
|
from frappe import _dict
|
||||||
from frappe.utils import floor, ceil, flt
|
from frappe.utils import floor
|
||||||
|
|
||||||
class ProductFiltersBuilder:
|
class ProductFiltersBuilder:
|
||||||
def __init__(self, item_group=None):
|
def __init__(self, item_group=None):
|
||||||
|
@ -17,8 +17,6 @@ frappe.ui.form.on("Item", {
|
|||||||
frm.fields_dict["attributes"].grid.set_column_disp("attribute_value", true);
|
frm.fields_dict["attributes"].grid.set_column_disp("attribute_value", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should never check Private
|
|
||||||
frm.fields_dict["website_image"].df.is_private = 0;
|
|
||||||
if (frm.doc.is_fixed_asset) {
|
if (frm.doc.is_fixed_asset) {
|
||||||
frm.trigger("set_asset_naming_series");
|
frm.trigger("set_asset_naming_series");
|
||||||
}
|
}
|
||||||
@ -403,9 +401,11 @@ $.extend(erpnext.item, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
weight_to_validate: function(frm) {
|
weight_to_validate: function(frm) {
|
||||||
if((frm.doc.nett_weight || frm.doc.gross_weight) && !frm.doc.weight_uom) {
|
if (frm.doc.weight_per_unit && !frm.doc.weight_uom) {
|
||||||
frappe.msgprint(__('Weight is mentioned,\nPlease mention "Weight UOM" too'));
|
frappe.msgprint({
|
||||||
frappe.validated = 0;
|
message: __("Please mention 'Weight UOM' along with Weight."),
|
||||||
|
title: __("Note")
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -337,8 +337,7 @@
|
|||||||
class="product-filter field-filter"
|
class="product-filter field-filter"
|
||||||
id="{{value}}"
|
id="{{value}}"
|
||||||
data-filter-name="{{ item_field.fieldname }}"
|
data-filter-name="{{ item_field.fieldname }}"
|
||||||
data-filter-value="{{ value }}"
|
data-filter-value="{{ value }}">
|
||||||
>
|
|
||||||
<span class="label-area">{{ value }}</span>
|
<span class="label-area">{{ value }}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user