IMP benefit
This commit is contained in:
parent
9dddf20ea7
commit
098bbbdfb5
|
|
@ -2980,11 +2980,15 @@ msgid "Classroom"
|
|||
msgstr "الصف الدراسي"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__visit_location__state__close
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.visits_form
|
||||
msgid "Close"
|
||||
msgstr "إغلاق الزيارة"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__visit_location__state__close
|
||||
msgid "Close"
|
||||
msgstr "تم الاستبيان"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__cloth_ids
|
||||
msgid "Cloth"
|
||||
|
|
@ -3211,10 +3215,16 @@ msgstr "مؤكد"
|
|||
#: model:ir.model.fields,field_description:odex_benefit.field_benefits_representative__child_ids
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_external_benefits__child_ids
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__child_ids
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__visit_location__state__contact
|
||||
msgid "Contact"
|
||||
msgstr "تم التواصل"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__visit_location__state__contact
|
||||
msgid "Contact"
|
||||
msgstr "جاري التواصل"
|
||||
|
||||
|
||||
|
||||
#. module: odex_benefit
|
||||
#: code:addons/odex_benefit/controllers/benefit.py:0
|
||||
#: code:addons/odex_benefit/controllers/benefit_services.py:0
|
||||
|
|
@ -3232,6 +3242,11 @@ msgstr "بيانات التواصل"
|
|||
msgid "Contact Phone"
|
||||
msgstr "رقم الجوال للتواصل"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_visit_location__sms_phone
|
||||
msgid "Contact Phone"
|
||||
msgstr "رقم الجوال للأسرة"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__contact_type
|
||||
msgid "Contact Type"
|
||||
|
|
@ -4872,6 +4887,11 @@ msgstr "الإيجار المتوقع لفروع المحافظات"
|
|||
msgid "Evaluation"
|
||||
msgstr "نتائج التقييم العقاري"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_visit_location__evaluation
|
||||
msgid "Evaluation"
|
||||
msgstr "التقييم"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__benefit_housing__housing_cat__excellent
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__grant_benefit__housing_cat__excellent
|
||||
|
|
@ -10350,11 +10370,15 @@ msgid "Sanitized Number"
|
|||
msgstr "رقم هاتف سليم "
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__visit_location__state__schedule_a_visit
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.visits_form
|
||||
msgid "Schedule a visit"
|
||||
msgstr "تم تحديد الموعد"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__visit_location__state__schedule_a_visit
|
||||
msgid "Schedule a visit"
|
||||
msgstr "جاري الزيارة"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_program_plane_line__score
|
||||
msgid "Score"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class Visit(models.Model):
|
|||
'grant.benefit',string='Family file',domain="[('state', '=', 'second_approve')]")
|
||||
benefit_name = fields.Char(related="benefit_id.name")
|
||||
benefit_code= fields.Char(related="benefit_id.code")
|
||||
sms_phone = fields.Char(string="Contact Phone",related="benefit_id.sms_phone")
|
||||
researcher_team = fields.Many2one("committees.line", string="Researcher Team",related="benefit_id.researcher_id")
|
||||
researcher_ids = fields.Many2many("hr.employee", string="Researcher",compute="get_researcher_ids",readonly=False)
|
||||
visit_date = fields.Datetime(string='Visit Date', tracking=True)
|
||||
|
|
@ -33,16 +34,16 @@ class Visit(models.Model):
|
|||
visit_types = fields.Many2one(
|
||||
'visits.types',
|
||||
string='Visits Types')
|
||||
priority = fields.Selection(
|
||||
[('0', 'Normal'), ('1', 'Low'), ('2', 'High'), ('3', 'Very High'), ('4', 'Very Very High')],
|
||||
string='Priority')
|
||||
evaluation = fields.Selection(
|
||||
[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')],
|
||||
string='Evaluation')
|
||||
state = fields.Selection([
|
||||
('draft', 'Draft'),
|
||||
('contact', 'Contact'),
|
||||
('schedule_a_visit', 'Schedule a visit'),
|
||||
('done', 'Done'),
|
||||
('cancel', 'Cancel'),
|
||||
('close', 'Close'),
|
||||
('cancel', 'Cancel'),
|
||||
], string='State',default="draft", tracking=True, group_expand='_expand_states')
|
||||
color = fields.Integer('Color Index', default=0)
|
||||
family_id = fields.Many2one('benefit.family')
|
||||
|
|
@ -124,8 +125,8 @@ class Visit(models.Model):
|
|||
_("The email template 'Visit Location OTP Email' is missing. Please contact your administrator."))
|
||||
template.write({'email_to': self.benefit_id.email,
|
||||
'email_cc': self.env.user.company_id.hr_email or self.env.user.company_id.email,})
|
||||
email_values = {"email_from": self.env.user.company_id.hr_email or self.env.user.company_id.email}
|
||||
template.with_context(lang=self.env.user.lang,mail_notrack=True,mail_create_nolog=True,mail_notify_force_send= False,).send_mail(self.id, force_send=True,
|
||||
email_values = {"email_from": self.env.user.company_id.hr_email or self.env.user.company_id.email,'auto_delete': True}
|
||||
template.with_context(lang=self.env.user.lang,mail_notify_force_send= False).send_mail(self.id, force_send=True,
|
||||
raise_exception=False,email_values=email_values)
|
||||
elif self.benefit_id.contact_type == 'sms':
|
||||
if not self.benefit_id.sms_phone:
|
||||
|
|
@ -134,7 +135,7 @@ class Visit(models.Model):
|
|||
sms_template_id = self.env.ref('odex_benefit.visit_location_otp_sms_template')
|
||||
if not sms_template_id:
|
||||
raise UserError(_("The SMS template 'Visit Location OTP' is missing. Please contact your administrator."))
|
||||
self.with_context(mail_create_nolog=True,mail_notrack=True)._message_sms_with_template(
|
||||
self._message_sms_with_template(
|
||||
template=sms_template_id,
|
||||
put_in_queue=False,
|
||||
partner_ids=self.benefit_id.partner_id.ids,
|
||||
|
|
|
|||
|
|
@ -8,10 +8,14 @@
|
|||
<field name="name"/>
|
||||
<field name="color"/>
|
||||
<field name="visit_date"/>
|
||||
<field name="visit_types"/>
|
||||
<field name="benefit_id"/>
|
||||
<field name="researcher_team"/>
|
||||
<field name="state"/>
|
||||
<field name="activity_state"/>
|
||||
<field name="activity_ids"/>
|
||||
<progressbar field="activity_state"
|
||||
colors='{"planned": "success", "overdue": "danger", "today": "warning"}'/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="{{!selection_mode ? 'oe_kanban_color_' + kanban_getcolor(record.color.raw_value) : ''}} oe_kanban_global_click">
|
||||
|
|
@ -33,39 +37,34 @@
|
|||
</div>
|
||||
<div class="oe_kanban_details">
|
||||
<strong class="o_kanban_record_title">
|
||||
<strong>رقم الزيارة:
|
||||
<strong>
|
||||
<field name="name"/>
|
||||
</strong>
|
||||
</strong>
|
||||
<div>
|
||||
<strong>تاريخ الزيارة:
|
||||
<field name="visit_date"/>
|
||||
</strong>
|
||||
<field name="visit_date"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong>الاسرة:
|
||||
<field name="benefit_id"/>
|
||||
</strong>
|
||||
<field name="visit_types"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong>الاخصائي:
|
||||
<field name="researcher_team"/>
|
||||
</strong>
|
||||
<field name="benefit_id"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong>الحالة:
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state in ['done', 'close']"
|
||||
decoration-muted="state in ['draft']"
|
||||
decoration-danger="state in ['cancel']"
|
||||
decoration-warning="state in ['schedule_a_visit']"
|
||||
decoration-info="state in ['contact']"/>
|
||||
</strong>
|
||||
<field name="researcher_team"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state in ['done', 'close']"
|
||||
decoration-muted="state in ['draft']"
|
||||
decoration-danger="state in ['cancel']"
|
||||
decoration-warning="state in ['schedule_a_visit']"
|
||||
decoration-info="state in ['contact']"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<div class="oe_kanban_bottom_left">
|
||||
<field name="priority" widget="priority" groups="base.group_user"/>
|
||||
<field name="evaluation" widget="priority" groups="base.group_user"/>
|
||||
<field name="activity_ids" widget="kanban_activity"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -88,7 +87,7 @@
|
|||
<button name="action_done" string="Done" type="object" class="oe_highlight"
|
||||
states="schedule_a_visit"/>
|
||||
<button name="action_skip_otp"
|
||||
string="Skip OTP Verification" states="schedule_a_visit"
|
||||
string="Skip OTP Verification" states="schedule_a_visit"
|
||||
type="object" class="btn btn-danger"
|
||||
groups="odex_benefit.group_otp_manager"/>
|
||||
<button name="action_cancel" string="Visit Cancel" type="object"
|
||||
|
|
@ -100,26 +99,28 @@
|
|||
statusbar_visible="draft,contact,schedule_a_visit,cancel,done,close"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field placeholder="Name" name="name" class="oe_inline"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="description" invisible="1"
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
<field name="visit_types" domain="[('creation_method','=','manual')]"
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
<field name="benefit_id" attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
<field name="researcher_team"
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}" required="1"/>
|
||||
<field name="benefit_id" attrs="{'readonly':[('state', 'in', ['close','cancel'])]}" required="1"/>
|
||||
<field name="sms_phone"/>
|
||||
<field name="researcher_team" required="1"/>
|
||||
<field name="researcher_ids" invisible="1" widget="many2many_tags"
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}" force_save="1"/>
|
||||
<field name="message"
|
||||
attrs="{'invisible':[('state', 'not in', ['draft', 'contact'])],'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
<field name="reason"
|
||||
attrs="{'invisible':[('state', 'not in', ['cancel'])],'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="priority" widget="priority"/>
|
||||
<field name="visit_date" attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
<field name="visit_date" attrs="{'readonly':[('state', 'in', ['close','cancel'])]}" required="1"/>
|
||||
<field name="evaluation" widget="priority"/>
|
||||
<field name="visit_objective" invisible="1"
|
||||
attrs="{'readonly':[('state', 'in', ['close','cancel'])]}"/>
|
||||
<field name="otp_code" invisible="1"/>
|
||||
|
|
@ -143,8 +144,7 @@
|
|||
<field name="benefit_id"/>
|
||||
<field name="researcher_team"/>
|
||||
<field name="visit_date"/>
|
||||
<field name="priority" widget="priority"/>
|
||||
<field name="description" invisible="1"/>
|
||||
<field name="evaluation" widget="priority"/>
|
||||
<field name="visit_objective" invisible="1"/>
|
||||
<field name="activity_ids" widget="list_activity"/>
|
||||
<field name="visit_types"/>
|
||||
|
|
@ -178,6 +178,8 @@
|
|||
<calendar string="visits" date_start="visit_date" mode="month" quick_add="True" color="researcher_team">
|
||||
<field name="name"/>
|
||||
<field name="visit_date"/>
|
||||
<field name="benefit_id"/>
|
||||
<field name="researcher_team"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue