refactor: change uae vat settingplural
This commit is contained in:
parent
3294f86b92
commit
10a3a338b6
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||||||
# import frappe
|
# import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestUAEVATSetting(unittest.TestCase):
|
class TestUAEVATSettings(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('UAE VAT Setting', {
|
frappe.ui.form.on('UAE VAT Settings', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -7,7 +7,7 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"company",
|
"company",
|
||||||
"uae_vat_account"
|
"uae_vat_accounts"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -20,19 +20,19 @@
|
|||||||
"unique": 1
|
"unique": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "uae_vat_account",
|
"fieldname": "uae_vat_accounts",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"label": "UAE VAT Account",
|
"label": "UAE VAT Accounts",
|
||||||
"options": "UAE VAT Account",
|
"options": "UAE VAT Account",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-09-28 12:19:11.493138",
|
"modified": "2020-09-30 20:08:18.764798",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Regional",
|
"module": "Regional",
|
||||||
"name": "UAE VAT Setting",
|
"name": "UAE VAT Settings",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class UAEVATSetting(Document):
|
class UAEVATSettings(Document):
|
||||||
pass
|
pass
|
||||||
@ -145,7 +145,7 @@ def add_custom_roles_for_reports():
|
|||||||
|
|
||||||
def add_permissions():
|
def add_permissions():
|
||||||
"""Add Permissions for UAE VAT Settings and UAE VAT Account."""
|
"""Add Permissions for UAE VAT Settings and UAE VAT Account."""
|
||||||
for doctype in ('UAE VAT Setting', 'UAE VAT Account'):
|
for doctype in ('UAE VAT Settings', 'UAE VAT Account'):
|
||||||
add_permission(doctype, 'All', 0)
|
add_permission(doctype, 'All', 0)
|
||||||
for role in ('Accounts Manager', 'Accounts User', 'System Manager'):
|
for role in ('Accounts Manager', 'Accounts User', 'System Manager'):
|
||||||
add_permission(doctype, role, 0)
|
add_permission(doctype, role, 0)
|
||||||
|
|||||||
@ -52,7 +52,7 @@ def get_tax_accounts(company):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not tax_accounts_list and not frappe.flags.in_test:
|
if not tax_accounts_list and not frappe.flags.in_test:
|
||||||
frappe.throw(_(f'Please set Vat Accounts for Company: "{company}" in UAE VAT Setting'))
|
frappe.throw(_(f'Please set Vat Accounts for Company: "{company}" in UAE VAT Settings'))
|
||||||
for d in tax_accounts_list:
|
for d in tax_accounts_list:
|
||||||
for key, name in d.items():
|
for key, name in d.items():
|
||||||
tax_accounts_dict[name] = name
|
tax_accounts_dict[name] = name
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user