Wednesday, April 29, 2020
6 changes · master
New functionality added to Odoo
Adds and improves Peru electronic invoicing capabilities, including document signing, cancellation handling, and official tax authority/OSE communication. This helps Peruvian companies issue, validate, and manage compliant electronic invoices more reliably in Odoo.
Enhancements to existing features
Users can now download an IoT Box log file directly from the Box form in Odoo. This makes it easier to share diagnostic information and speed up troubleshooting without needing technical access to the device.
Original PR description
Add a button to download the IoT Box log file from the Box form view in the connected Odoo DB. TaskID: 1943418
Miscellaneous changes
- sepa_orgid_id, sepa_orgid_issr, sepa_pain_version are now computed-editable fields Forward-Port-Of: odoo/enterprise#10261
Original PR description
- sepa_orgid_id, sepa_orgid_issr, sepa_pain_version are now computed-editable fields Forward-Port-Of: odoo/enterprise#10261
A manually encoded timesheet was automatically validated, preventing the timer from being started on that line. TaskID: 2234491 Forward-Port-Of: odoo/enterprise#9947
Original PR description
A manually encoded timesheet was automatically validated, preventing the timer from being started on that line. TaskID: 2234491 Forward-Port-Of: odoo/enterprise#9947
The call to compute_sheet will (indirectly) create an hr.payslip.line that whose name is translatable. This means an ir.translation record will be created. If an applicant visit the salary page with his browser in a language not activated, the context will contain this language and a translation will be created (and crash) ``` Error: Odoo Server Error Traceback (most recent call last): File "/home/odoo/src/odoo/13.0/odoo/http.py", line 624, in _handle_exception return super(
Original PR description
The call to compute_sheet will (indirectly) create an hr.payslip.line that whose name is translatable. This means an ir.translation record will be created. If an applicant visit the salary page with…
The call to compute_sheet will (indirectly) create an hr.payslip.line
that whose name is translatable. This means an ir.translation record
will be created.
If an applicant visit the salary page with his browser in a language not
activated, the context will contain this language and a translation
will be created (and crash)
```
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/src/odoo/13.0/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/13.0/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 915, in __call__
return self.method(*args, **kw)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/enterprise/13.0/hr_contract_salary/controllers/main.py", line 424, in compute_net
payslip.with_context(salary_simulation=True).compute_sheet()
File "/home/odoo/src/enterprise/13.0/hr_payroll/models/hr_payslip.py", line 166, in compute_sheet
payslip.write({'line_ids': lines, 'number': number, 'state': 'verify', 'compute_date': fields.Date.today()})
File "/home/odoo/src/odoo/13.0/addons/mail/models/mail_thread.py", line 322, in write
result = super(MailThread, self).write(values)
File "/home/odoo/src/odoo/13.0/addons/mail/models/mail_activity.py", line 715, in write
return super(MailActivityMixin, self).write(vals)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 3542, in write
field.write(self, vals[fname])
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 2823, in write
return self.write_batch([(records, value)])
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 2844, in write_batch
return self.write_real(records_commands_list, create)
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 3008, in write_real
flush()
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 2972, in flush
comodel.create(to_create)
File "<decorator-gen-224>", line 2, in create
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/enterprise/13.0/hr_payroll/models/hr_payslip.py", line 393, in create
return super(HrPayslipLine, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 3742, in create
records = self._create(data_list)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 3907, in _create
Translations._set_ids(tname, 'model', self.env.lang, record.ids, val, val)
File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_translation.py", line 279, in _set_ids
for res_id in set(ids) - set(existing_ids)
File "<decorator-gen-47>", line 2, in create
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_translation.py", line 554, in create
records = super(IrTranslation, self.sudo()).create(vals_list).with_env(self.env)
File "<decorator-gen-3>", line 2, in create
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 3742, in create
records = self._create(data_list)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 3859, in _create
cache_value = field.convert_to_cache(value, record)
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 2223, in convert_to_cache
raise ValueError("Wrong value for %s: %r" % (self, value))
ValueError: Wrong value for ir.translation.lang: 'nl_BE'
```
This patch hides the error by dropping the visitor language
@rco-odoo this patch just hides the problem by dropping the language in the context but is a fix in the ORM worth it? For instance something like odoo-dev/odoo@c0a15be5aca96cccbaa06186ff90ec2bdce7e919 fixes the issue as well but is definitly more risky.
I am also surprised we don't get this kind of issue more often with the website.
Forward-Port-Of: odoo/enterprise#10264
Forward-Port-Of: odoo/enterprise#10231The Forecast Gantt was not properly inheriting the PlanningGanttView thus the planning was not refreshed after a shift was modified in Schedule by Project. TaskID: 2229290 Forward-Port-Of: odoo/enterprise#9681
Original PR description
The Forecast Gantt was not properly inheriting the PlanningGanttView thus the planning was not refreshed after a shift was modified in Schedule by Project. TaskID: 2229290 Forward-Port-Of: odoo/enterprise#9681