Friday, August 9, 2024
34 changes · saas-17.4
Resolved issues and error corrections
Selecting an emoji in a new chat now properly marks the sender as active, so sending an emoji-only message adds them to the conversation. This prevents missed membership updates and makes chat behavior more reliable for users.
Original PR description
Purpose of the commit: Previously, when a new channel was created, sending an emoji as a message did not add the sender as a member. This was because selecting an emoji did not trigger the `notifyIsTyping`. To address this issue, `notifyIsTyping` is now triggered when an emoji is selected in the composer. task-4100450
This update prevents an error when users delete several PDF attachments linked to German invoices at the same time. It keeps attachment cleanup working reliably for German accounting records without changing normal invoicing behavior.
Original PR description
To reproduce (on runbot w/ demo datas) - Install l10n_de - Switch to "DE Company" - Create an invoice and add 2 or more PDF documents - Switch to debug mode - Go to menu: Settings / Technical /…
To reproduce (on runbot w/ demo datas)
- Install l10n_de
- Switch to "DE Company"
- Create an invoice and add 2 or more PDF documents
- Switch to debug mode
- Go to menu: Settings / Technical / Database Structure / Attachments
- Search for the added documents, select them all and try to delete them
=> This raise the following error:
```
Traceback (most recent call last):
File "/data/build/odoo/odoo/models.py", line 5961, in ensure_one
_id, = self._ids
^^^^
ValueError: too many values to unpack (expected 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
..
File "/data/build/odoo/odoo/addons/base/models/ir_attachment.py", line 610, in unlink
res = super(IrAttachment, self).unlink()
File "/data/build/odoo/odoo/models.py", line 4326, in unlink
func(self)
File "/data/build/odoo/addons/l10n_de/models/ir_attachment.py", line 25, in _except_audit_trail
if move and move.posted_before and move.country_code == 'DE':
^^^^^^^^^^^^^^^^^^
File "/data/build/odoo/odoo/fields.py", line 1204, in __get__
record.ensure_one()
File "/data/build/odoo/odoo/models.py", line 5964, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: account.move(347, 347)
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe Discuss sidebar now keeps the "Direct Messages" title steady when users expand or collapse the section. This removes a small visual distraction and makes navigation feel smoother.
Original PR description
**Current behavior before PR:** The title "Direct Messages" in the discuss sidebar used to flicker (move up and down) when expanding or folding the section. **Desired behavior after PR is merged:** The flickering issue is fixed, so now the title "Direct Messages" remains in place when the section is expanded or folded. **task**:4100682 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update stabilizes automated checks for the Attendance Gantt view by preventing unrelated messaging timers from affecting test results. It helps reduce false test failures and improves confidence in future attendance planning changes, without changing user-facing functionality.
Original PR description
In AttendanceGanttModel, open ended records have their dateStopField set to the current moment. So, depending on the way time passes, the gantt pills can have different ending columns. In the…
In AttendanceGanttModel, open ended records have their dateStopField set to the current moment. So, depending on the way time passes, the gantt pills can have different ending columns. In the hr_attendance_gantt tests, we use the hoot helper runAllTimers that accelerates time based on the registered timeouts. Since https://github.com/odoo/odoo/pull/175422, the service imStatusService registers timeouts with delay of 30 minutes. So runAllTimers often needs to advance time by steps of 30 minutes, sometimes more nondeterministically. This means that sometimes time has to advance more than 1 hours and this make some assertions on the pill ending columns fail. Here similarly to what is done in https://github.com/odoo/enterprise/pull/67088, we remove some services/main components only used by mail, so that imStatusService is no longer there and does no longer interfer with ours tests. We also take the oportunity to replace some calls to selectGanttRange by some clicks on the previous/next buttons. In that way, the intention behind the tests is clearer and time has to advance a bit less. This also corrects the wrong fix https://github.com/odoo/enterprise/pull/68033. Build 66645450
Miscellaneous changes
In some rare cases, the payment status poll can enter the post-processing of a given transaction and conflict with the post-processing triggered by a webhook notification, for the same transaction. If the transaction is linked to a sale.order, both transactions will try to add the partner as follower during the post-processing, leading to a violation of the unique constraint ensuring that two mail.followers rows won't target the same record and partner. psycopg2.errors.UniqueViolation: dup
Original PR description
In some rare cases, the payment status poll can enter the post-processing of a given transaction and conflict with the post-processing triggered by a webhook notification, for the same transaction. If the transaction is linked to a sale.order, both transactions will try to add the partner as follower during the post-processing, leading to a violation of the unique constraint ensuring that two mail.followers rows won't target the same record and partner. psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "mail_followers_mail_followers_res_partner_res_model_id_uniq" DETAIL: Key (res_model, res_id, partner_id)=(sale.order, 20205, 94178) already exists. This commit makes sure that this kind of psycopg exceptions are caught and retried so that this kind of error is not shown to the user and the polling is successfully triggered a second time. opw-4000159 Forward-Port-Of: odoo/odoo#175836
This commit's purpose is to rename the other costs & other revenues section to avoid id conflict with other section of the project profitability panel. 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#176078 Forward-Port-Of: odoo/odoo#171949
Original PR description
This commit's purpose is to rename the other costs & other revenues section to avoid id conflict with other section of the project profitability panel. 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#176078 Forward-Port-Of: odoo/odoo#171949
Before this commit: While generating an ewaybill we get the following traceback: ```log File "/home/odoo/odoo/community/addons/l10n_in_ewaybill_stock/models/l10n_in_ewaybill.py", line 418, in _generate_ewaybill_direct 'ewaybill_expiry_date': self._indian_timezone_to_odoo_utc( File "/home/odoo/odoo/community/addons/l10n_in_ewaybill_stock/models/l10n_in_ewaybill.py", line 433, in _indian_timezone_to_odoo_utc local_time = datetime.strptime(str_date, time_format) TypeError: strpti
Original PR description
Before this commit:
While generating an ewaybill we get the following traceback:
```log
File "/home/odoo/odoo/community/addons/l10n_in_ewaybill_stock/models/l10n_in_ewaybill.py", line 418, in _generate_ewaybill_direct
'ewaybill_expiry_date': self._indian_timezone_to_odoo_utc(
File "/home/odoo/odoo/community/addons/l10n_in_ewaybill_stock/models/l10n_in_ewaybill.py", line 433, in _indian_timezone_to_odoo_utc
local_time = datetime.strptime(str_date, time_format)
TypeError: strptime() argument 1 must be str, not None
```
After this commit:
We resolve the traceback it was caused due to
string to datetime conversion because we were
receving `None` value instead of datetime string
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#176183Steps to reproduce ================== As Admin: - Install project - Go to project - Click on the three dots on a project card - Select "Share" - Copy the link - Select the edit mode - Add "Joel Willis" to the recipients - Click on "Send" As portal in another browser (or in private navigation) - Paste the link - Type some random characters in the search bar so that no records are matched - remove the current filter => Every single column is displayed, for example `<field name
Original PR description
Steps to reproduce ================== As Admin: - Install project - Go to project - Click on the three dots on a project card - Select "Share" - Copy the link - Select the edit mode - Add "Joel…
Steps to reproduce
==================
As Admin:
- Install project
- Go to project
- Click on the three dots on a project card
- Select "Share"
- Copy the link
- Select the edit mode
- Add "Joel Willis" to the recipients
- Click on "Send"
As portal in another browser (or in private navigation)
- Paste the link
- Type some random characters in the search bar so that no records are matched
- remove the current filter => Every single column is displayed, for example
`<field name="sequence" readonly="1" column_invisible="True"/>`
As Admin:
- Go to the shared project settings
- Disable the "Milestones" checkbox
As portal:
- Refresh the page => The milestone column is still displayed
Cause of the issue
==================
The difference between invisible and column_invisible is that
`invisible` is meant to hide a cell in a row and is evaluated with the record data (`record.evalContextWithVirtualIds`).
`column_invisible` is meant to remove a column completely for the list, but is is not evaluated with the record. It only uses the context and a few more keys (`this.model.root.evalContext`).
It is thus not possible to hide an entire column depending on record values. It makes sense as the values could be different for every record displayed.
In this case though, there are a few fields that have the same values for every record. They are in fact related fields, declared on the project.
Those fields are
- allow_milestones
- allow_timesheets
The [ProjectSharingListRenderer] has been created to hide some columns from being displayed when a feature is disabled on the project displayed.
It works by evaluating the column_invisible with the first record. If there are no records, we skip any column_invisible processing,
When calling `setColumns` from `onWillUpdateProps`, we use `nextProps` for the columns, but still `this.props` to get the first record.
This means that we use an outdated first record, and this is why every column is displayed after removing the filter.
Another issue is that
During [View-Pocalypse],
In 16.0, the milestone_id field was
```xml
<field name="milestone_id" attrs="{'column_invisible': [('allow_milestones', '=', False)]}"/>
```
In 17.0, it is
```xml
<field name="milestone_id" invisible="not allow_milestones" context="{'default_project_id': project_id}" groups="project.group_project_milestone" optional="hide"/>
```
Solution
========
As there are some limitations to the js approach (when no records are in the list for example) and there is already a context key for the [allow_timesheets], we use a simpler approach to add the missing keys.
Finally, we put back the column_invisible attributes
---
[ProjectSharingListRenderer]: https://github.com/odoo/odoo/commit/ab2b5d1fd1f09d804ab410bc326cfebf26d5a7c6
[View-Pocalypse]: https://github.com/odoo/odoo/pull/104741
[allow_timesheets]: https://github.com/odoo/odoo/blob/d2a428c07fd728691e3ddd60fe4b7cc5e94455a6/addons/hr_timesheet/models/project_project.py#L290
opw-4015035
Forward-Port-Of: odoo/odoo#175906
Forward-Port-Of: odoo/odoo#172645- Open Accounting; - Open Bank Reconciliation; - Change the Company, to a company with not installed a chart of account. Before this commit, an infinity access error loop was raise. This occurs, because when an action is in an error on mounting on the action service, we try to mount the previous action, choose from a list of previously executed actions. The previous action, in this case, was also in error. In these case, it should go to the before last of the list, but as the previous
Original PR description
- Open Accounting; - Open Bank Reconciliation; - Change the Company, to a company with not installed a chart of account. Before this commit, an infinity access error loop was raise. This occurs, because when an action is in an error on mounting on the action service, we try to mount the previous action, choose from a list of previously executed actions. The previous action, in this case, was also in error. In these case, it should go to the before last of the list, but as the previous one wasn't removed. It will try to mount it again, and create an infinity loop. opw-[4076702](https://www.odoo.com/web#id=4076702&view_type=form&model=project.task) Forward-Port-Of: odoo/odoo#175979
Since [1], outdated websocket connections are refused by the server. However, the IOT connects to the websocket endpoint without passing any version. In order to pass the version, IOT devices should be updated which is cumbersome. This PR fixes the issue by enforcing this check for browsers only. [1]: https://github.com/odoo/odoo/pull/174962 Forward-Port-Of: odoo/odoo#176154
Original PR description
Since [1], outdated websocket connections are refused by the server. However, the IOT connects to the websocket endpoint without passing any version. In order to pass the version, IOT devices should be updated which is cumbersome. This PR fixes the issue by enforcing this check for browsers only. [1]: https://github.com/odoo/odoo/pull/174962 Forward-Port-Of: odoo/odoo#176154
This commit fixes an issue regarding down-payment calculation. ZATCA defines one rule to govern the way prepaid amounts (down-payment) is calculated, where PrepaidAmount = SUM([LINE.TaxableAmount + LINE.TaxAmount for LINE in invoice.invoice_line_ids]), obviously this poses a problem when we have a mix of down-payment and normal lines on our invoice since the formula does not differentiate between those. To fix this, we make sure that only down-payment lines actually include a Tax Subtotal breakd
Original PR description
This commit fixes an issue regarding down-payment calculation. ZATCA defines one rule to govern the way prepaid amounts (down-payment) is calculated, where PrepaidAmount = SUM([LINE.TaxableAmount +…
This commit fixes an issue regarding down-payment calculation. ZATCA defines one rule to govern the way prepaid amounts (down-payment) is calculated, where PrepaidAmount = SUM([LINE.TaxableAmount + LINE.TaxAmount for LINE in invoice.invoice_line_ids]), obviously this poses a problem when we have a mix of down-payment and normal lines on our invoice since the formula does not differentiate between those. To fix this, we make sure that only down-payment lines actually include a Tax Subtotal breakdown (TaxableAmount & TaxAmount) Description of the issue/feature this PR addresses: PrepaidAmount value in invoice XML, representing down-payment amounts, is Wrong, both on the XML and QR code associated, even though ZATCA returns a Valid submission status Current behavior before PR: PrepaidAmount value in invoice XML, representing down-payment amounts, is Wrong, both on the XML and QR code associated, even though ZATCA returns a Valid submission status Desired behavior after PR is merged: PrepaidAMount is calculated correctly on the XML invoice submitted to ZATCA and also represented correctly on the QR code --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174960
Since [1], Werkzeug 3.0.1 is used depending on the python version. Unlike its previous versions, Werkzeug 3.0.1's `url_quote` does not escape the single quote character to `%27` anymore. This causes an issue for cover images that use the computed `image_src` in a `background-image` CSS property using `url(...)` or `url('...')`. This commit restores the former behavior of `_compute_image_src` to avoid issues when its output is used in inadequately quoted CSS properties. Steps to rep
Original PR description
Since [1], Werkzeug 3.0.1 is used depending on the python version.
Unlike its previous versions, Werkzeug 3.0.1's `url_quote` does not
escape the single quote character to `%27` anymore.
This causes an issue for cover images that use the computed `image_src`
in a `background-image` CSS property using `url(...)` or `url('...')`.
This commit restores the former behavior of `_compute_image_src` to
avoid issues when its output is used in inadequately quoted CSS
properties.
Steps to reproduce:
- Use python_version >= '3.12' so that Werkzeug is 3.0.1.
- Create a new blog post.
- Set a cover image.
- Save.
=> Image is not displayed anymore because URL contains `'`.
[1]: https://github.com/odoo/odoo/commit/4a019ae9de64b260fe6b18d21f4624902b3bb880
task-4099056
Forward-Port-Of: odoo/odoo#175815Steps to reproduce: - In website edit mode. - Drop enough blocks into the page to have a vertical scrollbar. - Click on the header. - Select the "Vertical" template in the options of the header. - Select the "Fixed" scroll effect in the options of the header. - click on the logo in the header. - Enter "80px" in the "Height" input in the options of the "Navbar Logo". - Scroll the page to the bottom. - Then, scroll the page to the top. - Bug: the "Navbar Logo" overlaps the navbar links
Original PR description
Steps to reproduce: - In website edit mode. - Drop enough blocks into the page to have a vertical scrollbar. - Click on the header. - Select the "Vertical" template in the options of the header. - Select the "Fixed" scroll effect in the options of the header. - click on the logo in the header. - Enter "80px" in the "Height" input in the options of the "Navbar Logo". - Scroll the page to the bottom. - Then, scroll the page to the top. - Bug: the "Navbar Logo" overlaps the navbar links. This bug occurred because the header size was calculated before the transition animation for the header height was completed. opw-4078173 Forward-Port-Of: odoo/odoo#175653
When settling a sale order in PoS and using shiplater, there was no serial number on the ship later picking Steps to reproduce: ------------------- * Setup a product to be tracked by serial number * Update stock for this product and create 2 SN * Create an order with 2 quants of this product * Setup the PoS to allow ship later * Open PoS and load the sale order * Validate the order with ship later > Observation: The picking created for the pos order has no serial number Why the fi
Original PR description
When settling a sale order in PoS and using shiplater, there was no serial number on the ship later picking Steps to reproduce: ------------------- * Setup a product to be tracked by serial number *…
When settling a sale order in PoS and using shiplater, there was no serial number on the ship later picking Steps to reproduce: ------------------- * Setup a product to be tracked by serial number * Update stock for this product and create 2 SN * Create an order with 2 quants of this product * Setup the PoS to allow ship later * Open PoS and load the sale order * Validate the order with ship later > Observation: The picking created for the pos order has no serial number Why the fix: ------------ There is no serial number on the pos order picking because at the moment we try to create it the quantities are still reserved for the sale order To fix it we unreserve the quantities before creating the new picking. We also make sure that if not all the quantities are paid in the PoS, they are reserved again. https://github.com/odoo/odoo/pull/173389/files#diff-3f2dda6b95e58f16fb47dc8e8d49e369cc93ee700fbef7975c472514b1888a8aR105-R107 opw-4005925 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173389
When self ordering is enabled, default user should always be set. If it is not the case, self ordering pages would return access error Steps to reproduce: ------------------- * Enable self order (kiosk/menu/menu+ordering) * Remove default user from pos config * Try to open the self order page > Observation: you get an access error opw-4076798 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175358
Original PR description
When self ordering is enabled, default user should always be set. If it is not the case, self ordering pages would return access error Steps to reproduce: ------------------- * Enable self order (kiosk/menu/menu+ordering) * Remove default user from pos config * Try to open the self order page > Observation: you get an access error opw-4076798 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175358
Before this commit, the computation of the orderLine taxed list price incorrectly used the selected order's fiscal position, even for paid orders. This could lead to inaccurate pricing in certain scenarios. opw-4093746 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175995
Original PR description
Before this commit, the computation of the orderLine taxed list price incorrectly used the selected order's fiscal position, even for paid orders. This could lead to inaccurate pricing in certain scenarios. opw-4093746 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175995
Before this commit, searching for a sale order with a partner name containing special characters (e.g., &) would fail to correctly filter the sale orders. This commit ensures that partner names with special characters are properly handled, allowing for accurate sale order searches. opw-4062365 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174225
Original PR description
Before this commit, searching for a sale order with a partner name containing special characters (e.g., &) would fail to correctly filter the sale orders. This commit ensures that partner names with special characters are properly handled, allowing for accurate sale order searches. opw-4062365 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174225
In Point of Sale > Configuration > Settings enable 'Global Discounts' Create a tax [TAX A] included in price Create a tax [TAX G] as group of taxes, including only [TAX A] Configure a product [PROD] with [TAX G] Open POS session Add [PROD], hit 'Discount' button, add 50% discount Issue: Tax will not be included in the discount This occurs because the system does not take into account the tax group opw-3576452 Forward-Port-Of: odoo/odoo#169996 Forward-Port-Of: odoo/odoo#146337
Original PR description
In Point of Sale > Configuration > Settings enable 'Global Discounts' Create a tax [TAX A] included in price Create a tax [TAX G] as group of taxes, including only [TAX A] Configure a product [PROD] with [TAX G] Open POS session Add [PROD], hit 'Discount' button, add 50% discount Issue: Tax will not be included in the discount This occurs because the system does not take into account the tax group opw-3576452 Forward-Port-Of: odoo/odoo#169996 Forward-Port-Of: odoo/odoo#146337
Create a sale order connected to an analytic account. Create a vendor bill and on the line: - use the same analytic account - add a price such that the abnormal_amount_warning is triggered. (example: 20000000001) - add a product line in the vendor bill which can be expensed and which has reinvoice expenses policy set to “Cost” Click on Confirm, the warning will show, click on “Confirm” again Issue: An error related to stock move record will show This occurs because in order to show th
Original PR description
Create a sale order connected to an analytic account. Create a vendor bill and on the line: - use the same analytic account - add a price such that the abnormal_amount_warning is triggered. (example: 20000000001) - add a product line in the vendor bill which can be expensed and which has reinvoice expenses policy set to “Cost” Click on Confirm, the warning will show, click on “Confirm” again Issue: An error related to stock move record will show This occurs because in order to show the warning wizard we add in context `default_move_ids` Then we don't cleanup the context, so if, during post, an inventory-related flow is triggered, it may accidentally use the context flag still set, raising an error as it will look for the wrong record opw-4021038 Forward-Port-Of: odoo/odoo#174894
**Current behavior before PR:** If a partner has `im_status` set to `away/bot` or is on leave, causing their `im_status` to be suffixed with `leave_`, they were placed into the `Offline` category. While except if they are `offline` they should have been placed in `Online` category. **Desired behavior after PR is merged:** If a member has `offline/im_partner` status, only then they are placed into `Offline` category. **Task**-[4101827](https://www.odoo.com/odoo/project.task/4101827)
Original PR description
**Current behavior before PR:** If a partner has `im_status` set to `away/bot` or is on leave, causing their `im_status` to be suffixed with `leave_`, they were placed into the `Offline` category. While except if they are `offline` they should have been placed in `Online` category. **Desired behavior after PR is merged:** If a member has `offline/im_partner` status, only then they are placed into `Offline` category. **Task**-[4101827](https://www.odoo.com/odoo/project.task/4101827) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176179 Forward-Port-Of: odoo/odoo#176031
Since commit odoo/odoo@adb5357e7f93f2cba70acc576a597ea78bd1de42, we have added a new DIV (`o_form_view_container`) around the form view. But the CSS selector for the sticky control panel was not adapted so the feature was not working anymore. This commit fixes the CSS selector. Steps to reproduce: * Open Odoo on small screen * Open the Contact App * Select a contact * Try to scroll down and up into the form view => Bug the control panel is not sticky Note : backport of PR 176015
Original PR description
Since commit odoo/odoo@adb5357e7f93f2cba70acc576a597ea78bd1de42, we have added a new DIV (`o_form_view_container`) around the form view. But the CSS selector for the sticky control panel was not adapted so the feature was not working anymore. This commit fixes the CSS selector. Steps to reproduce: * Open Odoo on small screen * Open the Contact App * Select a contact * Try to scroll down and up into the form view => Bug the control panel is not sticky Note : backport of PR 176015 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176164
If for some reason you want to apply taxes on the gift card reward, they were not correctly applied. Steps to reproduce: ------------------- * Create a gift card program * Find the gift card reward product in the program * Add some taxes to it * Open a PoS session, add some product and use a gift card > Observation: The tax on the gift card product is not taken into account Why the fix: ------------ When generating the gift card we force all taxes to be included in price this wa
Original PR description
If for some reason you want to apply taxes on the gift card reward, they were not correctly applied. Steps to reproduce: ------------------- * Create a gift card program * Find the gift card reward product in the program * Add some taxes to it * Open a PoS session, add some product and use a gift card > Observation: The tax on the gift card product is not taken into account Why the fix: ------------ When generating the gift card we force all taxes to be included in price this way the value of the gift card is not modified, but the taxes are applied opw-3916989 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174414 Forward-Port-Of: odoo/odoo#170590
Due to the `qty_to_order` field on `stock.orderpoint` being a stored computed field, it needs to be recalculated every time one or more of its dependencies could have changed, to keep a consistent record in the database. It is, however, dependent on the `qty_forecast` field which is a non-stored computed field, depending itself on all the stock moves that are linked to the product set on the orderpoint. This results in a complete recalculation of the `qty_on_hand`, `qty_forecast` and `qty_to_o
Original PR description
Due to the `qty_to_order` field on `stock.orderpoint` being a stored computed field, it needs to be recalculated every time one or more of its dependencies could have changed, to keep a consistent…
Due to the `qty_to_order` field on `stock.orderpoint` being a stored computed field, it needs to be recalculated every time one or more of its dependencies could have changed, to keep a consistent record in the database. It is, however, dependent on the `qty_forecast` field which is a non-stored computed field, depending itself on all the stock moves that are linked to the product set on the orderpoint. This results in a complete recalculation of the `qty_on_hand`, `qty_forecast` and `qty_to_order` on ALL the orderpoints linked to a product every time some `stock.move` has been touched or created with that product. Even if many of those orderpoints may not even be located in the concerned warehouse. This situation can create a performance bottleneck when just processing pickings, as its constantly (and often pointlessly) recalculating these field values to store. This becomes a major issue in case the concerned database contains many warehouses with many different orderpoints. This issue is remedied in a more permanent way for master in [1], but due to the stable policy we use a different approach here: The `qty_to_order` field on `stock.orderpoint` is now no longer dependent on `qty_forecast`. Instead, when creating `stock.moves` or writing on its `state`, `product_uom_qty` or `date` fields, we manually trigger a recalculation of the `qty_to_order` on all the orderpoints on the relevant product, but only in the relevant warehouses. In case there is no relevant warehouse for the `stock.move` (none on the source or destination move), we fall back to the previous behavior of recalculating `qty_to_order` for all orderpoints linked to the product. [1] https://github.com/odoo/odoo/pull/159432 task-3822497 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176073 Forward-Port-Of: odoo/odoo#164300
Steps to reproduce : -------------------------- - Install pos and l10n_in - Go to products - Create a product with HSN code and set tax - Open a session - Add that product to cart - Order and pay the bill Issue : ------- Opened reciept doesn't contain tax information on the HSN summary section Cause : --------- Trying to fetch data which wasn't sent from arguments causing the related computations NaN and 0. Fix : ----- Passed the argument correctly. task: 4095698 Forwa
Original PR description
Steps to reproduce : -------------------------- - Install pos and l10n_in - Go to products - Create a product with HSN code and set tax - Open a session - Add that product to cart - Order and pay the bill Issue : ------- Opened reciept doesn't contain tax information on the HSN summary section Cause : --------- Trying to fetch data which wasn't sent from arguments causing the related computations NaN and 0. Fix : ----- Passed the argument correctly. task: 4095698 Forward-Port-Of: odoo/odoo#175800
Description of the issue this commit addresses: Wrong invoice label for the tax 25.5 which shows 25%. --- Desired behavior after this commit is merged: The tax has the label 25.5% on invoices. --- no task-feedback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175908
Original PR description
Description of the issue this commit addresses: Wrong invoice label for the tax 25.5 which shows 25%. --- Desired behavior after this commit is merged: The tax has the label 25.5% on invoices. --- no task-feedback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175908
Before this commit: Some softwares do not follow the specification. Our users cannot import the generated XAF file in other softwares because the docRef length is more than 35 characters. After this commit: We allow our users to create a system parameter to change the docRef length if they need to import the XAF file in another software. opw-3792115 opw-3829459 Forward-Port-Of: odoo/enterprise#68174 Forward-Port-Of: odoo/enterprise#66551
Original PR description
Before this commit: Some softwares do not follow the specification. Our users cannot import the generated XAF file in other softwares because the docRef length is more than 35 characters. After this commit: We allow our users to create a system parameter to change the docRef length if they need to import the XAF file in another software. opw-3792115 opw-3829459 Forward-Port-Of: odoo/enterprise#68174 Forward-Port-Of: odoo/enterprise#66551
This is needed to evaluate this column_invisible expression https://github.com/odoo/enterprise/blob/985c085edc66ccb27311a94cfb16f27b06d7bfec/industry_fsm_sale/views/project_sharing_views.xml#L69 opw-4015035 Forward-Port-Of: odoo/enterprise#68110
Original PR description
This is needed to evaluate this column_invisible expression https://github.com/odoo/enterprise/blob/985c085edc66ccb27311a94cfb16f27b06d7bfec/industry_fsm_sale/views/project_sharing_views.xml#L69 opw-4015035 Forward-Port-Of: odoo/enterprise#68110
This commit refactors the generation of pretty printed raw xml string to a helper function in `l10n_mx_edi.document` for `l10n_mx_edi` and `l10n_mx_reports`. It modifies the xml declaration to be a custom generated string, which only difference from the normal one is that it uses double quoted string rather than single quoted string in it. This way, the top file of the generated xml string will look like this: ```xml <?xml version="1.0" encoding="UTF-8"?> ``` This ensures as mu
Original PR description
This commit refactors the generation of pretty printed raw xml string to a helper function in `l10n_mx_edi.document` for `l10n_mx_edi` and `l10n_mx_reports`. It modifies the xml declaration to be a custom generated string, which only difference from the normal one is that it uses double quoted string rather than single quoted string in it. This way, the top file of the generated xml string will look like this: ```xml <?xml version="1.0" encoding="UTF-8"?> ``` This ensures as much support as possible from third party vendors because some do not consider single quoted string to be valid (even though it should be). related opw-4085399 task-id: no task Forward-Port-Of: odoo/enterprise#67963
Before this commit: An exception was raised if the location was failing to retrieve necessary information. Example: ``` ElementTree.SubElement(ship_from_, 'AddressFieldOne').text = location_.street[:180] TypeError: 'bool' object is not subscriptable ``` After this commit: A more user-friendly error message is shown indicating more clearly the problematic record and missing information opw-3936775 Forward-Port-Of: odoo/enterprise#62967
Original PR description
Before this commit: An exception was raised if the location was failing to retrieve necessary information. Example: ``` ElementTree.SubElement(ship_from_, 'AddressFieldOne').text = location_.street[:180] TypeError: 'bool' object is not subscriptable ``` After this commit: A more user-friendly error message is shown indicating more clearly the problematic record and missing information opw-3936775 Forward-Port-Of: odoo/enterprise#62967
### Fixes in ATS report: - Remove foreign documents '15' and '110'. SRI DIMM returns a validation error  - In sales, filter by commercial partner and not by partner because there may be different addresses (the ATS validates by ID number). - In sales, change the emission point to entity point (tag "codEstab" and "numEstabRuc"). As it says the Technical Sheet of ATS 
- In sales, filter by commercial partner and not by partner because there may be different addresses (the ATS validates by ID number).
- In sales, change the emission point to entity point (tag "codEstab" and "numEstabRuc"). As it says the Technical Sheet of ATS

- In sales, Get all the establishments registered at the SRI (tag "ventasEstablecimiento"). As it says the Technical Sheet of ATS

- Fix Unit tests
Forward-Port-Of: odoo/enterprise#67060### Steps to reproduce * install python 3.12 * install odoo's python required libraries (requirements.txt) * install `l10n_ar_edi` * switch to an Argentinean company * in the Invoicing settings, under the AFIP Web Services section, click 'Test Connections' You should be met with the following error: `AttributeError: module 'lib' has no attribute 'PKCS7_sign'` ### Cause `PKCS7_sign()` was removed in recent version of `pyopenssl`. opw-4085411 opw-4085389 Forward-Port-Of: odoo/ent
Original PR description
### Steps to reproduce * install python 3.12 * install odoo's python required libraries (requirements.txt) * install `l10n_ar_edi` * switch to an Argentinean company * in the Invoicing settings, under the AFIP Web Services section, click 'Test Connections' You should be met with the following error: `AttributeError: module 'lib' has no attribute 'PKCS7_sign'` ### Cause `PKCS7_sign()` was removed in recent version of `pyopenssl`. opw-4085411 opw-4085389 Forward-Port-Of: odoo/enterprise#68024
Steps to reproduce: 1. Create a product and add stock in the following location: WH/Stock/Shelf 2 2. Create a field service task and add this product 3. validate the task, the transfer will happen from WH/Stock Bug: If you validate the Sale Order, then the transfer, then the field service task, then transfer will happen from WH/Stock/Shelf 2 (as expected) Fix: apply same logic as for serial tracked products opw-3835698 Forward-Port-Of: odoo/enterprise#67499 Forward-Port-Of: odoo/e
Original PR description
Steps to reproduce: 1. Create a product and add stock in the following location: WH/Stock/Shelf 2 2. Create a field service task and add this product 3. validate the task, the transfer will happen from WH/Stock Bug: If you validate the Sale Order, then the transfer, then the field service task, then transfer will happen from WH/Stock/Shelf 2 (as expected) Fix: apply same logic as for serial tracked products opw-3835698 Forward-Port-Of: odoo/enterprise#67499 Forward-Port-Of: odoo/enterprise#65316
**Current behavior:** There are several related bugs when operating in a multi-company environment with the barcode app: *Given:* we have three companies in the selector (A, B, C) where company A is the first/default/primary of the three. ***Case 1: (CompanyB and CompanyC are checked, either can be focused)*** 1) Scanning the barcode for CompanyC's manufacturing operation and then, within the barcode view, scanning a product which belongs exclusively to CompanyB will make it impossib
Original PR description
**Current behavior:** There are several related bugs when operating in a multi-company environment with the barcode app: *Given:* we have three companies in the selector (A, B, C) where company A is…
**Current behavior:** There are several related bugs when operating in a multi-company environment with the barcode app: *Given:* we have three companies in the selector (A, B, C) where company A is the first/default/primary of the three. ***Case 1: (CompanyB and CompanyC are checked, either can be focused)*** 1) Scanning the barcode for CompanyC's manufacturing operation and then, within the barcode view, scanning a product which belongs exclusively to CompanyB will make it impossible to use the back button (despite the product correctly not being added as a line in the operation). 2) Repeating the setup with a different operation type (e.g., receipt) *will* add the product to the picking but it will not be possible to validate/take out of draft from either the barcode app nor from the backend. ***Case 2: (only CompanyC checked and focused)*** 1) Scanning the barcode for CompanyC's manufacturing operation type will open the barcode operation view for CompanyA's manufacture operation. Products available to CompanyC can be added. Trying to validate the order will cause an access error, however the MO is still created in the backend. 2) Scanning the barcode for either CompanyB or CompanyA's non-manufacturing operations will show an access error dialog, but an (empty) transfer will still be created in the backend for the respective company. --- **Expected behavior:** In case 1, scanning a product which is not available to the current company should not trap the user in the barcode operation view. It should also not add these inaccessible products to a picking thereby making them unable to be validated. In case 2, we should respect the company defined on a manufacturing operation type which corresponds to a scanned barcode. Additionally, it should not be possible to create empty transfers for companies which are not currently checked/active. --- **Cause of the issue:** Problem 1: production records (unlike pickings) cannot be created until a product is added in the barcode view. Because of this different flow, they are created with less context than other operation types and there was no mechanism by which their `company_id` could be inferred. This caused them to use the default value as defined in the `MrpProduction` model (`self.env.company`)- which is problematic in the barcode app, as this field does not actually correspond to the focused/active company. Problem 2: when scanning a picking type from the main menu of the barcode app, the company of the picking type was not getting respected which would cause a new picking record to be created even when the current user/environment did not have permission. --- **Fix:** 1. Create production records using a default `company_id` value informed by their `picking_type_id` rather than the environment 2. In the main_menu barcode scan route, use the current user's allowed company ids (from their cookies) to restrict searchable records 3. When scanning products in a barcode operation view, use the company_id of the opened operation type to restrict the domain of searchable records. opw-3999622 Forward-Port-Of: odoo/enterprise#67134 Forward-Port-Of: odoo/enterprise#65433
This traceback arises when the user adds an existing attendee email to a guest email while adding a guest. To reproduce this traceback: 1) Install `website_appointment` 2) Choose any `appointment` from the website 3) Click on `Appointment Type` in the right corner and on the `options page` enable `Allow Guests` 4) Get back to the website and select one user, date & time 5) Now give Email value as email in Guests 6) Confirm Appointment Error:- ``` ValueError: Expected single
Original PR description
This traceback arises when the user adds an existing attendee email to a guest email while adding a guest. To reproduce this traceback: 1) Install `website_appointment` 2) Choose any `appointment`…
This traceback arises when the user adds an existing attendee email to a guest email while adding a guest. To reproduce this traceback: 1) Install `website_appointment` 2) Choose any `appointment` from the website 3) Click on `Appointment Type` in the right corner and on the `options page` enable `Allow Guests` 4) Get back to the website and select one user, date & time 5) Now give Email value as email in Guests 6) Confirm Appointment Error:- ``` ValueError: Expected singleton: calendar.attendee(4762, 4763) ``` When the user adds a guest with the current user email, multiple attendees will be created with the same partner ID in a calendar event (see below) https://github.com/odoo/enterprise/blob/1aff50d91fad45221377591b80ca8b1df2ecb593/appointment/models/appointment_type.py#L944-L955 This leads to the above traceback from here https://github.com/odoo/enterprise/blob/1aff50d91fad45221377591b80ca8b1df2ecb593/appointment/controllers/calendar.py#L103 This commit will resolve the issue by filtering out the existing attendees while creating a new attendee from the guest email. sentry-5646921453 Forward-Port-Of: odoo/enterprise#67516