Initial commit: Odoo timesheet automation scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
25
run_daily.sh.example
Normal file
25
run_daily.sh.example
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/zsh
|
||||
# Salin file ini ke run_daily.sh lalu isi SESSION_ID
|
||||
# cp run_daily.sh.example run_daily.sh
|
||||
|
||||
SESSION_ID="your_session_id_here"
|
||||
AUTHOR="fajri"
|
||||
USER_ID=41
|
||||
EMPLOYEE_ID=37
|
||||
|
||||
SCRIPT_DIR="/Users/fajrihardhitamurti/ODOO _TIMESHEET"
|
||||
LOG="$SCRIPT_DIR/logs/daily_$(date +%Y-%m-%d).log"
|
||||
|
||||
mkdir -p "$SCRIPT_DIR/logs"
|
||||
|
||||
echo "=== $(date '+%Y-%m-%d %H:%M:%S') ===" >> "$LOG"
|
||||
|
||||
/opt/homebrew/bin/python3 "$SCRIPT_DIR/daily_timesheet.py" \
|
||||
--session-id "$SESSION_ID" \
|
||||
--author "$AUTHOR" \
|
||||
--user-id $USER_ID \
|
||||
--employee-id $EMPLOYEE_ID \
|
||||
--save-pending \
|
||||
>> "$LOG" 2>&1
|
||||
|
||||
echo "Log: $LOG"
|
||||
Reference in New Issue
Block a user