odex25_standard/odex25_ensan
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
..
ensan_sale_management_takaful notes 2025-10-15 03:54:59 +03:00
odex25_empowermentmanagement security 2025-11-02 18:13:56 +02:00
odex25_program_activity security 2025-11-02 18:04:52 +02:00
odex_benefit [IMP] odex_benefit: IMP benefit 2025-11-11 19:24:48 +01:00
odex_benefit_project IMP benefit 2025-10-19 15:29:12 +01:00
odex_takaful fix: module icon + sponsor phone visibility logic 2025-11-12 03:35:11 +03:00
odex_takaful_base notes 2025-10-27 03:02:29 +03:00
odex_takaful_custom add odex25_ensan modules 2024-09-09 15:33:57 +03:00
otp_sms_auth_custom [IMP] otp_sms_auth_custom: Add skip otp for user 2025-10-16 09:19:59 +01:00
takaful_core [IMP] odex_takaful: imp takaful 2025-10-29 14:27:58 +01:00
takaful_portal_benefit add odex25_ensan modules 2024-09-09 15:33:57 +03:00
takaful_portal_sponsor add odex25_ensan modules 2024-09-09 15:33:57 +03:00
takaful_rest_api [REF] odex_takaful, *: remove takaful.sponsor model 2025-10-28 09:02:40 +03:00
takaful_website [UPD] takaful_website 2025-09-17 11:33:48 +01:00
takaful_website_custom notes 2025-10-27 03:02:29 +03:00
takaful_website_template add odex25_ensan modules 2024-09-09 15:33:57 +03:00
takaful_website_template_b3 add odex25_ensan modules 2024-09-09 15:33:57 +03:00