Anand Doshi | d57e793 | 2015-02-24 12:24:53 +0530 | [diff] [blame] | 1 | from __future__ import unicode_literals |
marination | 3da5198 | 2020-05-25 21:46:04 +0530 | [diff] [blame] | 2 | import frappe |
Anand Doshi | f5794f1 | 2014-03-03 15:05:28 +0530 | [diff] [blame] | 3 | from frappe import _ |
| 4 | |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 5 | def get_data(): |
marination | 3da5198 | 2020-05-25 21:46:04 +0530 | [diff] [blame] | 6 | config = [ |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 7 | { |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 8 | "label": _("Purchasing"), |
| 9 | "icon": "fa fa-star", |
| 10 | "items": [ |
| 11 | { |
| 12 | "type": "doctype", |
marination | 24f4683 | 2020-02-28 12:58:41 +0530 | [diff] [blame] | 13 | "name": "Material Request", |
| 14 | "onboard": 1, |
| 15 | "dependencies": ["Item"], |
| 16 | "description": _("Request for purchase."), |
| 17 | }, |
| 18 | { |
| 19 | "type": "doctype", |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 20 | "name": "Purchase Order", |
| 21 | "onboard": 1, |
| 22 | "dependencies": ["Item", "Supplier"], |
| 23 | "description": _("Purchase Orders given to Suppliers."), |
| 24 | }, |
| 25 | { |
| 26 | "type": "doctype", |
Rohit Waghchaure | 354d0af | 2019-08-28 17:51:31 +0530 | [diff] [blame] | 27 | "name": "Purchase Invoice", |
| 28 | "onboard": 1, |
| 29 | "dependencies": ["Item", "Supplier"] |
| 30 | }, |
| 31 | { |
| 32 | "type": "doctype", |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 33 | "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 Singh | b5eb16f | 2019-01-31 14:50:22 +0530 | [diff] [blame] | 47 | "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 Singh | b5eb16f | 2019-01-31 14:50:22 +0530 | [diff] [blame] | 57 | "name": "Item Price", |
| 58 | "description": _("Multiple Item prices."), |
| 59 | "onboard": 1, |
Himanshu Warekar | 3315a9f | 2019-02-28 11:51:36 +0530 | [diff] [blame] | 60 | "route": "#Report/Item Price" |
Prateeksha Singh | b5eb16f | 2019-01-31 14:50:22 +0530 | [diff] [blame] | 61 | }, |
| 62 | { |
| 63 | "type": "doctype", |
Prateeksha Singh | 063af4e | 2019-02-06 17:02:41 +0530 | [diff] [blame] | 64 | "name": "Price List", |
| 65 | "description": _("Price List master.") |
| 66 | }, |
| 67 | { |
| 68 | "type": "doctype", |
marination | 24f4683 | 2020-02-28 12:58:41 +0530 | [diff] [blame] | 69 | "name": "Pricing Rule", |
| 70 | "description": _("Rules for applying pricing and discount.") |
| 71 | }, |
| 72 | { |
| 73 | "type": "doctype", |
Prateeksha Singh | b5eb16f | 2019-01-31 14:50:22 +0530 | [diff] [blame] | 74 | "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 Waghchaure | 1ecc782 | 2019-06-14 17:29:26 +0530 | [diff] [blame] | 87 | "name": "Promotional Scheme", |
| 88 | "description": _("Rules for applying different promotional schemes.") |
Rohit Waghchaure | 1ecc782 | 2019-06-14 17:29:26 +0530 | [diff] [blame] | 89 | } |
Prateeksha Singh | b5eb16f | 2019-01-31 14:50:22 +0530 | [diff] [blame] | 90 | ] |
| 91 | }, |
| 92 | { |
Prateeksha Singh | 9d4a183 | 2019-02-11 15:14:50 +0530 | [diff] [blame] | 93 | "label": _("Settings"), |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 94 | "icon": "fa fa-cog", |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 95 | "items": [ |
| 96 | { |
| 97 | "type": "doctype", |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 98 | "name": "Buying Settings", |
Prateeksha Singh | 8aa4594 | 2019-03-04 14:00:02 +0530 | [diff] [blame] | 99 | "settings": 1, |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 100 | "description": _("Default settings for buying transactions.") |
Prateeksha Singh | 063af4e | 2019-02-06 17:02:41 +0530 | [diff] [blame] | 101 | }, |
| 102 | { |
| 103 | "type": "doctype", |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 104 | "name": "Purchase Taxes and Charges Template", |
| 105 | "description": _("Tax template for buying transactions.") |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 106 | }, |
| 107 | { |
| 108 | "type": "doctype", |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 109 | "name":"Terms and Conditions", |
| 110 | "label": _("Terms and Conditions Template"), |
| 111 | "description": _("Template of terms or contract.") |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 112 | }, |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 113 | ] |
| 114 | }, |
| 115 | { |
| 116 | "label": _("Supplier"), |
| 117 | "items": [ |
| 118 | { |
| 119 | "type": "doctype", |
| 120 | "name": "Supplier", |
Prateeksha Singh | b5eb16f | 2019-01-31 14:50:22 +0530 | [diff] [blame] | 121 | "onboard": 1, |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 122 | "description": _("Supplier database."), |
| 123 | }, |
| 124 | { |
| 125 | "type": "doctype", |
Zlash65 | 8907078 | 2018-04-19 18:37:29 +0530 | [diff] [blame] | 126 | "name": "Supplier Group", |
| 127 | "description": _("Supplier Group master.") |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 128 | }, |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 129 | { |
| 130 | "type": "doctype", |
| 131 | "name": "Contact", |
| 132 | "description": _("All Contacts."), |
| 133 | }, |
| 134 | { |
| 135 | "type": "doctype", |
| 136 | "name": "Address", |
| 137 | "description": _("All Addresses."), |
| 138 | }, |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 139 | |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 140 | ] |
| 141 | }, |
| 142 | { |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 143 | "label": _("Key Reports"), |
Rushabh Mehta | 2167ff5 | 2016-12-07 11:08:48 +0530 | [diff] [blame] | 144 | "icon": "fa fa-table", |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 145 | "items": [ |
| 146 | { |
Deepesh Garg | a057f4c | 2018-11-12 17:01:02 +0530 | [diff] [blame] | 147 | "type": "report", |
| 148 | "is_query_report": True, |
| 149 | "name": "Purchase Analytics", |
Prateeksha Singh | 063af4e | 2019-02-06 17:02:41 +0530 | [diff] [blame] | 150 | "reference_doctype": "Purchase Order", |
| 151 | "onboard": 1 |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 152 | }, |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 153 | { |
| 154 | "type": "report", |
| 155 | "is_query_report": True, |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 156 | "name": "Purchase Order Trends", |
Prateeksha Singh | 063af4e | 2019-02-06 17:02:41 +0530 | [diff] [blame] | 157 | "reference_doctype": "Purchase Order", |
| 158 | "onboard": 1, |
Rushabh Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 159 | }, |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 160 | { |
| 161 | "type": "report", |
| 162 | "is_query_report": True, |
Mangesh-Khairnar | 16a0458 | 2019-07-22 11:16:40 +0530 | [diff] [blame] | 163 | "name": "Procurement Tracker", |
| 164 | "reference_doctype": "Purchase Order", |
| 165 | "onboard": 1, |
| 166 | }, |
| 167 | { |
| 168 | "type": "report", |
| 169 | "is_query_report": True, |
marination | 4a73bc6 | 2020-05-06 18:34:07 +0530 | [diff] [blame] | 170 | "name": "Requested Items To Order", |
Prateeksha Singh | 3423407 | 2019-02-07 09:18:24 +0530 | [diff] [blame] | 171 | "reference_doctype": "Material Request", |
| 172 | "onboard": 1, |
| 173 | }, |
marination | 24f4683 | 2020-02-28 12:58:41 +0530 | [diff] [blame] | 174 | { |
| 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 Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 184 | ] |
| 185 | }, |
| 186 | { |
bcornwellmott | 96381da | 2017-07-24 10:12:30 -0700 | [diff] [blame] | 187 | "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 Mehta | d1e1c52 | 2016-03-08 18:06:21 +0530 | [diff] [blame] | 213 | "label": _("Other Reports"), |
Rushabh Mehta | 2167ff5 | 2016-12-07 11:08:48 +0530 | [diff] [blame] | 214 | "icon": "fa fa-list", |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 215 | "items": [ |
| 216 | { |
| 217 | "type": "report", |
| 218 | "is_query_report": True, |
| 219 | "name": "Items To Be Requested", |
Prateeksha Singh | 063af4e | 2019-02-06 17:02:41 +0530 | [diff] [blame] | 220 | "reference_doctype": "Item", |
| 221 | "onboard": 1, |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 222 | }, |
| 223 | { |
| 224 | "type": "report", |
| 225 | "is_query_report": True, |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 226 | "name": "Item-wise Purchase History", |
Prateeksha Singh | 063af4e | 2019-02-06 17:02:41 +0530 | [diff] [blame] | 227 | "reference_doctype": "Item", |
| 228 | "onboard": 1, |
| 229 | }, |
| 230 | { |
| 231 | "type": "report", |
| 232 | "is_query_report": True, |
marination | 24f4683 | 2020-02-28 12:58:41 +0530 | [diff] [blame] | 233 | "name": "Supplier-Wise Sales Analytics", |
| 234 | "reference_doctype": "Stock Ledger Entry", |
| 235 | "onboard": 1 |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 236 | }, |
| 237 | { |
| 238 | "type": "report", |
| 239 | "is_query_report": True, |
marination | 24f4683 | 2020-02-28 12:58:41 +0530 | [diff] [blame] | 240 | "name": "Material Requests for which Supplier Quotations are not created", |
| 241 | "reference_doctype": "Material Request" |
Shreya Shah | 5103454 | 2018-06-05 10:44:36 +0530 | [diff] [blame] | 242 | } |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 243 | ] |
| 244 | }, |
Mangesh-Khairnar | 16a0458 | 2019-07-22 11:16:40 +0530 | [diff] [blame] | 245 | |
Anand Doshi | 08ef467 | 2014-05-08 11:43:18 +0530 | [diff] [blame] | 246 | ] |
marination | 3da5198 | 2020-05-25 21:46:04 +0530 | [diff] [blame] | 247 | |
| 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 |