oca / hr-attendance Goto Github PK
View Code? Open in Web Editor NEWHR Attendance OCA modules for Odoo
License: GNU Affero General Public License v3.0
HR Attendance OCA modules for Odoo
License: GNU Affero General Public License v3.0
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
hr_attendance_report_theoretical_time
When recomputing theoretical hours, the current resource_calendar is used to recompute the theoretical attendance, not respecting past contracts with different calendars.
Affected versions: 16.0
Steps to reproduce the behavior:
Expected behavior
Entries should respect the contractual resource_calendar of their period and only fall back on the current resource_calendar if no contract is available during the working period.
Additional context
Also new entries in the past should respect the calendar which was valid during the time period.
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
When I ask for a leave which is for less than one day (half day checkbox DISABLED), and that leave is approved, I go to my attendandes -> hr.attendance.theoretical.time.report pivot view and the day I selected as a leave marks 0 theoretical hours.
Practical example:
I select a 0.5 days leave for 24th march (a day I should be working 8 hours). Then the theoretical hours field should me marking 4 hours, but it displays 0.
I attached two images so you can see the problem visually.
hr_attendance_autoclose
ValueError: Invalid field 'no_autoclose' on model 'hr.employee.public'
install timeoff and autoclose together and try to request timeoff with regular user.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Алдаа:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: <NewId 0x7fbb2943fb00>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1038, in get
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('hr.leave(<NewId 0x7fbb2943fb00>,).number_of_hours_display', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 369
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1038, in get
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('hr.employee(369,).resource_calendar_id', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1342, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 390, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 377, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6265, in onchange
value = record[name]
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5761, in getitem
return self._fields[key].get(self, type(self))
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1062, in get
self.compute_value(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1147, in compute_value
records._compute_field_value(self)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4018, in _compute_field_value
getattr(self, field.compute)()
File "/usr/lib/python3/dist-packages/odoo/addons/hr_holidays/models/hr_leave.py", line 457, in _compute_number_of_hours_display
calendar = holiday._get_calendar()
File "/usr/lib/python3/dist-packages/odoo/addons/hr_holidays/models/hr_leave.py", line 452, in _get_calendar
return self.employee_id.resource_calendar_id or self.env.company.resource_calendar_id
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2370, in get
return super().get(records, owner)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1045, in get
recs._fetch_field(self)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3003, in _fetch_field
self._read(fnames)
File "/usr/lib/python3/dist-packages/odoo/addons/hr/models/hr_employee.py", line 133, in _read
res = self.env['hr.employee.public'].browse(self.ids).read(fields)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2952, in read
raise ValueError("Invalid field %r on model %r" % (name, self._name))
ValueError: Invalid field 'no_autoclose' on model 'hr.employee.public'
You get an error creating expense report with employee without access to private addresses.
Steps to reproduce:
Error reason:
In hr standard module we have hr.employee and hr.employee.public, hr.employee.public is a sql view to get readonly acces to employee.
When you create a report with user without private addresses access you spect to get all fields created on hr.employee.
Maybe this is Odoo bug, and not bug on this report, but to prevent this error you can create this fields also in hr.employee.public.
In v14 for hr_attendance_sheet:
Security group should be as follows
https://github.com/OCA/hr-attendance/blob/14.0/hr_attendance_sheet/security/security_groups.xml#L23
Replace this
['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
with
['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
You used the hr_holidays_public module. however, these is not available for version odoo 13
hr_attendance_autoclose
Unable to install, getting this error,
Error:
Odoo Server ErrorTraceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 530, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'base.main_company'The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1393, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 475, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 593, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 455, in load_modules
loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 348, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 221, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 733, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 799, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 719, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 685, in _tag_root
)) from e
ExceptionThe above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /mnt/extra-addons/hr_attendance_autoclose/data/res_company.xml:3, near
Affected versions: 14.0
Steps to reproduce the behavior:
Expected behavior
Should install without errors.
Additional context
I was able to solve by removing the data/res_company.xml file from the manifest
hi,
receiving this error for all employee ( non-admin) when applying time-off
Admin user however can apply. Not sure whats broken here..
Please let me know wats the work around to have this working ?
used hr-autoclose and hr-reason modules.
Error:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo/odoo-server/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 912, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1389, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/odoo-server/odoo/models.py", line 6236, in onchange
for name in nametree
File "/odoo/odoo-server/odoo/models.py", line 6237, in <listcomp>
if name not in done and snapshot0.has_changed(name)
File "/odoo/odoo-server/odoo/models.py", line 6068, in has_changed
return self[name] != record[name]
File "/odoo/odoo-server/odoo/models.py", line 5666, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/odoo/odoo-server/odoo/fields.py", line 1019, in __get__
self.compute_value(recs)
File "/odoo/odoo-server/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/odoo/odoo-server/odoo/models.py", line 4061, in _compute_field_value
getattr(self, field.compute)()
File "/odoo/odoo-server/addons/hr_holidays/models/hr_leave.py", line 531, in _compute_number_of_hours_text
float_round(leave.number_of_hours_display, precision_digits=2),
File "/odoo/odoo-server/odoo/fields.py", line 1019, in __get__
self.compute_value(recs)
File "/odoo/odoo-server/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/odoo/odoo-server/odoo/models.py", line 4061, in _compute_field_value
getattr(self, field.compute)()
File "/odoo/odoo-server/addons/hr_holidays/models/hr_leave.py", line 492, in _compute_number_of_hours_display
calendar = holiday._get_calendar()
File "/odoo/odoo-server/addons/hr_holidays/models/hr_leave.py", line 487, in _get_calendar
return self.employee_id.resource_calendar_id or self.env.company.resource_calendar_id
File "/odoo/odoo-server/odoo/fields.py", line 2483, in __get__
return super().__get__(records, owner)
File "/odoo/odoo-server/odoo/fields.py", line 996, in __get__
recs._fetch_field(self)
File "/odoo/odoo-server/odoo/models.py", line 3069, in _fetch_field
self._read(fnames)
File "/odoo/odoo-server/addons/hr/models/hr_employee.py", line 135, in _read
res = self.env['hr.employee.public'].browse(self.ids).read(fields)
File "/odoo/odoo-server/odoo/models.py", line 3009, in read
raise ValueError("Invalid field %r on model %r" % (name, self._name))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'no_autoclose' on model 'hr.employee.public'
module: hr_attendance_sheet
version: 14.0
I started to dive into hr_attendance_sheet and provide a migration to version 15.0 in PR #114
Unfortunately, either version 14.0 nor 15.0 are working properly for a sheet range MONTHLY
.
Steps to reproduce
Use Attendance Sheets
Attendance Sheet Range
MonthCurrent behavior
end_date
) is done based on the stored value of date_start
and NOT based on the current selected value of "Date From".Expected behavior
Steps to reproduce
Attendance Sheet Range
MonthAttendance Sheets: Create Sheets
job twiceCurrent behavior
date_end
field in the database is now wrong:Attendance Sheets: Create Sheets
In Odoo 15 I have similar problems. I fixed it with my basic knowledge of python programing and will provide a patch / pull request. But someone with more experience should review this or make a better fix.
Currently the pull request is referenced on my fork in albig#1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.