Comments (8)
@dreispt I'm pinging you, because i don't know who is responsible for the hr
repo.
I would create a pull request, but the question is: what solution should be chosen. I've mentioned two solutions, but maybe there are some interesting other ones?
from hr.
I see, the module makes the parter_name
field mandatory.
IMO the sensitive thing to do is to add a default value to partner_name
.
Since the Application title, name
is mandatory, I would suggest for partner_name
to use it's value as a default.
Do you think you can make a PR for this?
from hr.
partner_name
is already set by the origin message_new
(by email from value). Are default values working for related fields at all?
from hr.
You're not using any default values then.
partner_name
is a related field, and it gets it's value written on the Partner name
.
It doesn't make sense that you get an error.
Can you give a link to the message_new()
code you refer to?
from hr.
https://github.com/odoo/odoo/blob/8.0/addons/hr_recruitment/hr_recruitment.py#L386
from hr.
AFAICS the message_new
is writing both on name
and partner_name
.
You shouldn't have any error then. 😕
Do you have a traceback of the error you can share?
from hr.
Ping!
from hr.
Pong (sorry, was on vacation):
Traceback (most recent call last):
File "workspace/odoo/addons/fetchmail/fetchmail.py", line 215, in fetch_mail
context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/addons/mail/mail_thread.py", line 1204, in message_process
thread_id = self.message_route_process(cr, uid, msg_txt, msg, routes, context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/addons/mail/mail_thread.py", line 1124, in message_route_process
thread_id = model_pool.message_new(cr, user_id, message_dict, custom_values, context=nosub_ctx)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/addons/hr_recruitment/hr_recruitment.py", line 405, in message_new
return super(hr_applicant, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/addons/mail/mail_thread.py", line 1240, in message_new
res_id = model_pool.create(cr, uid, data, context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/addons/hr_recruitment/hr_recruitment.py", line 419, in create
obj_id = super(hr_applicant, self).create(cr, uid, vals, context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/addons/mail/mail_thread.py", line 381, in create
thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/openerp/api.py", line 345, in old_api
result = method(recs, _args, *_kwargs)
File "workspace/odoo/openerp/models.py", line 4092, in create
record = self.browse(self._create(old_vals))
File "workspace/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, _args, *_kwargs)
File "workspace/odoo/openerp/api.py", line 481, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "workspace/odoo/openerp/models.py", line 4148, in _create
record_id = self.pool[table].create(cr, user, tocreate[table], context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/openerp/api.py", line 345, in old_api
result = method(recs, _args, *_kwargs)
File "workspace/odoo/openerp/addons/base/res/res_partner.py", line 573, in create
partner = super(res_partner, self).create(vals)
File "workspace/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, _args, *_kwargs)
File "workspace/odoo/openerp/api.py", line 481, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "workspace/odoo/addons/mail/mail_thread.py", line 381, in create
thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
File "workspace/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "workspace/odoo/openerp/api.py", line 345, in old_api
result = method(recs, _args, *_kwargs)
File "workspace/odoo/openerp/models.py", line 4092, in create
record = self.browse(self._create(old_vals))
File "workspace/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, _args, *_kwargs)
File "workspace/odoo/openerp/api.py", line 481, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "workspace/odoo/openerp/models.py", line 4230, in _create
tuple([u[2] for u in updates if len(u) > 2])
File "workspace/odoo/openerp/sql_db.py", line 158, in wrapper
return f(self, _args, *_kwargs)
File "workspace/odoo/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint
from hr.
Related Issues (20)
- How can I use inputs on salary rules? HOT 1
- Migration to version 16.0 HOT 24
- [14.0][hr_employee_calendar_planning] We cannot create employee from a user HOT 3
- [odoo 15] [hr_contract_employee_calendar_planning] Cant install this module HOT 1
- Attendance throws error "Invalid field 'birth_name' on model 'hr.employee.public'" HOT 4
- hr_org_chart_overview is not showing the title of the employees HOT 2
- conflicts with odoo core function for allocation accrual cron job HOT 1
- [15.0] "psycopg2.errors.InvalidColumnReference: there is no unique or exclusion constraint matching the ON CONFLICT specification" when I try to install hr_employee_calendar_planning HOT 2
- hr_holidays_notify_employee_manager : email template HOT 1
- AttributeError: 'hr.applicant' object attribute 'name' is read-only HOT 2
- [14.0] hr_holidays_settings: duplicated in OCA / hr-holidays repo HOT 2
- can upgrade to odoo 16 Petty Cash HOT 1
- Odoo HR planning HOT 1
- hr_employee_birthday_mail: ValueError: Invalid field 'allow_birthday_wishes' on model 'hr.employee.public' HOT 1
- Using Repo v14.0 for v16.0 HOT 1
- hr_org_chart_overview Multicompany doesn't work HOT 1
- [RFC] module to restrict HR officer to their own subordinates? HOT 1
- Migration to version 17.0 HOT 11
- Data model on hr employee relative is redefining field instead of using oca partner contact modules HOT 2
- hr_employee_ppe: error when assigning multiple PPE to an employee. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hr.