fix: Patch fixes for v13 upgrade (#25220)
This commit is contained in:
parent
d05686d27d
commit
aa809ceffe
@ -443,6 +443,16 @@
|
||||
"onboard": 0,
|
||||
"type": "Link"
|
||||
},
|
||||
{
|
||||
"dependencies": "GL Entry",
|
||||
"hidden": 0,
|
||||
"is_query_report": 1,
|
||||
"label": "UAE VAT 201",
|
||||
"link_to": "UAE VAT 201",
|
||||
"link_type": "Report",
|
||||
"onboard": 0,
|
||||
"type": "Link"
|
||||
},
|
||||
{
|
||||
"hidden": 0,
|
||||
"is_query_report": 0,
|
||||
|
@ -761,3 +761,4 @@ erpnext.patches.v13_0.setup_fields_for_80g_certificate_and_donation
|
||||
erpnext.patches.v13_0.rename_membership_settings_to_non_profit_settings
|
||||
erpnext.patches.v13_0.setup_gratuity_rule_for_india_and_uae
|
||||
erpnext.patches.v13_0.setup_uae_vat_fields
|
||||
erpnext.patches.v13_0.fix_non_unique_represents_company
|
||||
|
@ -11,4 +11,8 @@ def execute():
|
||||
if not company:
|
||||
return
|
||||
|
||||
|
||||
frappe.reload_doc('accounts', 'doctype', 'pos_invoice')
|
||||
frappe.reload_doc('accounts', 'doctype', 'pos_invoice_item')
|
||||
|
||||
make_custom_fields()
|
@ -0,0 +1,8 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.db.sql("""
|
||||
update tabCustomer
|
||||
set represents_company = NULL
|
||||
where represents_company = ''
|
||||
""")
|
@ -6,6 +6,8 @@ def execute():
|
||||
if "Healthcare" not in frappe.get_active_domains():
|
||||
return
|
||||
|
||||
frappe.reload_doc("healthcare", "doctype", "Inpatient Medication Order")
|
||||
frappe.reload_doc("healthcare", "doctype", "Therapy Session")
|
||||
frappe.reload_doc("healthcare", "doctype", "Patient History Settings")
|
||||
frappe.reload_doc("healthcare", "doctype", "Patient History Standard Document Type")
|
||||
frappe.reload_doc("healthcare", "doctype", "Patient History Custom Document Type")
|
||||
|
@ -9,4 +9,8 @@ def execute():
|
||||
if not company:
|
||||
return
|
||||
|
||||
frappe.reload_doc('regional', 'report', 'uae_vat_201')
|
||||
frappe.reload_doc('regional', 'doctype', 'uae_vat_settings')
|
||||
frappe.reload_doc('regional', 'doctype', 'uae_vat_account')
|
||||
|
||||
setup()
|
||||
|
@ -3,4 +3,17 @@ import frappe
|
||||
|
||||
|
||||
def setup(company=None, patch=True):
|
||||
pass
|
||||
add_custom_roles_for_reports()
|
||||
|
||||
|
||||
def add_custom_roles_for_reports():
|
||||
"""Add Access Control to UAE VAT 201."""
|
||||
if not frappe.db.get_value('Custom Role', dict(report='DATEV')):
|
||||
frappe.get_doc(dict(
|
||||
doctype='Custom Role',
|
||||
report='DATEV',
|
||||
roles= [
|
||||
dict(role='Accounts User'),
|
||||
dict(role='Accounts Manager')
|
||||
]
|
||||
)).insert()
|
@ -12,14 +12,14 @@ from erpnext.accounts.utils import get_fiscal_year, FiscalYearError
|
||||
from frappe.utils import today
|
||||
|
||||
def setup(company=None, patch=True):
|
||||
setup_company_independent_fixtures()
|
||||
setup_company_independent_fixtures(patch=patch)
|
||||
if not patch:
|
||||
make_fixtures(company)
|
||||
|
||||
# TODO: for all countries
|
||||
def setup_company_independent_fixtures():
|
||||
def setup_company_independent_fixtures(patch=False):
|
||||
make_custom_fields()
|
||||
make_property_setters()
|
||||
make_property_setters(patch=patch)
|
||||
add_permissions()
|
||||
add_custom_roles_for_reports()
|
||||
frappe.enqueue('erpnext.regional.india.setup.add_hsn_sac_codes', now=frappe.flags.in_test)
|
||||
@ -112,8 +112,9 @@ def add_print_formats():
|
||||
frappe.db.set_value("Print Format", "GST Tax Invoice", "disabled", 0)
|
||||
frappe.db.set_value("Print Format", "GST E-Invoice", "disabled", 0)
|
||||
|
||||
def make_property_setters():
|
||||
def make_property_setters(patch=False):
|
||||
# GST rules do not allow for an invoice no. bigger than 16 characters
|
||||
if not patch:
|
||||
make_property_setter('Sales Invoice', 'naming_series', 'options', 'SINV-.YY.-\nSRET-.YY.-', '')
|
||||
make_property_setter('Purchase Invoice', 'naming_series', 'options', 'PINV-.YY.-\nPRET-.YY.-', '')
|
||||
|
||||
|
@ -1,29 +1,22 @@
|
||||
{
|
||||
"add_total_row": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"columns": [],
|
||||
"creation": "2019-04-24 08:45:16.650129",
|
||||
"disable_prepared_report": 0,
|
||||
"disabled": 0,
|
||||
"icon": "octicon octicon-repo-pull",
|
||||
"color": "#4CB944",
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"filters": [],
|
||||
"idx": 0,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2021-04-06 12:23:00.379517",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Regional",
|
||||
"name": "DATEV",
|
||||
"owner": "Administrator",
|
||||
"prepared_report": 0,
|
||||
"ref_doctype": "GL Entry",
|
||||
"report_name": "DATEV",
|
||||
"report_type": "Script Report",
|
||||
"roles": [
|
||||
{
|
||||
"role": "Accounts User"
|
||||
},
|
||||
{
|
||||
"role": "Accounts Manager"
|
||||
},
|
||||
{
|
||||
"role": "Auditor"
|
||||
}
|
||||
]
|
||||
"roles": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user