Merge branch 'dev_odex25_takaful' of https://github.com/expsa/odex25-standard-modules into fix_bugs
This commit is contained in:
commit
f441215cc3
|
|
@ -84,6 +84,7 @@
|
|||
'views/product_views.xml',
|
||||
'views/payment_machine_views.xml',
|
||||
'views/account_payment_views.xml',
|
||||
'views/global_extension_wizard_view.xml',
|
||||
'views/takaful_menus_actions.xml',
|
||||
'views/benefit_category_views.xml',
|
||||
'data/message_template_data.xml',
|
||||
|
|
@ -91,6 +92,7 @@
|
|||
'wizards/transfer_deduction_wizard_views.xml',
|
||||
'reports/transfer_deduction_report.xml',
|
||||
'reports/transfer_deduction_report_templates.xml',
|
||||
|
||||
],
|
||||
'qweb': [
|
||||
'static/src/xml/takaful_dashboard.xml',
|
||||
|
|
|
|||
|
|
@ -1435,3 +1435,9 @@ class DonationsDetailsLines(models.Model):
|
|||
'default_donation_detail_id': self.id,
|
||||
},
|
||||
}
|
||||
|
||||
@api.model
|
||||
def search(self, args, offset=0, limit=None, order=None, count=False):
|
||||
if self.env.context.get('wizard_force_show_all'):
|
||||
self = self.sudo()
|
||||
return super(DonationsDetailsLines, self).search(args, offset, limit, order, count)
|
||||
|
|
|
|||
|
|
@ -54,4 +54,5 @@ access_replace_benefit_wizard,replace.benefit.wizard.access,model_replace_benefi
|
|||
access_group_esterdad_wizard,access_group_esterdad_wizard,model_esterdad_wizard,,1,1,1,0
|
||||
access_group_otp_confirmation_wizard,access_group_otp_confirmation_wizard,model_otp_confirmation_wizard,,1,1,1,0
|
||||
access_payment_machine,access_payment_machine,model_payment_machine,group_kufula_user,1,1,1,1
|
||||
access_payment_machine_manager,access_payment_machine_manager,model_payment_machine,sponsorship_system_manager_group,1,1,1,1
|
||||
access_payment_machine_manager,access_payment_machine_manager,model_payment_machine,sponsorship_system_manager_group,1,1,1,1
|
||||
access_global_extension_wizard,access_global_extension_wizard,model_global_extension_wizard,,1,1,1,1
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="view_global_extension_wizard_form" model="ir.ui.view">
|
||||
<field name="name">global.extension.wizard.form</field>
|
||||
<field name="model">global.extension.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Global Extension">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="number_of_months"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Donation Lines">
|
||||
<field name="line_ids" context="{'wizard_force_show_all': True, 'active_test': False}">
|
||||
<tree string="Donation Lines">
|
||||
<field name="sequence_no"/>
|
||||
<field name="sponsor_id"/>
|
||||
<field name="family_id"/>
|
||||
<field name="product_template_id"/>
|
||||
<field name="donation_amount" widget="monetary"/>
|
||||
<field name="create_date"/>
|
||||
<field name="branch_custom_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button name="action_confirm"
|
||||
string="Confirm"
|
||||
type="object"
|
||||
class="btn-primary"/>
|
||||
|
||||
<button string="Cancel"
|
||||
class="btn-secondary"
|
||||
special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_global_extension_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Global Extension</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">global.extension.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_global_extension_wizard_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -39,6 +39,12 @@
|
|||
<menuitem id="donations_details_lines_waiting_app_menu" parent="menu_replacement_root"
|
||||
name="Waiting for Beneficiary" action="donations_details_lines_waiting_action" sequence="2"/>
|
||||
|
||||
<menuitem id="menu_global_extension_wizard"
|
||||
name="Global Extension"
|
||||
parent="menu_replacement_root"
|
||||
action="action_global_extension_wizard"
|
||||
sequence="3"/>
|
||||
|
||||
<!-- ========================================== -->
|
||||
<!-- التبرعات - Donations Menu -->
|
||||
<!-- ========================================== -->
|
||||
|
|
|
|||
|
|
@ -12,3 +12,4 @@ from . import add_benefit_wizard
|
|||
from . import replace_benefit_wizard
|
||||
from . import account_payment_register
|
||||
from . import esterdad
|
||||
from . import global_extension_wizard
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class GlobalExtensionWizard(models.TransientModel):
|
||||
_name = 'global.extension.wizard'
|
||||
_description = 'Global Extension Wizard'
|
||||
|
||||
# Field for number of months
|
||||
number_of_months = fields.Integer(
|
||||
string='Number of Months',
|
||||
required=True,
|
||||
default=1
|
||||
)
|
||||
|
||||
# Field to select multiple donation lines
|
||||
# Assumes the target model is 'donations.details.lines' as specified
|
||||
line_ids = fields.Many2many(
|
||||
comodel_name='donations.details.lines',
|
||||
string='Donation Lines'
|
||||
)
|
||||
|
||||
|
||||
def action_confirm(self):
|
||||
"""
|
||||
Empty method for the Confirm action.
|
||||
You will implement the logic here.
|
||||
"""
|
||||
# Example logic access:
|
||||
# for wizard in self:
|
||||
# selected_lines = wizard.line_ids
|
||||
# months = wizard.number_of_months
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
Loading…
Reference in New Issue