Mirrored from GitHub via DevOps Hub
Go to file
Mohamed Eltayar 5114d9aa7e fix: module icon + sponsor phone visibility logic
**Changes:**

1. Module Icon Fix
   - Changed 'images' key to 'icon' in __manifest__.py
   - Removed list brackets (icon value is string, not list)
   - Now icon will display correctly in Apps menu
   - Path: static/description/icon5.png

2. Sponsor Phone Field Visibility
   - Added 'invisible' attrs to sponsor_phone field
   - Field now ONLY visible for 'unknown' (فاعل خير) type
   - Hidden for 'registered' and 'new_sponsor' types
   - Reason: sponsor_id Many2one already displays phone number
   - Prevents duplicate phone display in form

**Field Behavior After Fix:**

| Sponsor Type | sponsor_id Field | sponsor_phone Field |
|--------------|------------------|---------------------|
| مشترك بالنظام |  Visible (shows name + phone) |  Hidden |
| مشترك جديد |  Visible (shows name + phone) |  Hidden |
| فاعل خير |  Hidden |  Visible & Editable |

**Technical Details:**

XML attrs for sponsor_phone:
```xml
'invisible': ['|',
    '&', ('record_type','=','donation'), ('sponsor_or_donor_type','!=','unknown'),
    '&', ('record_type','=','sponsorship'), ('sponsor_donor_type','!=','unknown')
],
'readonly': [('state','!=','draft')]
```

Logic:
- Invisible if: (donation AND NOT unknown) OR (sponsorship AND NOT unknown)
- Visible only when: unknown (فاعل خير) type selected
- Editable only in draft state

**User Experience:**
- No more duplicate phone number display
- Cleaner form layout
- Phone field only appears when actually needed (unknown sponsor)
- Module icon now displays correctly

Odoo 14 Compatible. XML validated.
Synced with latest dev_odex25_ensan on Wed Nov 12 03:35:11 +03 2025
2025-11-12 03:35:11 +03:00
.github/workflows Update github action file 2025-10-23 22:00:05 +03:00
odex25_ensan fix: module icon + sponsor phone visibility logic 2025-11-12 03:35:11 +03:00
.gitignore [UPD] odex_benefit: add rules & add price unit to electricals & change business logic for transportations insurance 2025-01-02 09:22:15 +01:00
README.md education notice task 1 => odex_benefit 2025-10-07 17:01:56 +03:00

README.md

odex25-standard-modules

This Repo contains general standard modules for all projects.