Agri fixes (#11988)

* minor fixes in agri

* updated desktop.py

* [agri] fixed recreation of dotypes in setup.py

* setup_wizard changes

- converted agriculture from alpha to beta
- rearranged the domains alphabetically

* [agri] linked doctype is collapsible
This commit is contained in:
Ameya Shenoy 2017-12-13 18:50:39 +05:30 committed by Nabin Hait
parent 8cad3f12a2
commit cc05c0b348
5 changed files with 76 additions and 74 deletions

BIN
.swp Normal file

Binary file not shown.

View File

@ -102,66 +102,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description",
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_2",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Treatment Task",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@ -222,6 +162,66 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_2",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Treatment Task",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description",
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"has_web_view": 0,
@ -234,7 +234,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-12-04 19:20:19.352479",
"modified": "2017-12-07 16:24:22.923154",
"modified_by": "Administrator",
"module": "Agriculture",
"name": "Disease",

View File

@ -502,7 +502,7 @@
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible": 1,
"columns": 0,
"fieldname": "section_break_17",
"fieldtype": "Section Break",
@ -513,6 +513,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Linked Analysis",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@ -631,7 +632,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-12-05 10:57:33.108504",
"modified": "2017-12-13 16:50:18.581137",
"modified_by": "Administrator",
"module": "Agriculture",
"name": "Land Unit",

View File

@ -4,6 +4,12 @@ from frappe import _
from erpnext.setup.utils import insert_record
def setup_agriculture():
if frappe.db.exists('Land Unit', 'All Land Units'):
# already setup
return
create_agriculture_data()
def create_agriculture_data():
records = [
dict(
doctype="Land Unit",
@ -182,7 +188,7 @@ def setup_agriculture():
linked_doctype='Soil Analysis'),
dict(
doctype='Agriculture Analysis Criteria',
title='pH',
title='Soil pH',
standard=1,
linked_doctype='Soil Analysis'),
dict(
@ -272,7 +278,7 @@ def setup_agriculture():
linked_doctype='Soil Analysis'),
dict(
doctype='Agriculture Analysis Criteria',
title='pH',
title='Water pH',
standard=1,
linked_doctype='Water Analysis'),
dict(
@ -424,11 +430,6 @@ def setup_agriculture():
doctype='Agriculture Analysis Criteria',
title='Degree Days',
standard=1,
linked_doctype='Weather'),
dict(
doctype='Agriculture Analysis Criteria',
title='Degree Days',
standard=1,
linked_doctype='Water Analysis')
linked_doctype='Weather')
]
insert_record(records)

View File

@ -23,13 +23,13 @@ erpnext.setup.slides_settings = [
fieldtype: 'MultiCheck',
options: [
{ "label": __("Distribution"), "value": "Distribution" },
{ "label": __("Education"), "value": "Education" },
{ "label": __("Manufacturing"), "value": "Manufacturing" },
{ "label": __("Retail"), "value": "Retail" },
{ "label": __("Services"), "value": "Services" },
{ "label": __("Agriculture (beta)"), "value": "Agriculture" },
{ "label": __("Healthcare (beta)"), "value": "Healthcare" },
{ "label": __("Education"), "value": "Education" },
{ "label": __("Agriculture (alpha)"), "value": "Agriculture" },
{"label": __("Non Profit (beta)"), "value": "Non Profit"}
{ "label": __("Non Profit (beta)"), "value": "Non Profit" }
], reqd: 1
},
],