- Add currency_id field to payment.details.lines model (PaymentDetailsLines class)
- Add currency_id field to refund.details.lines model (RefundDetailsLines class)
- Fix ValidationError: Field 'currency_id' does not exist in model 'payment.details.lines'
- Ensure all amount fields have corresponding currency_id in their models
This resolves the Odoo validation error that occurs when upgrading the module:
'الحقل "currency_id" غير موجود في النموذج "payment.details.lines"'
Critical fix for production deployment.
- Add currency_id field to 6 additional models (takaful_conf, takaful_sponsorship_payment, sponsorship_scheduling_line, takaful_month_payment, takaful_grant_benefit, takaful_contribution)
- Update all remaining amount fields to use widget='monetary' with system currency display
- Remove hardcoded 'Riyal' text from sponsorship_payment_view.xml
- Fix field styling and remove excessive inline CSS
- Update all date fields to use proper widget='date' or 'datetime'
- Ensure consistent monetary display across all forms, trees, and search views
- Maintain all existing business logic and workflows
Additional files modified:
- Models: sponsorship_scheduling_line.py, takaful_conf.py, takaful_contribution_model.py, takaful_grant_benefit_model.py, takaful_month_payment.py, takaful_sponsorship_payment_model.py
- Views: payment_details_lines_views.xml, sponsorship_payment_view.xml, takaful_conf.xml, takaful_contribution_view.xml, takaful_grant_benefit_view.xml, takaful_month_payment_view.xml
Total: 20 files updated with comprehensive currency display and field widget improvements
- Add currency_id field to all amount-related models (donation_details_lines, takaful_sponorship, takaful_sponsor_operation, donation_extension_wizard)
- Update all amount fields to use widget='monetary' with system currency display
- Update all date fields to use widget='date' or 'datetime' for better UX
- Update all phone fields to use widget='phone' for proper validation
- Ensure currency symbol displays automatically from system (SAR) without manual input
- Maintain all existing business logic and workflows
- Compatible with Odoo 14 standards and best practices
Files modified:
- Models: donation_details_lines.py, takaful_sponorship_model.py, takaful_sponsor_operation.py, donation_extension_wizard.py
- Views: donations_details_lines.xml, takaful_sponorship_view.xml, takaful_sponsor_operation_views.xml, donation_extension_wizard.xml