Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Error when accessing hr.applicant form.

Odebírat

Get notified when there's activity on this post

This question has been flagged
hrodoo17
1 Odpovědět
2047 Zobrazení
Avatar
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
Avatar
Zrušit
Avatar
Marcos Pérez
Autor Nejlepší odpověď

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
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
[{(!!@Nombre~LAN~Colombia#)}] ¿Cómo se llama Avianca en Colombia?
hr
Avatar
0
pro 25
4
Implementing HR Module? Vyřešeno
hr
Avatar
Avatar
1
lis 25
386
gratis trainingssessies
hr
Avatar
0
lis 25
6
Attendance Analysis – How to calculate Extra Hours with flexible start times
hr
Avatar
Avatar
2
říj 25
889
block other users from editing a survey
hr
Avatar
Avatar
1
říj 25
850
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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