gigafibre-fsm/frappe-setup/add_start_time_field.py
louispaulb 1b0fc89304 Initial commit — OSS/BSS Field Dispatch app
Current state: custom CSS + vanilla Vue components
Architecture: modular with composables, provide/inject pattern
Ready for progressive migration to Quasar native components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 14:11:40 -04:00

24 lines
600 B
Python

"""
Add start_time field to Dispatch Job doctype
"""
import frappe
def run():
meta = frappe.get_meta('Dispatch Job')
if meta.has_field('start_time'):
print("✓ Field 'start_time' already exists on Dispatch Job")
return
doc = frappe.get_doc('DocType', 'Dispatch Job')
doc.append('fields', {
'fieldname': 'start_time',
'fieldtype': 'Time',
'label': 'Heure de début',
'insert_after': 'scheduled_date',
})
doc.save(ignore_permissions=True)
frappe.db.commit()
print("✓ Field 'start_time' added to Dispatch Job")
run()