Saturday, November 25, 2023
14 changes · master
Enhancements to existing features
Project tasks can now be directly connected to related purchase orders and manufacturing orders. This helps teams create and view procurement or production work from the task, improving visibility between project execution, purchasing, and manufacturing.
Original PR description
The purpose of this commit link tasks with purchase orders and manufacturing orders in-order to link the project and its task to purchase and manufacture so this way the user can directly create purchase orders and manufacturing orders related to the task. This commit adds a Purchase Order and Manufacturing Order action and stat button to create and see PO/MO related to the task. task-3095356
Miscellaneous changes
From odoo 16.4 we need run odoo with python >= 3.10 However Debian Bullseye can't run python > 3.9.2 from apt manager Now we use Debian Bookworm with python 3.11 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143517
Original PR description
From odoo 16.4 we need run odoo with python >= 3.10 However Debian Bullseye can't run python > 3.9.2 from apt manager Now we use Debian Bookworm with python 3.11 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143517
The unit prices should always be positives in the Peppol Bis 3 xml, otherwise, a validator will raise "[BR-27]-The Item net price (BT-146) shall NOT be negative.". Add a constraint in the code to ensure this. task-3607341 Forward-Port-Of: odoo/odoo#143531 Forward-Port-Of: odoo/odoo#143161
Original PR description
The unit prices should always be positives in the Peppol Bis 3 xml, otherwise, a validator will raise "[BR-27]-The Item net price (BT-146) shall NOT be negative.". Add a constraint in the code to ensure this. task-3607341 Forward-Port-Of: odoo/odoo#143531 Forward-Port-Of: odoo/odoo#143161
## [FIX] account_peppol: shorten cron interval Update participant status every 6 hours instead of once a day. Once a day is too slow for users and it looks as if something went wrong. ## [FIX] account_peppol: disable peppol for certain edi formats If the format set on a partner does not work for our peppol implementation, `enable_peppol` should be `False` and the checkbox should be hidden. This commit checks invalid partners when computing `enable_peppol` on account_move_send wizard. Sinc
Original PR description
## [FIX] account_peppol: shorten cron interval Update participant status every 6 hours instead of once a day. Once a day is too slow for users and it looks as if something went wrong. ## [FIX] account_peppol: disable peppol for certain edi formats If the format set on a partner does not work for our peppol implementation, `enable_peppol` should be `False` and the checkbox should be hidden. This commit checks invalid partners when computing `enable_peppol` on account_move_send wizard. Since we hide the checkbox in this case, we don't need to show the peppol warning when opening send&print to such partners. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143565 Forward-Port-Of: odoo/odoo#142166
*product_configurator, comparison, stock Before this commit, the option "Prevent Sale of Zero Price Product" would still allow some free products to be added to the cart (accessory, optional and alternative products). This commit makes sure no free product can be added to cart if this option is activated. task-2983615 Forward-Port-Of: odoo/odoo#143626 Forward-Port-Of: odoo/odoo#137298
Original PR description
*product_configurator, comparison, stock Before this commit, the option "Prevent Sale of Zero Price Product" would still allow some free products to be added to the cart (accessory, optional and alternative products). This commit makes sure no free product can be added to cart if this option is activated. task-2983615 Forward-Port-Of: odoo/odoo#143626 Forward-Port-Of: odoo/odoo#137298
During an onchange, fields read from database are validated again. This causes an infinite loop with HTML fields since Odoo 16 because we're revalidating a value we're reading from the database, which triggers a sanitize check, which fetches the original value, etc etc. Even if the functional bug only appears in 16.0 and above, the root cause is also present in 15.0 so this commit targets 15.0 steps to reproduce (in 16 or next versions): - Change Marc Demos's access rights Website = Res
Original PR description
During an onchange, fields read from database are validated again. This causes an infinite loop with HTML fields since Odoo 16 because we're revalidating a value we're reading from the database,…
During an onchange, fields read from database are validated again. This causes an infinite loop with HTML fields since Odoo 16 because we're revalidating a value we're reading from the database, which triggers a sanitize check, which fetches the original value, etc etc.
Even if the functional bug only appears in 16.0 and above, the root cause is also present in 15.0 so this commit targets 15.0
steps to reproduce (in 16 or next versions):
- Change Marc Demos's access rights Website = Restricted Editor
- Bypass HTML Field Sanitize = Off
- Inventory / Products / Product Variants
- Studio on the Sales tab and add website_description under Website Sequence
- Go to product [E-COM07] Large Cabinet and fill in the newly added website description
- Log out and log in as marc demo
- Navigate back to [E-COM07] Large Cabinet product variant and try to re-order the vendors on the purchase tab
- Error
before this commit:
Error (infinite loop) during onchange
```
File "/home/nda/dev/odoo/16.0/odoo/odoo/models.py", line 6489, in onchange
record[parent_name]._update_cache({name: record[name]})
File "/home/nda/dev/odoo/16.0/odoo/odoo/models.py", line 5310, in _update_cache
value = field.convert_to_cache(value, self, validate)
File "/home/nda/dev/odoo/16.0/odoo/odoo/fields.py", line 1977, in convert_to_cache
return self._convert(value, record, validate)
File "/home/nda/dev/odoo/16.0/odoo/odoo/fields.py", line 2000, in _convert
original_value = record[self.name]
File "/home/nda/dev/odoo/16.0/odoo/odoo/models.py", line 5897, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/nda/dev/odoo/16.0/odoo/odoo/fields.py", line 1198, in __get__
value = self.convert_to_cache(record._origin[self.name], record)
File "/home/nda/dev/odoo/16.0/odoo/odoo/fields.py", line 1977, in convert_to_cache
return self._convert(value, record, validate)
File "/home/nda/dev/odoo/16.0/odoo/odoo/fields.py", line 2000, in _convert
original_value = record[self.name]
...
```
after this commit:
no error
opw-3575865
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#143307
Forward-Port-Of: odoo/odoo#142045## [FIX] account_peppol: add a warning for Belgium Users need a helpful message for selecting the right EAS and Endpoint numbers. In Belgium it should always be 0208 according to BOSA, so we can display a warning message advising them to select that code for Belgian partners. ## [FIX] account_peppol: fix peppol ready We should only mark account moves as "Peppol ready" if it's a customer invoice/customer credit note. These are also the only types of account moves we should display when a us
Original PR description
## [FIX] account_peppol: add a warning for Belgium Users need a helpful message for selecting the right EAS and Endpoint numbers. In Belgium it should always be 0208 according to BOSA, so we can display a warning message advising them to select that code for Belgian partners. ## [FIX] account_peppol: fix peppol ready We should only mark account moves as "Peppol ready" if it's a customer invoice/customer credit note. These are also the only types of account moves we should display when a user wants to filter by "peppol ready" as this means they want to easily select all and send them via peppol in batch. This commit limits "Peppol Ready" to `out_invoice`, `out_refund`, `out_receipt`. task-3603416 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142688
Previously, the datetime field read the value for readonly directly in the attrs when extracting its props when available. This resulted in 2 separate bugs: - in debug mode, props validation of the datetime picker would fail, as it expects to receive a boolean for the `range` prop. This was caused by the fact that required was the raw attribute (a string) instead of the boolean and ended up being propagated to the `range` prop - outside of debug mode, the value for required did not cause a cr
Original PR description
Previously, the datetime field read the value for readonly directly in the attrs when extracting its props when available. This resulted in 2 separate bugs: - in debug mode, props validation of the…
Previously, the datetime field read the value for readonly directly in the attrs when extracting its props when available. This resulted in 2 separate bugs: - in debug mode, props validation of the datetime picker would fail, as it expects to receive a boolean for the `range` prop. This was caused by the fact that required was the raw attribute (a string) instead of the boolean and ended up being propagated to the `range` prop - outside of debug mode, the value for required did not cause a crash but any value for required that was not empty would be interpreted as truthy, causing the field to always be display itself as though it is required. In non-range mode, this is invisible, but in range mode, it would always show the second datetime input and the arrow between the beginning and end date, even with required being 0/False, or a python expression that may evaluate to false This commit fixes that by instead reading the value for required from the dynamic infos provided to `extractProps`, which will always be a boolean and contain the value of the evaluated expression when appropriate. Forward-Port-Of: odoo/odoo#143509
PR [1] removed the legacy error handler that swallowed promise rejection errors with anything else than an error (namely, the "legacyRejectPromiseHandler"). As a consequence, promise rejections done as "control flow" now lead to error dialogs being displayed. In particular, it happened on the website (with website_event_track installed), if the browser doesn't support service workers. This commit simply leaves the promise pending if the feature is unavailable. [1] https://github.com/odo
Original PR description
PR [1] removed the legacy error handler that swallowed promise rejection errors with anything else than an error (namely, the "legacyRejectPromiseHandler"). As a consequence, promise rejections done as "control flow" now lead to error dialogs being displayed. In particular, it happened on the website (with website_event_track installed), if the browser doesn't support service workers. This commit simply leaves the promise pending if the feature is unavailable. [1] https://github.com/odoo/odoo/pull/137702 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143516
Accounting > Reporting > Invoice Analysis Open Pivot View Collapse column group, expand by Date>Month StopInteration traceback will raise line: column = self._read_group_postprocess_aggregate(spec, next(column_iterator)) The error is caused by a missing interval attribute on the group by pivot view default search. This will make the view call `read_group` with a wrong groupby list ['invoice_date', 'invoice_date:month'], that will cause the error raise opw-3603433 Description
Original PR description
Accounting > Reporting > Invoice Analysis Open Pivot View Collapse column group, expand by Date>Month StopInteration traceback will raise line: column = self._read_group_postprocess_aggregate(spec, next(column_iterator)) The error is caused by a missing interval attribute on the group by pivot view default search. This will make the view call `read_group` with a wrong groupby list ['invoice_date', 'invoice_date:month'], that will cause the error raise opw-3603433 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143595
In the SEPA specification: "It is recommended that this element [ChrgBr] be specified at ‘Payment Information’ level." In odoo the ChrgBr was set at transaction level leading to some bank refusing the SEPA file. To follow the specification recommendation, ChrgBr is moved at the payment level. opw-3479639 Forward-Port-Of: odoo/enterprise#51376
Original PR description
In the SEPA specification: "It is recommended that this element [ChrgBr] be specified at ‘Payment Information’ level." In odoo the ChrgBr was set at transaction level leading to some bank refusing the SEPA file. To follow the specification recommendation, ChrgBr is moved at the payment level. opw-3479639 Forward-Port-Of: odoo/enterprise#51376
In odoo/enterprise#49562 the manager rights were reworked. As a result, payroll officer is no more able to open the app as they get 'read' access error for HR Contract records. This happens because _get_dashboard_warnings is reading the contracts of all the employees and with later changes payroll officer implies hr_contract.group_hr_contract_employee_manager, which has access to only their and subordinate employees' contracts. This commit grants to payroll officer hr_contract.group_hr_co
Original PR description
In odoo/enterprise#49562 the manager rights were reworked. As a result, payroll officer is no more able to open the app as they get 'read' access error for HR Contract records. This happens because _get_dashboard_warnings is reading the contracts of all the employees and with later changes payroll officer implies hr_contract.group_hr_contract_employee_manager, which has access to only their and subordinate employees' contracts. This commit grants to payroll officer hr_contract.group_hr_contract_manager rights again. Forward-Port-Of: odoo/enterprise#51380
When enterprise is installed as a package, importing this odoo.addons.account_avatax will raise an ImportError due to this missing file. @moduon MT-1075 Forward-Port-Of: odoo/enterprise#48669
Original PR description
When enterprise is installed as a package, importing this odoo.addons.account_avatax will raise an ImportError due to this missing file. @moduon MT-1075 Forward-Port-Of: odoo/enterprise#48669
Steps to reproduce: - Install Accounting and Documents - Go to Documents settings - Activate "Accounting" option (Workspace: Finance) and add a journal to synchronize (Journal: Customer Invoices - Workspace: Finance) - Go to Accounting and create an invoice - Click on Print button and select "Invoices" => The following Validation Error can be raised: "The operation cannot be completed: This attachment is already a document" (This issue depends on the speed of the platform and doesn't
Original PR description
Steps to reproduce: - Install Accounting and Documents - Go to Documents settings - Activate "Accounting" option (Workspace: Finance) and add a journal to synchronize (Journal: Customer Invoices -…
Steps to reproduce: - Install Accounting and Documents - Go to Documents settings - Activate "Accounting" option (Workspace: Finance) and add a journal to synchronize (Journal: Customer Invoices - Workspace: Finance) - Go to Accounting and create an invoice - Click on Print button and select "Invoices" => The following Validation Error can be raised: "The operation cannot be completed: This attachment is already a document" (This issue depends on the speed of the platform and doesn't always happen) Cause: When printing the invoice, an attachment is created, but no document is created in Documents immediately (as configured in Documents settings). Once the attachment created, it is loaded in the chatter and several calls are made to "register_as_main_attachment" method of the attachment. This method is triggering a write on the related record (i.e. the invoice), which tries to create a document (in Documents) from the attachment. When trying to create the document, it first checks if a document already exists for that attachment. But in some cases, there can be 2 concurrent calls where the first one has not finished creating the document when the second one checks if a document already exists. It then tries to create a second document for the attachment and triggers the SQL unique constraint. Solution: The creation of the document should not depend on the loading of the attachment in the chatter. It should be created when the attachment is created. So, when the first attachment of an account move is created, the related document will also be created. opw-3464593 Forward-Port-Of: odoo/enterprise#51114