chore: Add Import Supplier Invoice to Menu

This commit is contained in:
marination 2020-05-25 21:46:04 +05:30
parent 7ac731dd4f
commit 3da51984f2
2 changed files with 64 additions and 5 deletions

View File

@ -1,8 +1,9 @@
from __future__ import unicode_literals
import frappe
from frappe import _
def get_data():
return [
config = [
{
"label": _("Purchasing"),
"icon": "fa fa-star",
@ -243,3 +244,21 @@ def get_data():
},
]
regional = {
"label": _("Regional"),
"items": [
{
"type": "doctype",
"name": "Import Supplier Invoice",
"description": _("Import Italian Supplier Invoice."),
"onboard": 1,
}
]
}
countries = frappe.get_all("Company", fields="country")
countries = [country["country"] for country in countries]
if "Italy" in countries:
config.append(regional)
return config

View File

@ -1,5 +1,4 @@
{
"actions": [],
"creation": "2019-10-15 12:33:21.845329",
"doctype": "DocType",
"editable_grid": 1,
@ -92,13 +91,54 @@
"label": "Upload XML Invoices"
}
],
"links": [],
"modified": "2019-12-10 16:37:26.793398",
"modified": "2020-05-25 21:32:49.064579",
"modified_by": "Administrator",
"module": "Regional",
"name": "Import Supplier Invoice",
"owner": "Administrator",
"permissions": [],
"permissions": [
{
"create": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1,
"write": 1
},
{
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User"
},
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
},
{
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Auditor"
},
{
"permlevel": 1,
"read": 1,
"role": "Accounts Manager",
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1