Monday, June 26, 2023
17 changes
Enhancements to existing features
Indian payroll salary rules were updated to remove a duplicate employee provident fund rule. This helps prevent confusion or duplicate payroll calculations when processing salaries with provident fund contributions.
Original PR description
- remove the duplicate `Provident fund - Employee` rule
Expense and recruitment forms now only show the OCR document ID when OCR has actually been used. This keeps forms cleaner by removing an empty technical field from everyday views.
Original PR description
* hr_expense_extract, hr_recruitment_extract before this commit, in the expense and applicant form view, the extract_document_uuid field is always shown even the field value is empty. after this commit, the field will be displayed only when the field have a value, ie, when the ocr feature is used,
Resolved issues and error corrections
On mobile devices, the Knowledge sidebar now automatically closes when a user opens or creates an article. This removes an extra manual step and makes it easier to start reading or editing content on small screens.
Original PR description
Currently, the sidebar no longer closes on mobile devices when the user selects or creates an article. The user needs to manually close the menu to view the article which is not really convenient.
Steps to reproduce the issue:
1. Go to Knowledge using a mobile phone
2. Toggle the sidebar
3. Click on an article or create a new article ("+" sign)
=> The sidebar is kept open.
TO BE: The sidebar should close itself when the user selects or creates an article. That way, people will not have to do additional clicks to read or edit the article they want.
Reference: https://github.com/odoo/enterprise/pull/34788
task-3368916Miscellaneous changes
The constraint would only check the length of the HK Bank Code without considering that it might from another country. Fixes runbot error-20879 Forward-Port-Of: odoo/enterprise#42523
Original PR description
The constraint would only check the length of the HK Bank Code without considering that it might from another country. Fixes runbot error-20879 Forward-Port-Of: odoo/enterprise#42523
The spreadsheet document clone dialog was updated to stay aligned with recent confirmation dialog changes. This helps keep the export or clone flow working as expected for users without introducing new functionality.
Original PR description
This commit update xpath accordind to community changes in confirmation dialog. task-3356114
Subscription payment forms now reuse values already stored on the related document instead of relying on submitted request data. This reduces the risk of incorrect or missing information during customer payment flows and helps keep subscription processing consistent.
-[IMP] l10n_in_reports_gstr: set default gst treatment base on section of GSTR-2B -Added test cases for GSTR1 Reports Test Flow for GSTR1 Report: -Creating partners with GST treatment registered, unregistered, consumer and overseas -Creating B2B Intra-State Invoice -Creating B2B Invoice -Creating B2C Intra-State Invoice -Creating B2CL Invoice -Creating B2B Invoice with Exempt Tax -Creating B2B with Nil Rated Tax -Creating B2B with Non-GST Suppl
Original PR description
-[IMP] l10n_in_reports_gstr: set default gst treatment base on section of GSTR-2B -Added test cases for GSTR1 Reports Test Flow for GSTR1 Report: -Creating partners with GST treatment registered,…
-[IMP] l10n_in_reports_gstr: set default gst treatment base on section of GSTR-2B
-Added test cases for GSTR1 Reports
Test Flow for GSTR1 Report:
-Creating partners with GST treatment registered, unregistered, consumer and overseas
-Creating B2B Intra-State Invoice
-Creating B2B Invoice
-Creating B2C Intra-State Invoice
-Creating B2CL Invoice
-Creating B2B Invoice with Exempt Tax
-Creating B2B with Nil Rated Tax
-Creating B2B with Non-GST Supplies
-Creating Export Invoice
-Creating GSTR Reports and comparing actually json with expected json
Test Flow for GSTR2 Report:
-Creating invoice for every use case possible
Sending expected json for invoice matching
and checking their l10n_in_gstr2b_reconciliation_status
and l10n_in_exception as per expectation
and also checking expected new invoices created
which are not found in odoo
task-3271584
Forward-Port-Of: odoo/enterprise#43116
Forward-Port-Of: odoo/enterprise#40058When a user Creates/Open GST Return Period, the error comes like tuple indices must be integers or slices, not str. Steps to produce: - Install the `l10n_in_reports_gstr` module. - Accounting > Reporting > India > GST Return Periods. - Create a new record. - Error will be produced. Seems like this issue comes because of the new API of '_read_group' instead of the 'read_group' method. It returns the tuple and the code expects the dictionary. Sentry-4262634781 Traceback: ``` KeyE
Original PR description
When a user Creates/Open GST Return Period, the error comes like tuple indices must be integers or slices, not str. Steps to produce: - Install the `l10n_in_reports_gstr` module. - Accounting >…
When a user Creates/Open GST Return Period, the error comes like tuple indices must be integers or slices, not str.
Steps to produce:
- Install the `l10n_in_reports_gstr` module.
- Accounting > Reporting > India > GST Return Periods.
- Create a new record.
- Error will be produced.
Seems like this issue comes because of the new API of '_read_group' instead of the 'read_group' method. It returns the tuple and the code expects the dictionary.
Sentry-4262634781
Traceback:
```
KeyError: <NewId 0x7f8d4f91ba90>
File "odoo/api.py", line 959, in get
cache_value = field_cache[record._ids[0]]
CacheMiss: 'l10n_in.gst.return.period(<NewId 0x7f8d4f91ba90>,).expected_amount'
File "odoo/fields.py", line 1158, in __get__
value = env.cache.get(record, self)
File "odoo/api.py", line 966, in get
raise CacheMiss(record, field)
TypeError: tuple indices must be integers or slices, not str
File "odoo/http.py", line 2114, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1921, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, 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 "odoo/models.py", line 6702, in onchange
snapshot1 = Snapshot(record, nametree)
File "odoo/models.py", line 6476, in __init__
self.fetch(name)
File "odoo/models.py", line 6486, in fetch
self[name] = record[name]
File "odoo/models.py", line 6122, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 1209, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 396, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4486, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.3/l10n_in_reports_gstr/models/gst_return_period.py", line 220, in _compute_expected_amount
if total_by_company['company_id'][0] in (record.company_ids or record.company_id).ids:
```
Forward-Port-Of: odoo/enterprise#42912Steps to reproduce: ------------------- - create a stage without selecting a project. Issue: ------ The new stage is inaccessible. Cause: ------ When the project is not defined, the following ORM command is used: `[6, False, []]` for the `project_ids` field. Solution: --------- When we create a project stage (project task type), it is essential that we link it to a project. Use the context to define the `default_project_id`. opw-3322992 Forward-Port-Of: odoo/enterprise#4306
Original PR description
Steps to reproduce: ------------------- - create a stage without selecting a project. Issue: ------ The new stage is inaccessible. Cause: ------ When the project is not defined, the following ORM command is used: `[6, False, []]` for the `project_ids` field. Solution: --------- When we create a project stage (project task type), it is essential that we link it to a project. Use the context to define the `default_project_id`. opw-3322992 Forward-Port-Of: odoo/enterprise#43069 Forward-Port-Of: odoo/enterprise#42529
Steps to reproduce: ------------------- - go to Settings / Technical / Sequences & Identifiers / Sequences; - change Next Number for helpdesk.ticket; - create a new ticket in helpdesk; - go to helpdesk portal; - select "Search in Reference"; - search for the new ticket reference. Issue: ------ The ticket reference cannot be found. Cause: ------ Since the commit: 16c9990d32ea6f8dcaf7c36dbb6183029f598fd0 The id of a ticket and its reference may diverge (since the latter is based
Original PR description
Steps to reproduce: ------------------- - go to Settings / Technical / Sequences & Identifiers / Sequences; - change Next Number for helpdesk.ticket; - create a new ticket in helpdesk; - go to helpdesk portal; - select "Search in Reference"; - search for the new ticket reference. Issue: ------ The ticket reference cannot be found. Cause: ------ Since the commit: 16c9990d32ea6f8dcaf7c36dbb6183029f598fd0 The id of a ticket and its reference may diverge (since the latter is based on the sequence). But the search for a portal user is always based on the id. Solution: --------- Don't use the `id` field in the search for a portal user, but use the `ticket_ref` field. opw-3379346 Forward-Port-Of: odoo/enterprise#43074 Forward-Port-Of: odoo/enterprise#43035
When importing the FEC with default taxes on some accounts, taxes may be set on the account_move_lines created. This should not occur. In addition, this will raise an exception as the tax_ids are inferred, then the moves are posted, but then during `_post_process`, the partner_id is set, triggering `_compute_all_tax` and resetting the taxes. Hence, we get a "You cannot modify the taxes related to a posted journal item" exception. When creating the account_move_lines, give a value for `tax_ids
Original PR description
When importing the FEC with default taxes on some accounts, taxes may be set on the account_move_lines created. This should not occur. In addition, this will raise an exception as the tax_ids are inferred, then the moves are posted, but then during `_post_process`, the partner_id is set, triggering `_compute_all_tax` and resetting the taxes. Hence, we get a "You cannot modify the taxes related to a posted journal item" exception. When creating the account_move_lines, give a value for `tax_ids` to avoid the automatic setting. opw-3359806 Forward-Port-Of: odoo/enterprise#43085
…ut2net details modal task-3374957 Forward-Port-Of: odoo/enterprise#42776
Original PR description
…ut2net details modal task-3374957 Forward-Port-Of: odoo/enterprise#42776
Steps: - Install timesheet_grid - Got to My timesheet and list view - Start timer - Switch kanban view - Stop timer Technical: When we switch the view, onWillStart will be called and the name field will be empty. In account.analytic.line the name field is required so the process goes into recurring. We have already set required=0 [url](https://github.com/odoo/odoo/blob/saas-16.2/addons/hr_timesheet/views/hr_timesheet_views.xml#L30) in the list view so I same do in
Original PR description
Steps: - Install timesheet_grid - Got to My timesheet and list view - Start timer - Switch kanban view - Stop timer Technical: When we switch the view, onWillStart will be called and the name field will be empty. In account.analytic.line the name field is required so the process goes into recurring. We have already set required=0 [url](https://github.com/odoo/odoo/blob/saas-16.2/addons/hr_timesheet/views/hr_timesheet_views.xml#L30) in the list view so I same do in the kanban view. Forward-Port-Of: odoo/enterprise#42945
This PR is related to the property modal redesign. In order to reach more consistency in our variables use, we defined that the `$popover-border-color` should match the default `$border-color` variable. The issue we are facing is the fact that `$border-color` uses the BS's `$o-gray-300` variable in dark mode, which is the same value as our popover background. Opening a popover in dark mode would then make these borders invisible which is not the expected behavior. What we do here is to mod
Original PR description
This PR is related to the property modal redesign. In order to reach more consistency in our variables use, we defined that the `$popover-border-color` should match the default `$border-color` variable. The issue we are facing is the fact that `$border-color` uses the BS's `$o-gray-300` variable in dark mode, which is the same value as our popover background. Opening a popover in dark mode would then make these borders invisible which is not the expected behavior. What we do here is to modify the popover background in dark mode to make sure borders are visible. task-3084756 Requires : https://github.com/odoo/odoo/pull/119353 Forward-Port-Of: odoo/enterprise#40706
## Current behaviour As a public user, when filtering in the shop for a rental product using the datepicker, we are met with a 403 error, because we don't have access to the Warehouse model. ## Expected behaviour You shouldn't have access errors when filtering rental products based on the date range. ## Steps to reproduce - Install `website_sale_stock_renting` - Create a rental product, set it's quant on hand to 1, don't allow it to be sold when out of stock - Go to the shop page, edi
Original PR description
## Current behaviour As a public user, when filtering in the shop for a rental product using the datepicker, we are met with a 403 error, because we don't have access to the Warehouse model. ##…
## Current behaviour As a public user, when filtering in the shop for a rental product using the datepicker, we are met with a 403 error, because we don't have access to the Warehouse model. ## Expected behaviour You shouldn't have access errors when filtering rental products based on the date range. ## Steps to reproduce - Install `website_sale_stock_renting` - Create a rental product, set it's quant on hand to 1, don't allow it to be sold when out of stock - Go to the shop page, edit the website, customize > daterange picker - Go to an incognito windows (don't log in, so you are a public user) - Go to "/shop" and filter based on a daterange you get a 403. ## Reason for the problem The problem is 2 fold: - lack of read access on the warehouse model, because in `_filter_on_available_rental_products` we are getting the `qty_available`, which triggers `_compute_quantities/_compute_quantities_dict/_get_domain_locations ` which does a search on the Warehouse model. The public user doesn't have read access to this model. (The module doesn't define any access rules). - lack of read access on the `sale.order.line` model, used in `_filter_on_available_rental_products` to check the availability of a variant. ## Fix The module doesn't define any security rules, but instead of creating brand new access rights, that would grand read access to both `sale. order.line` and `warehouse` models to all public users, use a `sudo` at the problematic call site in the controller that is calling `_filter_on_available_rental_products`. ## Affected versions - 16.0 - saas-16.1 - saas-16.2 - saas-16.3 - master --- opw-3318852 Forward-Port-Of: odoo/enterprise#42791
Steps to reproduce: - activate analytic acccounting - in accounting report>schedule depreciation>options: activate analytic groupby - create an asset: amount 10k, start date (01/01/23), analytic account "administrative" - Open the Depreciation Schedule and set the analytic groupby with analytic account "groupby" Issue: The groupby does not exclude assets that do not have the analytic account set in the groupby option Cause: The analytic groupby has not been implemented for the `accou
Original PR description
Steps to reproduce: - activate analytic acccounting - in accounting report>schedule depreciation>options: activate analytic groupby - create an asset: amount 10k, start date (01/01/23), analytic…
Steps to reproduce: - activate analytic acccounting - in accounting report>schedule depreciation>options: activate analytic groupby - create an asset: amount 10k, start date (01/01/23), analytic account "administrative" - Open the Depreciation Schedule and set the analytic groupby with analytic account "groupby" Issue: The groupby does not exclude assets that do not have the analytic account set in the groupby option Cause: The analytic groupby has not been implemented for the `account_asset_report` (Depreciation Schedule Report)) Solution: (1) Add to the `_query_values` the analytic information for the Asset Line. (2) Modify the signature of the method `_query_lines` in order to have the `column_group_key` information => Now that we have `column_group_key` information, we can retrieve which column we are processing and find the dedicated forced options(*). From those forced options, we get the `analytic accounts` and we compare it to the `asset_analytic_distribution` of the Asset Line that is availble thanks to (1). (*) the analytic groupby options are set in the `forced options` in`_create_column_analytic`: https://github.com/odoo/enterprise/blob/4cf8213f88f5eee45382386a3389e51cb2b75f4b/account_reports/models/account_analytic_report.py#L71-L77 opw-3344182 Forward-Port-Of: odoo/enterprise#42960 Forward-Port-Of: odoo/enterprise#42590
While creating a Journal Entries , if the value of 'tax_closing_end_date' field is passed as null. As 'tax_closing_end_date' field is not required, there might be a case where it can be null/False. Traceback will be generated. ``` TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta' File "odoo/http.py", line 2115, in __call__ response = request._serve_db() File "odoo/http.py", line 1698, in _serve_db return service_model.retrying(self._serve_ir_http, self
Original PR description
While creating a Journal Entries , if the value of 'tax_closing_end_date' field is passed as null. As 'tax_closing_end_date' field is not required, there might be a case where it can be null/False.…
While creating a Journal Entries , if the value of 'tax_closing_end_date' field is passed as null. As 'tax_closing_end_date' field is not required, there might be a case where it can be null/False.
Traceback will be generated.
```
TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta'
File "odoo/http.py", line 2115, in __call__
response = request._serve_db()
File "odoo/http.py", line 1698, 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 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1922, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 715, 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_reports/models/mail_activity.py", line 13, in action_open_tax_report
return move.action_open_tax_report()
File "home/odoo/src/enterprise/saas-16.2/account_reports/models/account_move.py", line 75, in action_open_tax_report
options = self._get_report_options_from_tax_closing_entry()[1]
File "home/odoo/src/enterprise/saas-16.2/account_reports/models/account_move.py", line 142, in _get_report_options_from_tax_closing_entry
date_from = date_utils.start_of(date_to + relativedelta(months=-delay), 'month')
```
This commit will resolve this issue.
sentry-4212662929
Forward-Port-Of: odoo/enterprise#42699
Forward-Port-Of: odoo/enterprise#41622