DocType Import Supplier Invoice not found at upgrade

When upgrading to 12.3, I get
frappe.exceptions.DoesNotExistError: DocType Import Supplier Invoice not found

The patch set_permission_einvoicing.py is just adding some permissions, so I consider it not so relevant:

import frappe
from erpnext.regional.italy.setup import make_custom_fields
from frappe.permissions import add_permission, update_permission_property

def execute():
        company = frappe.get_all('Company', filters = {'country': 'Italy'})

        if not company:
                return

        make_custom_fields()

        add_permission('Import Supplier Invoice', 'Accounts Manager', 0)
        update_permission_property('Import Supplier Invoice', 'Accounts Manager', 0, 'write', 1)
        update_permission_property('Import Supplier Invoice', 'Accounts Manager', 0, 'create', 1)

Workaround: I commented out the line with above patch in frappe-bench/apps/erpnext/erpnext/patches.txt by prepending # and then continued with
bench update --patch

1 Like