Daily updates from Odoo
Navigate
Branch
Monday, May 8, 2023
12 changes
Enhancements to existing features
Odoo Sign now automatically suggests the signing order based on role sequence numbers, reducing manual setup when preparing signature requests. Users can still adjust the order manually when the suggested sequence does not match the business process.
Original PR description
In sign it is possible to define an order for signature, however the current process is really manual and there are some things that could be automated to improve the usage of this feature. This commit adds a sequence number to the sign.item.role model, which will be used for automatically defining the order of signature. In case the order is not good, it's also possible to change it manually. task-3270748
Appraisal surveys now use the standard survey type system instead of a separate appraisal marker. This simplifies survey setup and keeps appraisal-specific surveys managed from the appraisal area, reducing the risk of users changing them from the general survey app.
Original PR description
[IMP] hr_appraisal_survey: simplify survey form In order to ease the creation of survey, we continue the simplification of the option form in survey started in odoo/odoo#115297. With the introduction…
[IMP] hr_appraisal_survey: simplify survey form In order to ease the creation of survey, we continue the simplification of the option form in survey started in odoo/odoo#115297. With the introduction of the field survey_type in survey_survey, the field is_appraisal is now redundant. The use of is_appraisal field has been replaced by the use of survey_type (== 'appraisal'). Although the survey_type appraisal exists, it isn't visible to the user because that survey type can only be created and viewed in hr_appraisal module. Indeed, we want to avoid that the user creates/modifies/deletes appraisal survey in the survey module. So we don't display the survey type selection in hr_appraisal module and in the survey module, the selection is displayed without the appraisal option. Technical notes: - The appraisal survey type is added in the survey type selection field in hr_appraisal_survey. To avoid displaying it in the survey module, we hide it in css (because the radio widget doesn't support hiding an option). - Although the replacement of the 'is_appraisal' field by the appraisal survey type could greatly simplify the uninstall_hook, we have decided to keep all the cleaning. Indeed, now that we don't add a new field to distinguish the appraisal survey the domain remains correct after uninstalling hr_appraisal_survey even if then the survey_type option 'appraisal' doesn't exist anymore. Note that as one action domain is dependant of the added field survey_id (survey_question_answer), even if we wanted, we couldn't get rid of it completly. Task-3061869
Financial reports can now use default values for editable fields and accept text or yes/no inputs, not only numbers. This helps businesses prefill report data more accurately when accounting or tax lock dates are changed, reducing repeated manual entry and unnecessary recalculation.
Original PR description
This commit adds support for several things: - Editable expressions can now accept strings and boolean values. - Editable expressions can have default values. To define a default value for an…
This commit adds support for several things: - Editable expressions can now accept strings and boolean values. - Editable expressions can have default values. To define a default value for an expression, another expression needs to be added with a `_default_` prefix. For example, if the expression label is `balance`, its default expression will be called `_default_balance`. Expressions prefixed with `_default_` are not evaluated when opening the report; we just skip them. This way, we don't recompute them all the time for no reason. The `account.report.external.value` is evaluated based on the lock_date + 1 day. - `tax_lock_date` for the tax report - `fiscalyear_lock_date` for all other reports Hence, the default values are going to be evaluated when a user makes changes through the `account.change.lock.date` wizard. If the lock date is not set, the default values are not going to be evaluated at all. Options: - date_from is either the previous lock date or the beginning of the fiscal year - date_to is the lock date + 1 day task-3098957
Project task planning now shows an empty row for the current user when the Gantt schedule is otherwise empty. This makes it easier to create or schedule assigned tasks without having to start from only an unassigned tasks row, while avoiding the clutter and performance cost of showing every user.
Original PR description
In Project, ease the creation/scheduling of tasks when the Gantt view is empty. Indeed, by default, only the 'unassigned tasks' line is visible, which feels unnatural to use when tasks are already assigned to some users, and you simply want to plan them. As we can't display all users without distinction for performance (and navigation) issues, we are displaying an empty line for the current user instead. task-3254242
Several Odoo apps no longer pass an extra setting to open forms in edit mode. This aligns them with the platform's current default behavior, reducing unnecessary configuration without changing expected user workflows.
Original PR description
* approvals, delivery_easypost, helpdesk_mail_plugin, industry_fsm, industry_fsm_report, industry_fsm_sale, quality_control_worksheet, stock_barcode
before this commit, in the context of several actions in python and xml the form_view_initial_mode edit is passed.
eg: 'context': {'form_view_initial_mode': 'edit'}
this is no longer needed as we have form view's are now editable by default.
after this commit, the usage of form_view_initial_mode is removed from the context.Enterprise apps were updated to stay compatible with recent advanced search improvements in Odoo. This keeps spreadsheet and Studio search-related tools working correctly, including better handling of dynamic search expressions.
Original PR description
We adapt the enterprise code to the changes brought by the related community PR: https://github.com/odoo/odoo/pull/112326 Task Id: 3063564
Code cleanup and technical improvements
This update standardizes how point-of-sale currency amounts are displayed across affected modules. It reduces duplicated formatting logic and helps keep amounts shown consistently for users, including localized certification flows.
Original PR description
For introduction, check: https://github.com/odoo/odoo/pull/120317 - `format_currency` and `format_currency_no_symbol` are replaced with `formatCurrency` that optionally takes a second parameter indicating use of the currency symbol or not. - `format_round_decimals_currency` is replaced by `formatCurrency` no symbol
Miscellaneous changes
TypeError unsupported operand type(s) for *: 'NoneType' and 'int' is generated because the `None` balance value is calculated with float type when currency_id is not provided. step to reproduce: 1 . Install the `accounting` module 2 . Active multiple currencies from configuration > currencies. 3 . Create one invoice and add items in the invoice lines and confirm it. 4 . Prepare a Bank Reconciliation in which add the foreign currency and fill in the details of the invoice. 5 . And
Original PR description
TypeError unsupported operand type(s) for *: 'NoneType' and 'int' is generated because the `None` balance value is calculated with float type when currency_id is not provided. step to reproduce: 1 .…
TypeError unsupported operand type(s) for *: 'NoneType' and 'int' is generated because the `None` balance value is calculated with float type when currency_id is not provided.
step to reproduce:
1 . Install the `accounting` module
2 . Active multiple currencies from configuration > currencies.
3 . Create one invoice and add items in the invoice lines and confirm it.
4 . Prepare a Bank Reconciliation in which add the foreign currency and fill in
the details of the invoice.
5 . And then open the previously created Bank Reconciliation and remove the
`foreign currency` from its manual operation page.
At that time traceback occurs.
Traceback on sentry :
```
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
File "odoo/http.py", line 2109, in __call__
response = request._serve_db()
File "odoo/http.py", line 1692, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1719, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1916, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 709, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 933, in onchange
return super(BankRecWidget, self.with_context(recursive_onchanges=False)).onchange(values, field_name, field_onchange)
File "odoo/models.py", line 6521, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "odoo/models.py", line 6232, in _onchange_eval
method_res = method(self)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 672, in _onchange_todo_command
self._process_todo_command(command_split[0], command_split[1:])
File "home/odoo/src/enterprise/saas-16.2/account_accountant_batch_payment/models/bank_rec_widget.py", line 131, in _process_todo_command
super()._process_todo_command(command_name, command_args)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 627, in _process_todo_command
self._action_trigger_matching_rules()
File "home/odoo/src/enterprise/saas-16.2/sale_account_accountant/models/bank_rec_widget.py", line 15, in _action_trigger_matching_rules
matching = super()._action_trigger_matching_rules()
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 1526, in _action_trigger_matching_rules
self._action_select_reconcile_model(reco_model)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 1602, in _action_select_reconcile_model
self.line_ids = [
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 1603, in <listcomp>
Command.create(self._lines_widget_prepare_reco_model_write_off_vals(reco_model, x))
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 1464, in _lines_widget_prepare_reco_model_write_off_vals
._prepare_counterpart_amounts_using_st_line_rate(self.transaction_currency_id, None, write_off_vals['amount_currency'])['balance']
File "addons/account/models/account_bank_statement_line.py", line 530, in _prepare_counterpart_amounts_using_st_line_rate
journ_amount_currency = journal_currency.round(balance * rate_comp2journal_curr)
```
In this commit, if `form_currency_id` is empty, it will accept `form_amount_currency` as `form_balance`.
sentry - 4079706938
Forward-Port-Of: odoo/enterprise#39973AttributeError 'bool' object has no attribute 'decode'. This issue occurs because the user imports the empty files which have no raw data. steps to reproduce : 1. Install the `Belgium - Import Bank CODA Statements` module 2. Open the accounting module. 3. In the Bank section click on the import statement. 4. Select the empty content file (Any other than the CSV file). Traceback generated. Traceback on sentry : ``` AttributeError: 'bool' object has no attribute 'decode' File "odo
Original PR description
AttributeError 'bool' object has no attribute 'decode'. This issue occurs because the user imports the empty files which have no raw data. steps to reproduce : 1. Install the `Belgium - Import Bank…
AttributeError 'bool' object has no attribute 'decode'. This issue occurs because the user imports the empty files which have no raw data.
steps to reproduce :
1. Install the `Belgium - Import Bank CODA Statements` module
2. Open the accounting module.
3. In the Bank section click on the import statement.
4. Select the empty content file (Any other than the CSV file). Traceback generated.
Traceback on sentry :
```
AttributeError: 'bool' object has no attribute 'decode'
File "odoo/http.py", line 2106, in __call__
response = request._serve_db()
File "odoo/http.py", line 1689, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1716, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1913, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 708, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.2/l10n_be_soda/models/account_journal.py", line 22, in create_document_from_attachment
return super().create_document_from_attachment(attachment_ids)
File "home/odoo/src/enterprise/saas-16.2/account_bank_statement_import/models/account_journal.py", line 31, in create_document_from_attachment
return journal._import_bank_statement(attachments)
File "home/odoo/src/enterprise/saas-16.2/account_bank_statement_import_csv/models/account_journal.py", line 27, in _import_bank_statement
return super()._import_bank_statement(attachments)
File "home/odoo/src/enterprise/saas-16.2/account_bank_statement_import/models/account_journal.py", line 41, in _import_bank_statement
currency_code, account_number, stmts_vals = self._parse_bank_statement_file(attachment)
File "home/odoo/src/enterprise/saas-16.2/l10n_be_coda/models/account_journal.py", line 346, in _parse_bank_statement_file
record_data = attachment.raw.decode(encoding)
```
In this commit, we will prevent uploading the empty files to the server.
sentry - 4067071325
Forward-Port-Of: odoo/enterprise#40550
Forward-Port-Of: odoo/enterprise#40366The PR odoo/enterprise#38637 moved the application to the hired stage on the contract signature, however if an employee signs a new contract, they will not be linked to their application. task-3236161 Forward-Port-Of: odoo/enterprise#40771
Original PR description
The PR odoo/enterprise#38637 moved the application to the hired stage on the contract signature, however if an employee signs a new contract, they will not be linked to their application. task-3236161 Forward-Port-Of: odoo/enterprise#40771
Currently, the partner VAT listing uses the default computed opening date, which is "Last Month". But in practice, the date range that will almost always be used is "Last Year". This can be frustrating, especially on large databases where the report will take a few seconds to load, only to be able to select the correct date and wait some more to have the desired result. This is why the default opening date will now be set to "Last Year" by default. From @tsb-odoo :  Forward-Port-Of: odoo/enterprise#40750
Before this commit, when scheduling an activity from document inspector, there was the following crash: ``` this.saveRecord is not a function ``` This happens because scheduling an activity necessarily reload the chatter. Chatter is mostly in form view, but in documents the chatter is shown in kanban. `saveRecord` does not exist, as this is a form view-specific feature. This commit solves the issue by not calling `saveRecord` if it doesn't exist. opw-3295227 https://github.com/o
Original PR description
Before this commit, when scheduling an activity from document inspector, there was the following crash: ``` this.saveRecord is not a function ``` This happens because scheduling an activity necessarily reload the chatter. Chatter is mostly in form view, but in documents the chatter is shown in kanban. `saveRecord` does not exist, as this is a form view-specific feature. This commit solves the issue by not calling `saveRecord` if it doesn't exist. opw-3295227 https://github.com/odoo/odoo/pull/120674 Forward-Port-Of: odoo/enterprise#40794 Forward-Port-Of: odoo/enterprise#40775