[FIX] hr_recruitment: correct smart button display info
It is more intuitive that application_count smartbutton has the label 'x Other applications'. task - 2695252 closes odoo/odoo#80551 X-original-commit: f1a2f51fec0a31b80a20c78a5b3d11561dce7164 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
committed by
Kevin Baptiste
parent
b88e1ee3a3
commit
3018a91eaa
@@ -1887,6 +1887,11 @@ msgstr ""
|
||||
msgid "Or talk about this applicant privately with your colleagues."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_recruitment
|
||||
#: model_terms:ir.ui.view,arch_db:hr_recruitment.hr_applicant_view_form
|
||||
msgid "Other applications"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_recruitment
|
||||
#: model:ir.model.fields,field_description:hr_recruitment.field_hr_job__alias_user_id
|
||||
msgid "Owner"
|
||||
|
||||
@@ -229,7 +229,7 @@ class Applicant(models.Model):
|
||||
else:
|
||||
application_data_mapped = dict()
|
||||
for applicant in applicants:
|
||||
applicant.application_count = application_data_mapped.get(applicant.email_from.lower(), 1)
|
||||
applicant.application_count = application_data_mapped.get(applicant.email_from.lower(), 1) - 1
|
||||
(self - applicants).application_count = False
|
||||
|
||||
@api.depends_context('lang')
|
||||
|
||||
@@ -23,6 +23,6 @@ class TestRecruitment(TransactionCase):
|
||||
'email_from': 'laure.poiret@aol.ru',
|
||||
},
|
||||
])
|
||||
self.assertEqual(dup1.application_count, 2)
|
||||
self.assertEqual(dup2.application_count, 2)
|
||||
self.assertEqual(no_dup.application_count, 1)
|
||||
self.assertEqual(dup1.application_count, 1)
|
||||
self.assertEqual(dup2.application_count, 1)
|
||||
self.assertEqual(no_dup.application_count, 0)
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
icon="fa-pencil"
|
||||
type="object"
|
||||
context="{'active_test': False}"
|
||||
attrs="{'invisible': [('application_count', '<' , 2)]}">
|
||||
<field name="application_count" widget="statinfo" string="Applications"/>
|
||||
attrs="{'invisible': [('application_count', '=' , 0)]}">
|
||||
<field name="application_count" widget="statinfo" string="Other applications"/>
|
||||
</button>
|
||||
<button name="action_makeMeeting" class="oe_stat_button" icon="fa-calendar" type="object"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user