Wednesday, August 28, 2024
15 changes
5 changes
Resolved issues and error corrections
Project setup checks now ensure milestones are enabled before running guided tours. This prevents tour failures in databases without demo data and makes project-related testing more reliable.
Original PR description
Some project tours rely on the milestones feature being enabled. While this is the case when demo data are installed, it's not when they aren't, and the tours fail. To solve this issue, and prevent future ones from being created, PR enables the feature before each tour. Task-4132639
Miscellaneous changes
Enterprise PR: https://github.com/odoo/enterprise/pull/68087 A user without any accounting access right set get an error when creating an invoice from a sale order. The user should be able to see the draft invoice when clicking on the 'Create Invoice' from a sale order, as it is the case without the l10n_cl_edi module. ### Steps to reproduce: - Install the 'l10n_cl_edi' module - As admin go to Settings > Manage Users, click on a User and, in Access Rights, change Accounting > Invoicing t
Original PR description
Enterprise PR: https://github.com/odoo/enterprise/pull/68087 A user without any accounting access right set get an error when creating an invoice from a sale order. The user should be able to see the…
9 changes
Enhancements to existing features
The spreadsheet pivot details side panel has been adjusted to better handle overflowing content. This should make detailed pivot information easier to view and reduce layout issues for users working with spreadsheets.
1 change
Resolved issues and error corrections
This update fixes a test in the Peru stock reports module that was failing unpredictably due to inconsistent data ordering. By standardizing the order of data processing, the test now runs reliably every time, improving the stability of our quality assurance process.
Original PR description
Trying the test from l10n_pe_reports_stock, it failed locally, but somehow we are lucky it did not fail on runbot. The problem is that the order is not fixed and by fixing the order we avoid the indeterministic failing.
Enterprise PR: https://github.com/odoo/enterprise/pull/68087 A user without any accounting access right set get an error when creating an invoice from a sale order. The user should be able to see the draft invoice when clicking on the 'Create Invoice' from a sale order, as it is the case without the l10n_cl_edi module. ### Steps to reproduce: - Install the 'l10n_cl_edi' module - As admin go to Settings > Manage Users, click on a User and, in Access Rights, change Accounting > Invoicing to nothing - (Make sure the User Type is Internal User) - Switch to this user - Go to Sales and create a new Quotation, confirm - Click on the 'Create Invoice' button - An access error appears because of 'l10n_cl.account.invoice.reference' ### Cause: The records of `l10n_cl.account.invoice.reference` are only readable by Accounting groups. ### Solution: Make the records of `l10n_cl.account.invoice.reference` accessible to all internal users. This will raise another access error for `l10n_latam.document.type`, so we also need to make them accessible (in community). ### Note: I noticed the access right of `l10n_cl.account.invoice.reference` were giving rights to `account.group_account_invoice` twice, where I think the second time was supposed to be `account.group_account_manager`. I don't know if this is wanted, but it doesn't make sense to have two lines for the same model and user group. I decided to only change `group_account_invoice` to `group_account_manager` so this PR is removing the write, create, unlink rights of `account.group_account_invoice`. opw-4078302 Forward-Port-Of: odoo/odoo#175988
Versions -------- - 17.0+ Steps ----- 1. Have industry_fsm_sale from enterprise installed; 2. create a SO using a different `partner_id` for the shipping address; 3. add a product that uses timesheets without creating a task; 3. confirm the sale order; 4. in Field Service, create a new task; 5. set Customer to `partner_id` used for shipping address; 6. select the relevant Sales Order Item; 7. add a product in catalog. Issue ----- After adding a product to the field service tas
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Have industry_fsm_sale from enterprise installed; 2. create a SO using a different `partner_id` for the shipping address; 3. add a product that uses…
Versions -------- - 17.0+ Steps ----- 1. Have industry_fsm_sale from enterprise installed; 2. create a SO using a different `partner_id` for the shipping address; 3. add a product that uses timesheets without creating a task; 3. confirm the sale order; 4. in Field Service, create a new task; 5. set Customer to `partner_id` used for shipping address; 6. select the relevant Sales Order Item; 7. add a product in catalog. Issue ----- After adding a product to the field service task, a new SO is created instead of adding it to the existing SO (as would be the case if the task was created by the SOL). Cause ----- When computing a task's `sale_order_id`, it checks whether the task's `partner_id` matches that of the sale order. FSM tasks generally use the `partner_shipping_id` instead, so if this one is different, `sale_order_id` is set to `False`. Solution -------- Aside from sale order's `partner_id`, also check its `partner_invoice_id` and `partner_shipping_id` when deciding whether the task should get linked to the SO. Also changes one of the dependent fields of the compute method from `project_id` to `project_id.sale_order_id`, assuming that when a task's `sale_order_id` is derived from its project's, changing the project's SO should trigger a recompute for the task's as well. opw-3901885 Forward-Port-Of: odoo/odoo#177509 Forward-Port-Of: odoo/odoo#175658
Currently, a traceback occurs when the user `posts journal entries` with `multiple expenses` in which one of the expense doesn't have a `date`. To reproduce this issue: 1) Install `Expense` 2) Create an expense report(expense sheet) with multiple expense lines 3) Remove one of the expense's date 4) Click Submit to Manager> Approve> Post Journal Entries Error: ``` TypeError: '>' not supported between instances of 'datetime.date' and 'bool' File "odoo/http.py", line 2248, in __
Original PR description
Currently, a traceback occurs when the user `posts journal entries` with `multiple expenses` in which one of the expense doesn't have a `date`. To reproduce this issue: 1) Install `Expense` 2) Create…
Currently, a traceback occurs when the user `posts journal entries` with `multiple expenses`
in which one of the expense doesn't have a `date`.
To reproduce this issue:
1) Install `Expense`
2) Create an expense report(expense sheet) with multiple expense lines
3) Remove one of the expense's date
4) Click Submit to Manager> Approve> Post Journal Entries
Error:
```
TypeError: '>' not supported between instances of 'datetime.date' and 'bool'
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 42, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.2/hr_expense_extract/models/hr_expense.py", line 199, in action_sheet_move_create
return super().action_sheet_move_create()
File "addons/hr_expense/models/hr_expense_sheet.py", line 558, in action_sheet_move_create
self._do_create_moves()
File "addons/sale_expense/models/hr_expense_sheet.py", line 119, in _do_create_moves
return super()._do_create_moves()
File "addons/hr_expense/models/hr_expense_sheet.py", line 700, in _do_create_moves
moves = self.env['account.move'].create([sheet._prepare_bills_vals() for sheet in own_account_sheets])
File "addons/hr_expense/models/hr_expense_sheet.py", line 700, in <listcomp>
moves = self.env['account.move'].create([sheet._prepare_bills_vals() for sheet in own_account_sheets])
File "addons/hr_expense/models/hr_expense_sheet.py", line 728, in _prepare_bills_vals
**self._prepare_move_vals(),
File "addons/hr_expense/models/hr_expense_sheet.py", line 749, in _prepare_move_vals
'date': self.accounting_date or max(self.expense_line_ids.mapped('date')) or fields.Date.context_today(self),
```
When the user clicks on the `Post Journal Entries` Button, it tries to create an expense report in which `_prepare_move_vals` method triggers.
In this method, the `max` function is used to get the date from `expense_line_ids`.
If any one of the expense lines doesn't have a date(date is not required) it leads to a traceback.
https://github.com/odoo/odoo/blob/607e454f65c2c60c4ee5169bc53706f24a8bc625/addons/hr_expense/models/hr_expense_sheet.py#L725-L732
After applying this commit, it will resolve this issue by filtering records with date and then the max function is used to get the maximum date.
sentry-5616738740
Forward-Port-Of: odoo/odoo#173613Issue: Signature command doesn't work in 16.0 and raises an error in 17.0+ Steps to reproduce the issue: - install website - add forum in the website - create a new post in the forum - add signature - (nothing happens in 16.0, error in 17.0) Origin of the issue: ==================== The session in the forum post view doesn't have `uid`. Solution: ======== Use `session.user_id` instead of `session.uid` which works in forum as well as in other apps. opw-4066436 Forward-Port-
Original PR description
Issue: Signature command doesn't work in 16.0 and raises an error in 17.0+ Steps to reproduce the issue: - install website - add forum in the website - create a new post in the forum - add signature - (nothing happens in 16.0, error in 17.0) Origin of the issue: ==================== The session in the forum post view doesn't have `uid`. Solution: ======== Use `session.user_id` instead of `session.uid` which works in forum as well as in other apps. opw-4066436 Forward-Port-Of: odoo/odoo#177414 Forward-Port-Of: odoo/odoo#175573
Spreadsheet filter side panels now use the shared side panel component from the spreadsheet engine instead of a separate Odoo-specific version. This keeps the experience visually consistent while reducing duplicated maintenance work.
Original PR description
After the revamping of the side panels, the component `SidePanelCollapsible` of o-spreadsheet now have the same style as the one we have in Odoo. We can remove the odoo's implementation and use the one from o-spreadsheet. Task: [4105418](https://www.odoo.com/web#id=4105418&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
Resolved issues and error corrections
Products added from a field service task now appear at the end of the related sales order, matching the expected line order. This prevents confusion for sales and operations teams when reviewing or updating orders after field service work.
Original PR description
Steps: - Create a SO with 2 SOL, among which one creates a task in fsm project upon SO confirmation. - Comfirm the SO and go to the related task. - Add a product and go back to the SO. Issue: - There's a new SOL, but it is in 2nd place, whereas it should be last. Cause: When you had SOLs directly in the SO, the 1st SOL of the SO has a sequence of 10, the 2nd - 11, etc. But when you had products via the task, it creates SOLs with sequence 10, which will always result in those lines starting in 2nd position, as they are ordered by sequence > id. Fix: Give the SOLs that are created from adding a product on the task the sequence of the last SOL. task-3768178
Code cleanup and technical improvements
This update tidies the Mail mobile code by improving documentation, aligning files with coding guidelines, and fixing linting issues. It helps make the module easier to maintain and reduces technical risk ahead of the upcoming major version freeze.
Miscellaneous changes
Forward-Port-Of: odoo/enterprise#68837
Original PR description
Forward-Port-Of: odoo/enterprise#68837
The voip model was overriding `static insert` method as if this works on a single record. For some time, this method works on multiple records, and its implementation detail has changed so assuming it does `get() ?? new()` is no longer guaranteed. The intent of override was to enrich data after them being assigned. This has been converted to an override of `update()`, which guarantees it being called whenever fields are updated on record, without making too much assumption in implementation d
Original PR description
The voip model was overriding `static insert` method as if this works on a single record. For some time, this method works on multiple records, and its implementation detail has changed so assuming it does `get() ?? new()` is no longer guaranteed. The intent of override was to enrich data after them being assigned. This has been converted to an override of `update()`, which guarantees it being called whenever fields are updated on record, without making too much assumption in implementation details of records. This commit also speeds up tests of VOIP, which were awaiting input that contains a value. This is not observed by mutation observer, so these tests took 3 seconds to execute. This PR puts the value in `data-value`, so that this is a mutation that can be observed by contains, thus reducting time of such test to mere dozens of ms. community: https://github.com/odoo/odoo/pull/177212 Forward-Port-Of: odoo/enterprise#68605
[IMP] account_online_synchronization: Show banner when fail connecting to existing account Issue: Sometimes the connection with the bank breaks for some reasons either the user remove the connection from the bank dashboard etc. And when the user press on 'fetch_transaction' in odoo, We will ask him to add the bank again without showing him anything to indicate the reason. Solution: Adding a banner in the widget to report that we are facing an issue connecting to the bank-account and show
Original PR description
[IMP] account_online_synchronization: Show banner when fail connecting to existing account Issue: Sometimes the connection with the bank breaks for some reasons either the user remove the connection from the bank dashboard etc. And when the user press on 'fetch_transaction' in odoo, We will ask him to add the bank again without showing him anything to indicate the reason. Solution: Adding a banner in the widget to report that we are facing an issue connecting to the bank-account and show it whenever the user face a problem connecting to existing account through the '_handle_odoofin_redirect_exception' which handle open the iframe whenever we face an issue connecting to an existing bank account Task-3355270 odoofin PR: https://github.com/odoo/odoofin/pull/263 Forward-Port-Of: odoo/enterprise#60184
Before this commit, the salesmen did not had the right group and the test crashed with the following error when the test was run without demo data: ``` FAIL: TestCommissions.test_commission_plan_rules_with_template Traceback (most recent call last): File "/data/build/enterprise/partner_commission/tests/test_commissions.py", line 221, in test_commission_plan_rules_with_template form.sale_order_template_id = so_template File "/data/build/odoo/odoo/tests/form.py", line 326, in __set
Original PR description
Before this commit, the salesmen did not had the right group and the test crashed with the following error when the test was run without demo data: ``` FAIL:…
Before this commit, the salesmen did not had the right group and the test crashed with the following error when the test was run without demo data:
```
FAIL: TestCommissions.test_commission_plan_rules_with_template
Traceback (most recent call last):
File "/data/build/enterprise/partner_commission/tests/test_commissions.py", line 221, in test_commission_plan_rules_with_template
form.sale_order_template_id = so_template
File "/data/build/odoo/odoo/tests/form.py", line 326, in __setattr__
self[field_name] = value
File "/data/build/odoo/odoo/tests/form.py", line 331, in __setitem__
assert field_info is not None, f"{field_name!r} was not found in the view"
AssertionError: 'sale_order_template_id' was not found in the view
```
runbot task: 70916 and 73195
https://runbot.odoo.com/web/#id=70916&view_type=form&model=runbot.build.error&menu_id=405&cids=1 https://runbot.odoo.com/web/#id=73195&view_type=form&model=runbot.build.error&menu_id=405&cids=1
Forward-Port-Of: odoo/enterprise#68863
Forward-Port-Of: odoo/enterprise#68829As per section 34(2) of CGST Act 2017, credit notes for invoices from the financial year cannot be included in GSTR after November 30th. With this commit, if any credit note is created after November 30th of the financial year, an alert will be displayed above the report with action which redirects to all those credit notes list so the user can easily remove tax from those credit notes. POT file also added for `l10n_in_reports`. **task**-3915664 Forward-Port-Of: odoo/enterprise#66824
Original PR description
As per section 34(2) of CGST Act 2017, credit notes for invoices from the financial year cannot be included in GSTR after November 30th. With this commit, if any credit note is created after November 30th of the financial year, an alert will be displayed above the report with action which redirects to all those credit notes list so the user can easily remove tax from those credit notes. POT file also added for `l10n_in_reports`. **task**-3915664 Forward-Port-Of: odoo/enterprise#66824