Commit Graph

2621 Commits

Author SHA1 Message Date
odoo-syria-team d0b8b35489 [ADD] Replace and add fields in Donation 2025-11-18 13:41:26 +03:00
AliAmmarEXP 775e3e5ab1
Merge pull request #5426 from expsa/Add_domain_on_sponsership
Add domain on sponsership
2025-11-16 12:40:43 +03:00
odoo-syria-team 609dd6da5d Merge branch 'dev_odex25_ensan' of https://github.com/expsa/odex25-standard-modules into Add_domain_on_sponsership 2025-11-16 12:38:21 +03:00
odoo-syria-team 79facb44e4 [FIX] Solve issues 2025-11-16 12:38:02 +03:00
kchyounes19 5a5e44109b
Merge pull request #5424 from expsa/ii_dev_odex25_ensan
[FIX] odex_takaful: FIX bug
2025-11-16 08:33:39 +01:00
younes 072ea0b747 [FIX] odex_takaful: FIX bug 2025-11-16 08:31:55 +01:00
kchyounes19 740a186dd6
Merge pull request #5418 from expsa/yoy_dev_odex25_ensan
Yoy dev odex25 ensan
2025-11-13 20:29:45 +01:00
younes 1984a722c6 [IMP] odex_benefit: IMP benefit 2025-11-13 20:27:54 +01:00
younes e583014cc2 [IMP] odex_benefit: IMP benefit 2025-11-13 19:49:55 +01:00
AliAmmarEXP a624626356
Merge pull request #5411 from expsa/Add_domain_on_sponsership
[FIX]Add Domain on sponsership
2025-11-13 17:07:57 +03:00
odoo-syria-team b5a42f2c64 [FIX]Add Domain on sponsership 2025-11-13 17:01:38 +03:00
AliAmmarEXP 312caaec31
Merge pull request #5408 from expsa/Add_domain_on_sponsership
Add domain on sponsership
2025-11-13 16:18:30 +03:00
odoo-syria-team baa1ceebd0 Add Domain on sponsership 2025-11-13 16:07:39 +03:00
odoo-syria-team 90597f5a75 Merge branch 'dev_odex25_ensan' of https://github.com/expsa/odex25-standard-modules into Add_domain_on_sponsership 2025-11-13 16:05:22 +03:00
odoo-syria-team e2e8b884dc Add Domain on sponsership 2025-11-13 15:39:53 +03:00
NossibaElhadi cc3d6be817
Merge pull request #5395 from expsa/parial_payment_donation
Parial payment donation
2025-11-13 01:52:20 +03:00
Nossibaelhadi 3703d1f29d FIX replacement state for benefit 2025-11-13 01:48:40 +03:00
Nossibaelhadi f15176f7c0 Merge branch 'dev_odex25_ensan' of https://github.com/expsa/odex25-standard-modules into parial_payment_donation 2025-11-12 18:39:28 +03:00
Nossibaelhadi 43d105707c FIX parial payment donation for extend 2025-11-12 18:38:18 +03:00
abdurrahman-saber 02d77b97a5
Merge pull request #5393 from expsa/vendor_bill_notes
[FIX] odex_takaful: create bill for family
2025-11-12 16:27:47 +02:00
Abdurrahman Saber 6ec9eb09a0 [FIX] odex_takaful: create bill for family 2025-11-12 16:26:50 +02:00
kchyounes19 1b313f8439
Merge pull request #5391 from expsa/tyt_dev_odex25_ensan
[IMP] odex_benefit: IMP benefit
2025-11-12 15:00:33 +01:00
younes 7b049b4d13 [IMP] odex_benefit: IMP benefit 2025-11-12 14:58:03 +01:00
kchyounes19 dc47e69e5d
Merge pull request #5388 from expsa/tt_dev_odex25_ensan
[IMP] odex_benefit: IMP benefit
2025-11-12 14:36:15 +01:00
younes 9e601ec60a [IMP] odex_benefit: IMP benefit 2025-11-12 14:33:31 +01:00
Mohamed Eltayar f97078a400
Merge pull request #5385 from expsa/fix/add-missing-field-mechanism-lines-20251112-140000
fix: add missing show_add_benefit_button field to tree view
2025-11-12 13:47:31 +03:00
Mohamed Eltayar 9fe8de985f fix: add missing show_add_benefit_button field to tree view
**المشكلة:**
Field show_add_benefit_button used in attrs.invisible but missing from view
ValidationError during module upgrade

**الحل:**
إضافة <field name="show_add_benefit_button" invisible="1"/> في tree view

**السبب:**
الـ commit السابق (2bc13b62) لم يتم دمجه في PR #5384

Synced with latest dev_odex25_ensan (2e3d0238) on Wed Nov 12 13:45:50 +03 2025
2025-11-12 13:45:50 +03:00
Mohamed Eltayar 2e3d0238a5
Merge pull request #5384 from expsa/fix/restore-wizard-form-mechanism-lines-20251112-073000
fix: restore wizard form for donations_details_lines_mechanism_ids
2025-11-12 13:36:54 +03:00
Mohamed Eltayar f5023b13a9 fix: restore wizard form for donations_details_lines_mechanism_ids
**المشكلة:**
- تم إضافة widget='section_and_note_one2many'
- تم إضافة editable='bottom'
- تم إضافة <control> section
- هذا منع فتح wizard form وجعل التحرير inline

**الحل:**
- إزالة widget='section_and_note_one2many'
- إزالة editable='bottom'
- إزالة <control> section
- الرجوع للكود الأصلي قبل 5 مساءً يوم 11-11

**النتيجة:**
- زر 'إضافة بند' الآن يفتح wizard form كما كان سابقاً 

Synced with dev_odex25_ensan on Wed Nov 12 13:35:10 +03 2025
2025-11-12 13:35:10 +03:00
NossibaElhadi 8e0c93e45f
Merge pull request #5383 from expsa/Test_All
FIX res partner
2025-11-12 13:01:19 +03:00
Nossibaelhadi 305bab9423 FIX res partner 2025-11-12 12:56:27 +03:00
AliAmmarEXP fb9b39d0b1
Merge pull request #5382 from expsa/Add_portal_user
[ADD]Create Portal User From res.partner Kafeel
2025-11-12 11:35:58 +03:00
odoo-syria-team f01884f175 [ADD]Create Portal User From res.partner Kafeel 2025-11-12 11:31:27 +03:00
kchyounes19 4d9ef96e53
Merge pull request #5380 from expsa/kch_dev_odex25_ensan
[IMP] odex_benefit: IMP benefit
2025-11-12 08:04:27 +01:00
younes a840cc251f [IMP] odex_benefit: IMP benefit 2025-11-12 08:03:12 +01:00
Mohamed Eltayar e7ee5d4a8e
Merge pull request #5376 from expsa/fix/xml-syntax-buttons-logic-20251112-070500
fix: XML syntax error in assets.xml - escape && operator
2025-11-12 05:40:51 +03:00
Mohamed Eltayar 22bae36446 fix: escape && operator in JavaScript for XML compatibility
- Changed && to &amp;&amp; in isEditable logic (line 213)
- Fixes XMLSyntaxError: xmlParseEntityRef: no name

Synced with dev_odex25_ensan on Wed Nov 12 05:40:15 +03 2025
2025-11-12 05:40:15 +03:00
Mohamed Eltayar 1ca71f156d
Merge pull request #5375 from expsa/fix/buttons-new-record-code-badge-20251112-065000
fix: UI buttons editable logic for all scenarios & hide code badge
2025-11-12 05:35:07 +03:00
Mohamed Eltayar 53adaf8c96 fix: buttons editable logic for all scenarios & hide code badge
**Buttons logic:**
- New record: editable
- Draft + edit mode: editable
- Draft + readonly: readonly
- Non-draft + any mode: readonly

**Code badge:**
- Hidden (commented out)

Synced with dev_odex25_ensan on Wed Nov 12 05:32:47 +03 2025
2025-11-12 05:32:47 +03:00
Mohamed Eltayar 8b8a4d025f
Merge pull request #5374 from expsa/fix/buttons-new-record-code-badge-20251112-065000
fix: Buttons Editable on New Record & Compact Code Badge
2025-11-12 05:11:30 +03:00
Mohamed Eltayar 7f9dd8e140 fix: buttons editable on new record & compact code badge
- Removed form mode check - buttons now editable in draft state
- Moved code badge to top-right corner (absolute positioning)
- Smaller badge size (14px, compact padding)
- No longer blocks form width

Synced with dev_odex25_ensan on Wed Nov 12 05:10:51 +03 2025
2025-11-12 05:10:51 +03:00
Mohamed Eltayar 88c5c2bdcd
Merge pull request #5373 from expsa/feat/code-badge-display-20251112-060000
feat: Display Code as Prominent Badge Only After Generation
2025-11-12 04:47:36 +03:00
Mohamed Eltayar 3986c53e26 feat: Display code as prominent badge only after generation
**Problem:**
- Code field (<h1>) was always visible, even when empty
- Wasted vertical space at top of form during record creation
- Not professional appearance with empty heading

**Solution:**
- Code field now HIDDEN until generated (when code is empty/False)
- After "تأكيد البيانات" (Confirm Data), code appears as beautiful badge
- Uses attrs="{'invisible': [('code', '=', False)]}"

**Badge Design:**
- Blue badge (badge-primary) with barcode icon
- Large, bold font (18px, font-weight: 600)
- Generous padding (10px 20px)
- Letter spacing for readability
- No label - just icon + code
- Example: [🔖 KF00001]

**Before:**
```xml
<h1>
    <field name="code" nolabel="1"/>
</h1>
```
Result: Empty <h1> space visible during creation 

**After:**
```xml
<div class="oe_title" attrs="{'invisible': [('code', '=', False)]}">
    <h2 style="margin-top: 10px; margin-bottom: 15px;">
        <span class="badge badge-primary" style="...">
            <i class="fa fa-barcode" style="margin-right: 8px;"/>
            <field name="code" nolabel="1" readonly="1"/>
        </span>
    </h2>
</div>
```
Result:
- Clean form during creation 
- Beautiful badge after confirmation 

**User Experience:**

| Stage | Before | After |
|-------|--------|-------|
| **New Record** | Empty <h1> visible  | Code section hidden  |
| **After Confirm** | Code in plain <h1> | Blue badge with icon 🔖  |
| **Visual Impact** | Basic | Professional & Prominent  |

**Technical Details:**
- Replaced <h1> with styled badge in <h2>
- Added FontAwesome barcode icon (fa-barcode)
- Used Odoo standard badge-primary class
- Added custom styling for prominence
- Proper margins for spacing (10px top, 15px bottom)

**Code Generation Timing:**
Code is generated in `action_confirm_data()` method:
```python
if not self.code:
    self.code = self.env['ir.sequence'].sudo().next_by_code('sponsorship.sequence')
```

**Benefits:**
1.  Clean form during creation (no empty space)
2.  Prominent, professional badge after confirmation
3.  Easy to spot and read the code number
4.  No label clutter - icon communicates purpose
5.  Better UX - information appears when relevant

File modified:
- odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml

Synced with latest dev_odex25_ensan on Wed Nov 12 04:46:15 +03 2025
2025-11-12 04:46:15 +03:00
Mohamed Eltayar 9bca8f8300
Merge pull request #5372 from expsa/fix/ui-readonly-logic-complete-20251112-053000
fix: Complete Readonly Logic for UI Buttons & Boolean Toggle
2025-11-12 04:27:29 +03:00
Mohamed Eltayar 37f0dfaca9 feat: Update module icon reference in __manifest__.py
Changed icon reference from icon5.png to icon.png to match
the updated icon file and menu web_icon reference.

This ensures consistency across:
- __manifest__.py (module definition)
- takaful_menus_actions.xml (menu web_icon)
- Actual icon file (icon.png)

File modified:
- odex25_ensan/odex_takaful/__manifest__.py

Part of the complete icon update cleanup.
2025-11-12 04:26:41 +03:00
Mohamed Eltayar 49774bd272 fix: Complete readonly logic for UI buttons and boolean toggle
**Critical Fixes:**

1. **UI Buttons (تبرع/كفالة، مشروط/غير مشروط)**:
   -  FIXED: Buttons now maintain their visual selection (colors)
   -  FIXED: Buttons disabled when form NOT in edit mode
   -  FIXED: Buttons disabled when state != 'draft'
   -  Buttons editable ONLY when: (mode='edit' AND state='draft')

**Previous Problems:**
-  Buttons were clickable even when form not in edit mode
-  Buttons lost their visual selection (all looked the same)
-  opacity=0.6 made selected button unclear

**New Solution:**
```javascript
var isFormEdit = self.mode === 'edit';
var isDraftState = currentData.state === 'draft';
var isEditable = isFormEdit && isDraftState;

// ALWAYS update visual selection (maintain colors)
this.$('.record_option').each(function() {
    if ($(this).data('value') === currentData.record_type) {
        $(this).addClass('selected'); // Keep color
    }
});

// But disable interaction if not editable
if (!isEditable) {
    this.$('.record_option').css({
        'pointer-events': 'none',  // No clicking
        'cursor': 'not-allowed'    // Show disabled cursor
        // NO opacity change - keep visual selection clear
    });
}
```

**Benefits:**
-  Visual selection maintained (you can see which is selected)
-  No hover effect when readonly
-  No clicking when readonly
-  Only editable in draft + edit mode

2. **Boolean Toggle (donate_for_another_person)**:
   -  FIXED: Added readonly attrs
   -  Widget disabled when state != 'draft'

```xml
<field name="donate_for_another_person" widget="boolean_toggle"
       attrs="{'readonly': [('state', '!=', 'draft')]}"/>
```

**Behavior Matrix:**

| State | Form Mode | Buttons? | Boolean Toggle? | Correct? |
|-------|-----------|----------|----------------|----------|
| draft | readonly |  No |  No |  |
| draft | edit |  Yes |  Yes |  |
| confirmed | readonly |  No |  No |  |
| confirmed | edit |  No |  No |  |

Files modified:
- assets.xml: Complete readonly logic with visual selection
- takaful_sponorship_view.xml: Added readonly attrs to boolean toggle

Synced with latest dev_odex25_ensan on Wed Nov 12 04:24:40 +03 2025
2025-11-12 04:24:40 +03:00
Mohamed Eltayar 24d045bd43
Merge pull request #5371 from expsa/fix/ui-buttons-draft-state-only-20251112-050000
fix: Correct UI Buttons Logic - Draft State Only (Fixes PR #5369)
2025-11-12 04:07:04 +03:00
Mohamed Eltayar c9ad302384 feat: Update module icon and cleanup old icon files
**Changes:**
- Updated module icon: icon5.png → icon.png
- Updated menu web_icon reference in takaful_menus_actions.xml
- Removed old unused icon files (icon2.png, icon3.png, icon4.png, icon5.png, logo.png)
- Updated icon.png with new design

**Files:**
- Modified: odex25_ensan/odex_takaful/static/description/icon.png
- Modified: odex25_ensan/odex_takaful/views/takaful_menus_actions.xml
- Deleted: icon2.png, icon3.png, icon4.png, icon5.png, logo.png

This ensures the new module icon appears correctly after upgrade.
2025-11-12 04:04:13 +03:00
Mohamed Eltayar 4acf2a72c0 fix: Correct UI buttons logic - readonly in all states except draft
**Problem with previous PR #5369:**
The merged PR had WRONG logic that allowed buttons to become editable
when user clicks 'Edit' on confirmed/posted records.

**Previous WRONG Logic:**
```javascript
var isReadonly = currentData.state !== 'draft' || self.mode === 'readonly';
//  If mode='edit' AND state!='draft' → buttons become clickable!
```

**New CORRECT Logic:**
```javascript
var isDraftState = currentData.state === 'draft';
//  Buttons ONLY work if state='draft', regardless of form mode
```

**Key Change:**
-  OLD: Check both state AND mode → allows editing in non-draft states
-  NEW: Check ONLY state → readonly in ALL non-draft states

**User Requirement:**
الأزرار تكون للقراءة فقط في جميع الحالات ما عدا draft فقط،
حتى لو عملت تحرير للسجل.

**Behavior Now:**
- draft state → Buttons work 
- confirmed/posted + readonly mode → Buttons disabled 
- confirmed/posted + edit mode → Buttons REMAIN disabled  (FIXED!)

This is the correct implementation that meets the exact requirement.

Synced with latest dev_odex25_ensan on Wed Nov 12 03:58:56 +03 2025
2025-11-12 03:58:56 +03:00
Mohamed Eltayar ea823f2806
Merge pull request #5369 from expsa/fix/ui-buttons-readonly-menu-icon-20251112-040000
fix: Disable UI Buttons in Readonly Mode - 20251112
2025-11-12 03:55:35 +03:00