Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Error when accessing hr.applicant form.

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
hrodoo17
1 Odpowiedz
2036 Widoki
Awatar
Marcos Pérez

I am creating some modules that inherit from hr.job and hr.applicant, basically what they do is that when a user applies to a record in hr.job, the record is created in hr.applicant and redirected to the form of the record that was just created.


When applying, the record is created in hr.applicant with all the data, but when rendering the view for the form, I get an error for the Grant Applicant role that says the following:


UncaughtPromiseError > OwlError
Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    Error: An error occured in the owl lifecycle (see this Error's "cause" property)
        at handleError (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:916:101)
        at App.handleError (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:1551:29)
        at Fiber._render (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:941:19)
        at Fiber.render (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:939:6)
        at ComponentNode.initiateRender (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:1008:47)

Caused by: EvalError: Can not evaluate python expression: (bool(not salary_expected_extra))
    Error: Name 'salary_expected_extra' is not defined
    EvalError: Can not evaluate python expression: (bool(not salary_expected_extra))
    Error: Name 'salary_expected_extra' is not defined
        at evaluateExpr (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:3058:54)
        at FormRenderer.evaluateBooleanExpr (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:3061:8)
        at FormRenderer.slot25 (eval at compile (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:1503:374), <anonymous>:170:26)
        at callSlot (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:1109:25)
        at InnerGroup.template (eval at compile (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:1503:374), <anonymous>:56:42)
        at Fiber._render (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:940:96)
        at Fiber.render (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:939:6)
        at ComponentNode.initiateRender (http://localhost:8888/web/assets/d35eeae/web.assets_web.min.js:1008:47)

However, if I also assign the same user the role of administrator or interviewer for the recruitment modules, the error disappears. What can I do?


Here is the code that generates the record in hr.applicant after the user clicks on the corresponding button in the kanban view of hr.job:


def action_create_application(self):
current_user = self.env.user
applicant_obj = self.env['hr.applicant']
for job in self:
existing_applicant = applicant_obj.search([
('job_id', '=', job.id),
('partner_id', '=', current_user.partner_id.id)
])
if existing_applicant:
raise UserError('Already applied for this Grant')
else:
applicant = applicant_obj.create({
'name': 'Application of %s to %s' % (current_user.partner_id.name, job.name),
'partner_name': current_user.partner_id.name,
'email_from': current_user.partner_id.email,
'partner_id': current_user.partner_id.id,
'job_id': job.id,
})
return {
'type': 'ir.actions.act_window',
'res_model': 'hr.applicant',
'view_mode': 'form',
'res_id': applicant.id,
'target': 'current',
}

Also this is my inherited view form:

<record id="view_hr_applicant_grant_applicant_form" model="ir.ui.view">
<field name="name">hr.applicant.grant.applicant.form</field>
<field name="model">hr.applicant</field>
<field name="inherit_id" ref="hr_recruitment.hr_applicant_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='stage_id']" position="replace">
<field name="state" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}"
invisible="not active and not emp_id"/>
</xpath>

<xpath expr="//field[@name='name']" position="attributes">
<attribute name="placeholder">Insert here a subject for your application</attribute>
</xpath>
</field>
</record>

If you need more information let me know. Thanks


0
Awatar
Odrzuć
Awatar
Marcos Pérez
Autor Najlepsza odpowiedź

I found a solution!!!

In Odoo 17 CE in model hr.applicant this fields are defined like this:

salary_proposed_extra = fields.Char("Proposed Salary Extra", help="Salary Proposed by the Organisation, extra advantages", tracking=True, groups="hr_recruitment.group_hr_recruitment_user")

salary_expected_extra = fields.Char("Expected Salary Extra", help="Salary Expected by Applicant, extra advantages", tracking=True, groups="hr_recruitment.group_hr_recruitment_user")

salary_proposed = fields.Float("Proposed Salary", group_operator="avg", help="Salary Proposed by the Organisation", tracking=True, groups="hr_recruitment.group_hr_recruitment_user")

salary_expected = fields.Float("Expected Salary", group_operator="avg", help="Salary Expected by Applicant", tracking=True, groups="hr_recruitment.group_hr_recruitment_user")

My custom group does not have any reference to this group so, I decided to inherit this module and modify groups in these 4 fields setting parameter groups to False, and It worked. Hope other people find this helpful

0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
[{(!!@Nombre~LAN~Colombia#)}] ¿Cómo se llama Avianca en Colombia?
hr
Awatar
0
gru 25
4
Implementing HR Module? Rozwiązane
hr
Awatar
Awatar
1
lis 25
377
gratis trainingssessies
hr
Awatar
0
lis 25
6
Attendance Analysis – How to calculate Extra Hours with flexible start times
hr
Awatar
Awatar
2
paź 25
878
block other users from editing a survey
hr
Awatar
Awatar
1
paź 25
842
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now