CybroOdoo / OpenHRMS

GNU Affero General Public License v3.0
125 stars 214 forks source link

Error on Batch Payslip Generation #9

Open rjay1018 opened 5 years ago

rjay1018 commented 5 years ago

Traceback (most recent call last): File "/opt/odoo11/odoo-server/odoo/fields.py", line 937, in get value = record.env.cache.get(record, self) File "/opt/odoo11/odoo-server/odoo/api.py", line 960, in get value = self._data[field][record.id][key] KeyError: (<odoo.sql_db.Cursor object at 0x7f0d210e5be0>, 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/odoo11/odoo-server/odoo/http.py", line 650, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo11/odoo-server/odoo/http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/opt/odoo11/odoo-server/odoo/tools/pycompat.py", line 87, in reraise raise value File "/opt/odoo11/odoo-server/odoo/http.py", line 692, in dispatch result = self._call_function(self.params) File "/opt/odoo11/odoo-server/odoo/http.py", line 342, in _call_function return checked_call(self.db, *args, *kwargs) File "/opt/odoo11/odoo-server/odoo/service/model.py", line 97, in wrapper return f(dbname, args, kwargs) File "/opt/odoo11/odoo-server/odoo/http.py", line 335, in checked_call result = self.endpoint(*a, kw) File "/opt/odoo11/odoo-server/odoo/http.py", line 936, in call return self.method(*args, *kw) File "/opt/odoo11/odoo-server/odoo/http.py", line 515, in response_wrap response = f(args, kw) File "/opt/odoo11/odoo-server/addons/web/controllers/main.py", line 938, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo11/odoo-server/addons/web/controllers/main.py", line 926, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo11/odoo-server/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/opt/odoo11/odoo-server/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, *kwargs) File "/opt/odoo11/odoo-server/addons/hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py", line 14, in compute_sheet return super(HrPayslipEmployees, self.with_context(journal_id=journal_id)).compute_sheet() File "/opt/odoo11/odoo-server/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py", line 26, in compute_sheet slip_data = self.env['hr.payslip'].onchange_employee_id(from_date, to_date, employee.id, contract_id=False) File "/opt/odoo11/odoo-server/addons/hr_payroll/models/hr_payslip.py", line 430, in onchange_employee_id worked_days_line_ids = self.get_worked_day_lines(contracts, date_from, date_to) File "/opt/odoo11/custom/submodules/CybroAddons/hr_employee_shift/models/hr_shift_payroll.py", line 52, in get_worked_day_lines uom_hour = contract.employee_id.resource_id.calendar_id.uom_id or self.env.ref('product.product_uom_hour', File "/opt/odoo11/odoo-server/odoo/fields.py", line 941, in get self.determine_value(record) File "/opt/odoo11/odoo-server/odoo/fields.py", line 1042, in determine_value record._prefetch_field(self) File "/opt/odoo11/odoo-server/odoo/models.py", line 2646, in _prefetch_field result = records.read([f.name for f in fs], load='_classic_write') File "/opt/odoo11/odoo-server/odoo/models.py", line 2590, in read self._read_from_database(stored, inherited) File "/opt/odoo11/odoo-server/odoo/models.py", line 2709, in _read_from_database cr.execute(query_str, params) File "/opt/odoo11/odoo-server/odoo/sql_db.py", line 155, in wrapper return f(self, args, **kwargs) File "/opt/odoo11/odoo-server/odoo/sql_db.py", line 232, in execute res = self._obj.execute(query, params) File "/usr/local/lib/python3.5/dist-packages/psycopg2/extensions.py", line 123, in getquoted pobjs = [adapt(o) for o in self._seq] File "/usr/local/lib/python3.5/dist-packages/psycopg2/extensions.py", line 123, in pobjs = [adapt(o) for o in self._seq] psycopg2.ProgrammingError: can't adapt type 'hr.contract'

rjay1018 commented 5 years ago

Same error on creating directly to Employee Payslip

rjay1018 commented 5 years ago

Any updates on this?

rjay1018 commented 5 years ago

this was fixed by applying the new OpenHRMS Repo