Wednesday, August 28, 2024
10 changes · saas-17.2
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
Issue ----- Error when multiple input lines on a payslip are of the same type. Steps ----- [hr_payroll] 1. Create a salary attachment for an employee, type "Attachment of salary", with a monthly amount and total amount A. 2. Create another salary attachment for the same employee, same type and monthly amount and total amount B different from A. 3. Create a payslip for the employee, create a contract with a start date matching the salary attachment date. On "Other Inputs", remove the "A
Original PR description
Issue ----- Error when multiple input lines on a payslip are of the same type. Steps ----- [hr_payroll] 1. Create a salary attachment for an employee, type "Attachment of salary", with a monthly amount and total amount A. 2. Create another salary attachment for the same employee, same type and monthly amount and total amount B different from A. 3. Create a payslip for the employee, create a contract with a start date matching the salary attachment date. On "Other Inputs", remove the "Attachment of salary" line. Create two input lines of type "Attachment of salary", one with amount A and another with amount B. 4. Compute sheet > Confirm > Mark as paid > ** Error ** Cause ----- Generally, input lines of the same type on a payslip will be merged in one input line, but it is not the case if there are multiple salary attachments of the same type matching these input lines. opw-4066851 Forward-Port-Of: odoo/enterprise#68682 Forward-Port-Of: odoo/enterprise#68441
**Current behavior:** In Barcode, it is possible for a split of incomplete moves to be triggered which leaves the original move with a quantity and demand of zero- effectively generating a superfluous record value. **Expected behavior:** A split should not occur when the original line has `quantity == 0`. **Steps to reproduce:** 1. Create a transfer for 2 units of some product, assign it 2. Open the transfer in Barcode and use the form to add 1 unit 3. Use the back button with
Original PR description
**Current behavior:** In Barcode, it is possible for a split of incomplete moves to be triggered which leaves the original move with a quantity and demand of zero- effectively generating a…
**Current behavior:**
In Barcode, it is possible for a split of incomplete moves to be
triggered which leaves the original move with a quantity and
demand of zero- effectively generating a superfluous record
value.
**Expected behavior:**
A split should not occur when the original line has
`quantity == 0`.
**Steps to reproduce:**
1. Create a transfer for 2 units of some product, assign it
2. Open the transfer in Barcode and use the form to add 1 unit
3. Use the back button within the Barcode app to return to the
previous action
4. Reopen the transfer, set the quantity on the move to 0 from 1
5. Use the back button to exit the transfer again
6. Open the transfer in the backend to see there is a move with
a line for 0 / 0 units.
**Cause of the issue:**
We split moves if their quantity is less than demand without
considering it may be zero.
**Fix:**
Reset the move in the case of `quantity == 0`- thus it will no
longer become a split candidate.
opw-4056241
Forward-Port-Of: odoo/enterprise#68554The version of the csv is now 7.0. Adapt the headers to it, they must now all be present. The values don't seem to have changed, at least the ones required that we provide. task-4131986 Forward-Port-Of: odoo/enterprise#68853 Forward-Port-Of: odoo/enterprise#68796
Original PR description
The version of the csv is now 7.0. Adapt the headers to it, they must now all be present. The values don't seem to have changed, at least the ones required that we provide. task-4131986 Forward-Port-Of: odoo/enterprise#68853 Forward-Port-Of: odoo/enterprise#68796
Community PR: https://github.com/odoo/odoo/pull/175988 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 noth
Original PR description
Community PR: https://github.com/odoo/odoo/pull/175988 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…
Community PR: https://github.com/odoo/odoo/pull/175988 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/enterprise#68087
When filling big numbers (10+ digits) in the input field with Actual Demand/Replenishment activated, the field limits itself to 38% of the cell width, which then crops the number inside. This fix replace the inline-flex by a normal flex, as well as removes the max-width. This way if Actual Demand/Replenishment is activated, it will be shown over 2 lines in the cell. fp-request Forward-Port-Of: odoo/enterprise#66164
Original PR description
When filling big numbers (10+ digits) in the input field with Actual Demand/Replenishment activated, the field limits itself to 38% of the cell width, which then crops the number inside. This fix replace the inline-flex by a normal flex, as well as removes the max-width. This way if Actual Demand/Replenishment is activated, it will be shown over 2 lines in the cell. fp-request Forward-Port-Of: odoo/enterprise#66164
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…
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