Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import unicode_literals
- import frappe
- from frappe.core.doctype.custom_field.custom_field import create_custom_field
- def execute():
- opencart_extra_fields = {
- "Item": [{
- "label": "X Settings",
- "fieldname": "x_settings",
- "fieldtype": "Section Break",
- "insert_after": "add_image",
- "permlevel": 1
- }]
- }
- for dt, docfields in opencart_extra_fields.items():
- for df in docfields:
- df = frappe._dict(df)
- create_custom_field(dt, df)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement