blob: b06bb76ca825f108098fadb3762872bb861c772d [file] [log] [blame]
Anand Doshid57e7932015-02-24 12:24:53 +05301from __future__ import unicode_literals
marination3da51982020-05-25 21:46:04 +05302import frappe
Anand Doshif5794f12014-03-03 15:05:28 +05303from frappe import _
4
Anand Doshi08ef4672014-05-08 11:43:18 +05305def get_data():
marination3da51982020-05-25 21:46:04 +05306 config = [
Anand Doshi08ef4672014-05-08 11:43:18 +05307 {
Prateeksha Singh34234072019-02-07 09:18:24 +05308 "label": _("Purchasing"),
9 "icon": "fa fa-star",
10 "items": [
11 {
12 "type": "doctype",
marination24f46832020-02-28 12:58:41 +053013 "name": "Material Request",
14 "onboard": 1,
15 "dependencies": ["Item"],
16 "description": _("Request for purchase."),
17 },
18 {
19 "type": "doctype",
Prateeksha Singh34234072019-02-07 09:18:24 +053020 "name": "Purchase Order",
21 "onboard": 1,
22 "dependencies": ["Item", "Supplier"],
23 "description": _("Purchase Orders given to Suppliers."),
24 },
25 {
26 "type": "doctype",
Rohit Waghchaure354d0af2019-08-28 17:51:31 +053027 "name": "Purchase Invoice",
28 "onboard": 1,
29 "dependencies": ["Item", "Supplier"]
30 },
31 {
32 "type": "doctype",
Prateeksha Singh34234072019-02-07 09:18:24 +053033 "name": "Request for Quotation",
34 "onboard": 1,
35 "dependencies": ["Item", "Supplier"],
36 "description": _("Request for quotation."),
37 },
38 {
39 "type": "doctype",
40 "name": "Supplier Quotation",
41 "dependencies": ["Item", "Supplier"],
42 "description": _("Quotations received from Suppliers."),
43 },
44 ]
45 },
46 {
Prateeksha Singhb5eb16f2019-01-31 14:50:22 +053047 "label": _("Items and Pricing"),
48 "items": [
49 {
50 "type": "doctype",
51 "name": "Item",
52 "onboard": 1,
53 "description": _("All Products or Services."),
54 },
55 {
56 "type": "doctype",
Prateeksha Singhb5eb16f2019-01-31 14:50:22 +053057 "name": "Item Price",
58 "description": _("Multiple Item prices."),
59 "onboard": 1,
Himanshu Warekar3315a9f2019-02-28 11:51:36 +053060 "route": "#Report/Item Price"
Prateeksha Singhb5eb16f2019-01-31 14:50:22 +053061 },
62 {
63 "type": "doctype",
Prateeksha Singh063af4e2019-02-06 17:02:41 +053064 "name": "Price List",
65 "description": _("Price List master.")
66 },
67 {
68 "type": "doctype",
marination24f46832020-02-28 12:58:41 +053069 "name": "Pricing Rule",
70 "description": _("Rules for applying pricing and discount.")
71 },
72 {
73 "type": "doctype",
Prateeksha Singhb5eb16f2019-01-31 14:50:22 +053074 "name": "Product Bundle",
75 "description": _("Bundle items at time of sale."),
76 },
77 {
78 "type": "doctype",
79 "name": "Item Group",
80 "icon": "fa fa-sitemap",
81 "label": _("Item Group"),
82 "link": "Tree/Item Group",
83 "description": _("Tree of Item Groups."),
84 },
85 {
86 "type": "doctype",
Rohit Waghchaure1ecc7822019-06-14 17:29:26 +053087 "name": "Promotional Scheme",
88 "description": _("Rules for applying different promotional schemes.")
Rohit Waghchaure1ecc7822019-06-14 17:29:26 +053089 }
Prateeksha Singhb5eb16f2019-01-31 14:50:22 +053090 ]
91 },
92 {
Prateeksha Singh9d4a1832019-02-11 15:14:50 +053093 "label": _("Settings"),
Prateeksha Singh34234072019-02-07 09:18:24 +053094 "icon": "fa fa-cog",
Anand Doshi08ef4672014-05-08 11:43:18 +053095 "items": [
96 {
97 "type": "doctype",
Prateeksha Singh34234072019-02-07 09:18:24 +053098 "name": "Buying Settings",
Prateeksha Singh8aa45942019-03-04 14:00:02 +053099 "settings": 1,
Prateeksha Singh34234072019-02-07 09:18:24 +0530100 "description": _("Default settings for buying transactions.")
Prateeksha Singh063af4e2019-02-06 17:02:41 +0530101 },
102 {
103 "type": "doctype",
Prateeksha Singh34234072019-02-07 09:18:24 +0530104 "name": "Purchase Taxes and Charges Template",
105 "description": _("Tax template for buying transactions.")
Anand Doshi08ef4672014-05-08 11:43:18 +0530106 },
107 {
108 "type": "doctype",
Prateeksha Singh34234072019-02-07 09:18:24 +0530109 "name":"Terms and Conditions",
110 "label": _("Terms and Conditions Template"),
111 "description": _("Template of terms or contract.")
Anand Doshi08ef4672014-05-08 11:43:18 +0530112 },
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530113 ]
114 },
115 {
116 "label": _("Supplier"),
117 "items": [
118 {
119 "type": "doctype",
120 "name": "Supplier",
Prateeksha Singhb5eb16f2019-01-31 14:50:22 +0530121 "onboard": 1,
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530122 "description": _("Supplier database."),
123 },
124 {
125 "type": "doctype",
Zlash6589070782018-04-19 18:37:29 +0530126 "name": "Supplier Group",
127 "description": _("Supplier Group master.")
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530128 },
Anand Doshi08ef4672014-05-08 11:43:18 +0530129 {
130 "type": "doctype",
131 "name": "Contact",
132 "description": _("All Contacts."),
133 },
134 {
135 "type": "doctype",
136 "name": "Address",
137 "description": _("All Addresses."),
138 },
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530139
Anand Doshi08ef4672014-05-08 11:43:18 +0530140 ]
141 },
142 {
Prateeksha Singh34234072019-02-07 09:18:24 +0530143 "label": _("Key Reports"),
Rushabh Mehta2167ff52016-12-07 11:08:48 +0530144 "icon": "fa fa-table",
Anand Doshi08ef4672014-05-08 11:43:18 +0530145 "items": [
146 {
Deepesh Garga057f4c2018-11-12 17:01:02 +0530147 "type": "report",
148 "is_query_report": True,
149 "name": "Purchase Analytics",
Prateeksha Singh063af4e2019-02-06 17:02:41 +0530150 "reference_doctype": "Purchase Order",
151 "onboard": 1
Anand Doshi08ef4672014-05-08 11:43:18 +0530152 },
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530153 {
154 "type": "report",
155 "is_query_report": True,
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530156 "name": "Purchase Order Trends",
Prateeksha Singh063af4e2019-02-06 17:02:41 +0530157 "reference_doctype": "Purchase Order",
158 "onboard": 1,
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530159 },
Prateeksha Singh34234072019-02-07 09:18:24 +0530160 {
161 "type": "report",
162 "is_query_report": True,
Mangesh-Khairnar16a04582019-07-22 11:16:40 +0530163 "name": "Procurement Tracker",
164 "reference_doctype": "Purchase Order",
165 "onboard": 1,
166 },
167 {
168 "type": "report",
169 "is_query_report": True,
marination4a73bc62020-05-06 18:34:07 +0530170 "name": "Requested Items To Order",
Prateeksha Singh34234072019-02-07 09:18:24 +0530171 "reference_doctype": "Material Request",
172 "onboard": 1,
173 },
marination24f46832020-02-28 12:58:41 +0530174 {
175 "type": "report",
176 "is_query_report": True,
177 "name": "Address And Contacts",
178 "label": _("Supplier Addresses And Contacts"),
179 "reference_doctype": "Address",
180 "route_options": {
181 "party_type": "Supplier"
182 }
183 }
Anand Doshi08ef4672014-05-08 11:43:18 +0530184 ]
185 },
186 {
bcornwellmott96381da2017-07-24 10:12:30 -0700187 "label": _("Supplier Scorecard"),
188 "items": [
189 {
190 "type": "doctype",
191 "name": "Supplier Scorecard",
192 "description": _("All Supplier scorecards."),
193 },
194 {
195 "type": "doctype",
196 "name": "Supplier Scorecard Variable",
197 "description": _("Templates of supplier scorecard variables.")
198 },
199 {
200 "type": "doctype",
201 "name": "Supplier Scorecard Criteria",
202 "description": _("Templates of supplier scorecard criteria."),
203 },
204 {
205 "type": "doctype",
206 "name": "Supplier Scorecard Standing",
207 "description": _("Templates of supplier standings."),
208 },
209
210 ]
211 },
212 {
Rushabh Mehtad1e1c522016-03-08 18:06:21 +0530213 "label": _("Other Reports"),
Rushabh Mehta2167ff52016-12-07 11:08:48 +0530214 "icon": "fa fa-list",
Anand Doshi08ef4672014-05-08 11:43:18 +0530215 "items": [
216 {
217 "type": "report",
218 "is_query_report": True,
219 "name": "Items To Be Requested",
Prateeksha Singh063af4e2019-02-06 17:02:41 +0530220 "reference_doctype": "Item",
221 "onboard": 1,
Anand Doshi08ef4672014-05-08 11:43:18 +0530222 },
223 {
224 "type": "report",
225 "is_query_report": True,
Anand Doshi08ef4672014-05-08 11:43:18 +0530226 "name": "Item-wise Purchase History",
Prateeksha Singh063af4e2019-02-06 17:02:41 +0530227 "reference_doctype": "Item",
228 "onboard": 1,
229 },
230 {
231 "type": "report",
232 "is_query_report": True,
marination24f46832020-02-28 12:58:41 +0530233 "name": "Supplier-Wise Sales Analytics",
234 "reference_doctype": "Stock Ledger Entry",
235 "onboard": 1
Anand Doshi08ef4672014-05-08 11:43:18 +0530236 },
237 {
238 "type": "report",
239 "is_query_report": True,
marination24f46832020-02-28 12:58:41 +0530240 "name": "Material Requests for which Supplier Quotations are not created",
241 "reference_doctype": "Material Request"
Shreya Shah51034542018-06-05 10:44:36 +0530242 }
Anand Doshi08ef4672014-05-08 11:43:18 +0530243 ]
244 },
Mangesh-Khairnar16a04582019-07-22 11:16:40 +0530245
Anand Doshi08ef4672014-05-08 11:43:18 +0530246 ]
marination3da51982020-05-25 21:46:04 +0530247
248 regional = {
249 "label": _("Regional"),
250 "items": [
251 {
252 "type": "doctype",
253 "name": "Import Supplier Invoice",
254 "description": _("Import Italian Supplier Invoice."),
255 "onboard": 1,
256 }
257 ]
258 }
259
260 countries = frappe.get_all("Company", fields="country")
261 countries = [country["country"] for country in countries]
262 if "Italy" in countries:
263 config.append(regional)
264 return config