Merge pull request #4193 from anandpdoshi/attach-as-small-text
[fix] change attach fields to small text
This commit is contained in:
commit
64fd970a8a
@ -1093,7 +1093,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:39:03.652117",
|
||||
"modified": "2015-10-19 03:04:52.304768",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice Item",
|
||||
|
@ -1282,7 +1282,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-12 07:39:10.093569",
|
||||
"modified": "2015-10-19 03:04:52.093181",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice Item",
|
||||
|
@ -1200,7 +1200,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:39:04.668166",
|
||||
"modified": "2015-10-19 03:04:51.773011",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order Item",
|
||||
|
@ -925,7 +925,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:39:15.526625",
|
||||
"modified": "2015-10-19 03:04:51.597343",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier Quotation Item",
|
||||
|
@ -316,7 +316,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:38:58.762989",
|
||||
"modified": "2015-10-19 03:04:51.988510",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Opportunity Item",
|
||||
|
@ -83,7 +83,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Series",
|
||||
"label": "Series",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "naming_series",
|
||||
"oldfieldtype": "Select",
|
||||
@ -107,7 +107,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Salutation",
|
||||
"label": "Salutation",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "salutation",
|
||||
"oldfieldtype": "Select",
|
||||
@ -312,7 +312,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Gender",
|
||||
"label": "Gender",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "gender",
|
||||
"oldfieldtype": "Select",
|
||||
@ -400,7 +400,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Status",
|
||||
"label": "Status",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "status",
|
||||
"oldfieldtype": "Select",
|
||||
@ -770,7 +770,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Salary Mode",
|
||||
"label": "Salary Mode",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "salary_mode",
|
||||
"oldfieldtype": "Select",
|
||||
@ -1122,7 +1122,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Permanent Address Is",
|
||||
"label": "Permanent Address Is",
|
||||
"no_copy": 0,
|
||||
"options": "\nRented\nOwned",
|
||||
"permlevel": 0,
|
||||
@ -1165,7 +1165,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Current Address Is",
|
||||
"label": "Current Address Is",
|
||||
"no_copy": 0,
|
||||
"options": "\nRented\nOwned",
|
||||
"permlevel": 0,
|
||||
@ -1398,7 +1398,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Marital Status",
|
||||
"label": "Marital Status",
|
||||
"no_copy": 0,
|
||||
"options": "\nSingle\nMarried\nDivorced\nWidowed",
|
||||
"permlevel": 0,
|
||||
@ -1420,7 +1420,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Blood Group",
|
||||
"label": "Blood Group",
|
||||
"no_copy": 0,
|
||||
"options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-",
|
||||
"permlevel": 0,
|
||||
@ -1729,7 +1729,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Leave Encashed?",
|
||||
"label": "Leave Encashed?",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "leave_encashed",
|
||||
"oldfieldtype": "Select",
|
||||
@ -1823,7 +1823,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Reason for Resignation",
|
||||
"label": "Reason for Resignation",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "reason_for_resignation",
|
||||
"oldfieldtype": "Select",
|
||||
@ -1893,7 +1893,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2015-10-02 07:38:48.903414",
|
||||
"modified": "2015-10-19 03:04:49.862553",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Employee",
|
||||
|
@ -65,7 +65,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Rate Of Materials Based On",
|
||||
"label": "Rate Of Materials Based On",
|
||||
"no_copy": 0,
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List",
|
||||
"permlevel": 0,
|
||||
@ -713,7 +713,7 @@
|
||||
"is_submittable": 1,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2015-10-02 07:38:39.897527",
|
||||
"modified": "2015-10-19 03:04:50.130520",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "BOM",
|
||||
|
@ -355,7 +355,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:38:40.165303",
|
||||
"modified": "2015-10-19 03:04:51.159841",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "BOM Explosion Item",
|
||||
|
@ -403,7 +403,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:38:40.326267",
|
||||
"modified": "2015-10-19 03:04:51.064785",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "BOM Item",
|
||||
|
@ -837,7 +837,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:39:07.606420",
|
||||
"modified": "2015-10-19 03:04:51.443832",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Quotation Item",
|
||||
|
@ -1095,7 +1095,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-12 07:39:11.263915",
|
||||
"modified": "2015-10-19 03:04:51.257808",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Sales Order Item",
|
||||
|
@ -43,7 +43,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Partner Type",
|
||||
"label": "Partner Type",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "partner_type",
|
||||
"oldfieldtype": "Select",
|
||||
@ -568,7 +568,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2015-10-02 07:39:11.592673",
|
||||
"modified": "2015-10-19 03:04:48.999751",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Sales Partner",
|
||||
|
@ -1160,7 +1160,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-12 07:38:45.228391",
|
||||
"modified": "2015-10-19 03:04:50.887288",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Delivery Note Item",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -82,6 +82,9 @@ class Item(WebsiteGenerator):
|
||||
|
||||
def make_thumbnail(self):
|
||||
"""Make a thumbnail of `website_image`"""
|
||||
if not self.is_new() and self.website_image != frappe.db.get_value(self.doctype, self.name, "website_image"):
|
||||
self.thumbnail = None
|
||||
|
||||
if self.website_image and not self.thumbnail:
|
||||
file_doc = frappe.get_doc("File", {
|
||||
"file_url": self.website_image,
|
||||
@ -89,6 +92,7 @@ class Item(WebsiteGenerator):
|
||||
"attached_to_name": self.name
|
||||
})
|
||||
|
||||
# for CSV import
|
||||
if not file_doc:
|
||||
file_doc = frappe.get_doc({
|
||||
"doctype": "File",
|
||||
@ -98,7 +102,10 @@ class Item(WebsiteGenerator):
|
||||
}).insert()
|
||||
|
||||
if file_doc:
|
||||
self.thumbnail = file_doc.make_thumbnail()
|
||||
if not file_doc.thumbnail_url:
|
||||
file_doc.make_thumbnail()
|
||||
|
||||
self.thumbnail = file_doc.thumbnail_url
|
||||
|
||||
def get_context(self, context):
|
||||
context.parent_groups = get_parent_item_groups(self.item_group) + \
|
||||
|
@ -577,7 +577,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:38:57.123645",
|
||||
"modified": "2015-10-19 03:04:50.737233",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Material Request Item",
|
||||
|
@ -1411,7 +1411,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:39:05.809946",
|
||||
"modified": "2015-10-19 03:04:50.503105",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt Item",
|
||||
|
@ -909,7 +909,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-10-02 07:39:14.010470",
|
||||
"modified": "2015-10-19 03:04:50.303251",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Entry Detail",
|
||||
|
@ -40,7 +40,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Series",
|
||||
"label": "Series",
|
||||
"no_copy": 1,
|
||||
"options": "ISS-",
|
||||
"permlevel": 0,
|
||||
@ -104,7 +104,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Status",
|
||||
"label": "Status",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "status",
|
||||
"oldfieldtype": "Select",
|
||||
@ -597,7 +597,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2015-10-02 07:38:51.908646",
|
||||
"modified": "2015-10-19 03:04:49.729321",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Support",
|
||||
"name": "Issue",
|
||||
|
@ -83,7 +83,7 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 1,
|
||||
"modified": "2015-03-02 02:35:34.129309",
|
||||
"modified": "2015-10-19 03:04:49.097140",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Utilities",
|
||||
"name": "Rename Tool",
|
||||
|
Loading…
Reference in New Issue
Block a user