Monday, June 26, 2023
23 changes · master
New functionality added to Odoo
Adds a new Point of Sale localization module for Chile that connects sales terminals with Chilean electronic invoicing requirements. This helps businesses operating in Chile comply with local fiscal legislation directly from the PoS workflow.
Original PR description
This module is the link between the point_of_sale module and the l10n_cl_edi module. It is required in Chili to follow the Chilean legislation for Point of Sale. Task-2810741
Enhancements to existing features
The spreadsheet tools have been updated to a newer library version, bringing ongoing improvements to spreadsheet-related features. This helps keep document spreadsheets current and prepares the product for better stability and capabilities in future updates.
Original PR description
…-alpha.5
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
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,
Employee referral dashboards and reports now better respect company boundaries in multi-company setups. This helps users see referral information for the right company and improves control over referral points data.
Original PR description
In this commit we fixed following point: - Add company domain in referral dashboard - Create a multi-company rule of the Points line for referrals task-3358242
Odoo now offers a Kitchen Display shortcut from the apps page, making it easier for restaurants and bars to access preparation displays in Point of Sale. Default displays are also created for standard shop and restaurant setups when available, improving the out-of-the-box experience and demo reliability.
Original PR description
*: l10n_mx_edi_pos, pos_restaurant_preparation_display Changes: - Adds a Kitchen Display shortcut in the apps page of Odoo to open the Preparation Display section of the Point of Sale app with the "Is a Bar/Restaurant" filter. This shortcut is made with a web url to don't open the Preparation Display action under the empty Kitchen Display root menuitem but under the Point of Sale root menuitem. - Adds default preparation display for the default shop and restaurant, loaded only if they still exist. - Changed a test that was intended to use a shop to actually create a shop and not a restaurant when pos_restaurant is installed. This is needed because the Floors and tables setting is now enabled by default, and therefore any fresh new restaurant has an empty floor as the first view when a session is opened, not the product list view as expected in the test. task-id: 2484291 related: https://github.com/odoo/odoo/pull/117941
Link-type documents now show richer preview images and can automatically fill in link names from website metadata, making them easier to identify. Sharing controls now prevent URL-only shares and warn users when links are excluded from mixed document shares, reducing confusion and accidental sharing of unsupported content.
Original PR description
Purpose ======= Improve the link management by adding a preview image when the url has one in its meta properties and by preventing the user from sharing urls as urls shouldn't be shared.…
Purpose ======= Improve the link management by adding a preview image when the url has one in its meta properties and by preventing the user from sharing urls as urls shouldn't be shared. Specifications ============== Url preview image : ---------------------------- For documents of type url, currently only Youtube videos preview images were correctly displayed in the documents kanban and list view inspector. Other links preview images were a simple icon. When the url is an image or has an image preview in its meta properties, display the image as preview image in the document kanban card and in the list view inspector. In the sharing modal and the inspector, when updating the url field, if the url has a name in its meta properties, autocomplete the url name field. Open the related document url in a new tab when clicking on the preview image in the kanban card and in the list view inspector. Sharing management : --------------------------------- When only url documents are selected, prevent the user from copying the sharing link or accessing the sharing modal by displaying a danger notification. When url documents but also other types of documents are selected in the group of files to share, display a warning message indicating that documents of type url will be excluded from the shared content. A warning banner when sharing from the share modal and a warning notification when sharing from the inspector. Task-3234864
French tax reports now round each report line and related closing entries to the nearest euro, matching French tax filing requirements. Businesses can configure the profit and loss accounts used to record any rounding difference, improving accuracy and compliance in VAT closing entries.
Original PR description
French tax reports require that each line is rounded to the nearest euro. Change the logic of the account generic tax report in the l10n_fr_reports module to round the closing entries of French tax…
French tax reports require that each line is rounded to the nearest euro. Change the logic of the account generic tax report in the l10n_fr_reports module to round the closing entries of French tax returns to the nearest euro based on the lines of the report, and use the designated profit/loss accounts for the rounding difference. task: 2610752 == PRs == odoo/odoo#75634 Example, a tax return with the lines:  Should have a payable tax amount of 25 euros, so the closing entry generated looks like this:  The rounding also applies to deductible tax and carryovers. When this is the case the report will look like this:  Where the carryover amount is represented un-rounded, but an info box displays the rounded amount as being carried over
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