Daily updates from Odoo
Wednesday, March 13, 2024
13 changes · master
Enhancements to existing features
This update corrects spelling mistakes in internal comments and documentation within the Knowledge app code. It does not change how users interact with Knowledge, but it helps developers maintain the feature more easily and avoid repeated misspellings in tools.
Original PR description
Currently, there are a lot of typos in the comments and docstrings of the Knowledge codebase. This commit aims to fix those typos. The auto-completion algorithms implemented on most code editors should then stop suggesting misspelled words. task-3725136
Code cleanup and technical improvements
This update cleans up how automated test tours interact with embedded page content, making those tests simpler and more consistent. It helps reduce maintenance work and improves confidence in test coverage without changing the user-facing product.
Original PR description
In this commit, we change rest of triggers in tours where an iframe is selected (suite of #156653). To do this, we use the :iframe HOOT pseudo-selector. With this changes, we can now remove the getNodesFromSelector function in odoo/addons/web_tour/static/src/tour_service/tour_utils.js Note that in this previous function, a ([is-ready]="true") check was made for iframe elements but was only necessary for few of them (7). So, a stepUtils.waitIframeIsReady() has been added to check this state. task~3600484 https://github.com/odoo/odoo/pull/157217
Miscellaneous changes
The test for `sw` fails every time because we don't have identifiers. We don't have any, so we just get rid of the test. Also added the message to the error, so we can know why it failed. (Other tests failed some time, but we can't reproduce and know why it failed). Linked to runbot error 25908 Forward-Port-Of: odoo/enterprise#58443
Original PR description
The test for `sw` fails every time because we don't have identifiers. We don't have any, so we just get rid of the test. Also added the message to the error, so we can know why it failed. (Other tests failed some time, but we can't reproduce and know why it failed). Linked to runbot error 25908 Forward-Port-Of: odoo/enterprise#58443
Allow the user to set back the debit or credit to 0. It's a bug introduced by https://github.com/odoo/odoo/commit/c3793357d823273cb4297b0eb31308ad73a9dff8 Allow to create an opening balance for an account having a foreign currency. opw: 3665557 Forward-Port-Of: odoo/enterprise#58467 Forward-Port-Of: odoo/enterprise#56520
Original PR description
Allow the user to set back the debit or credit to 0. It's a bug introduced by https://github.com/odoo/odoo/commit/c3793357d823273cb4297b0eb31308ad73a9dff8 Allow to create an opening balance for an account having a foreign currency. opw: 3665557 Forward-Port-Of: odoo/enterprise#58467 Forward-Port-Of: odoo/enterprise#56520
Before this commit: Switching to RTL mode would inadvertently revert the domain picker, causing a disruption in the email format. The expected format is Alias@domain, but it was displaying as domain@alias. After this commit: Now, the domain picker remains intact in RTL mode, ensuring that the email format is correctly displayed as alias@domain. Task-3624012 Forward-Port-Of: odoo/enterprise#58364 Forward-Port-Of: odoo/enterprise#58251
Original PR description
Before this commit:
Switching to RTL mode would inadvertently revert the domain picker,
causing a disruption in the email format. The expected format is Alias@domain,
but it was displaying as domain@alias.
After this commit:
Now, the domain picker remains intact in RTL mode, ensuring that
the email format is correctly displayed as alias@domain.
Task-3624012
Forward-Port-Of: odoo/enterprise#58364
Forward-Port-Of: odoo/enterprise#58251when database uploaded without demo data and there is no any record in mrp production, and customer used load sample demo data, then it will create some demo record from this file which was actually defined in mrp/data/mrp_demo.xml with noupdate= True. but as this xmlids has been created from python file using load samples it's noupdate='f' . so without demo flag, we have `mrp.mrp_inventory_1` and `mrp.mrp_inventory_2` quant entry with noupdate='f' so during upgrade as there was no demo f
Original PR description
when database uploaded without demo data and there is no any record in mrp production, and customer used load sample demo data, then it will create some demo record from this file which was actually…
when database uploaded without demo data and there is no any record in mrp production, and customer used load sample demo data, then it will create some demo record from this file which was actually defined in mrp/data/mrp_demo.xml with noupdate= True.
but as this xmlids has been created from python file using load samples it's noupdate='f' .
so without demo flag, we have `mrp.mrp_inventory_1` and `mrp.mrp_inventory_2` quant entry with noupdate='f'
so during upgrade as there was no demo file loaded, and this entry are with noupdate='f'
ORM try to remove those record quants record
in `_process_end` during upgrade from 17.0 to
saas-17.1, and which was create issues as
that quant contain some qty for storable product
so after upgrade as this qunts removed we have mismatched qty compare to before upgrade ( original database) so to fix that we need to pass noupdate='t'
and also need to fix in upgrade script with force_noupdate TRue.
```
Traceback (most recent call last):
File "/tmp/tmpf_o_71pk/migrations/testing.py", line 207, in test_check
self.check(value)
File "/tmp/tmpf_o_71pk/migrations/stock/tests/test_on_hand_quantity.py", line 58, in check
self.assertEqual(before_results, self.convert_check(after_results), self.message)
AssertionError: Lists differ: [[3, '1'], [4, '4'], [6, '2'], [7, '5'], [8[541 chars]36']] != [[6, '2'], [7, '5'], [8, '2'], [9, '1'], [1[521 chars]36']]
First differing element 0:
[3, '1']
[6, '2']
```
Forward-Port-Of: odoo/enterprise#58007-master -saas-17.1 Steps to reproduce: - Open Help Desk app - Open any help-desk team - Click on search bar on the top Issue: - The issue here is that the SLA deadline filter in under properties which is separated and should be under Create Date filter Cause: - The SLA Deadline is added newly into the XML file but the field above i.e, Create Data is used as an Xpath(Field as an Xpath) to add a separator in a inherited record causing the the filter to be displaced Soluti
Original PR description
-master -saas-17.1 Steps to reproduce: - Open Help Desk app - Open any help-desk team - Click on search bar on the top Issue: - The issue here is that the SLA deadline filter in under properties which is separated and should be under Create Date filter Cause: - The SLA Deadline is added newly into the XML file but the field above i.e, Create Data is used as an Xpath(Field as an Xpath) to add a separator in a inherited record causing the the filter to be displaced Solution: - Changing the Xpath(Field as an Xpath) as SLA DeadLine allows the Properties filter to be added and SLA Deadline to be under Create Date Filter task-3707563 Forward-Port-Of: odoo/enterprise#55595
It makes it very difficult to translate Forward-Port-Of: odoo/enterprise#58254 Forward-Port-Of: odoo/enterprise#53297
Original PR description
It makes it very difficult to translate Forward-Port-Of: odoo/enterprise#58254 Forward-Port-Of: odoo/enterprise#53297
Current behavior: When trying to refund a pos order you had an error saying you can't refund the order. Steps to reproduce: - Create a pos order - Validate the order - Go in the backend without closing the session - Try to refund the order This was happening because here (https://github.com/odoo/odoo/blob/c1b86a946d74ea6fbd1d1932da5221ec770ed3a8/addons/point_of_sale/models/pos_order.py#L1050) we trigger this constrains (https://github.com/odoo/enterprise/blob/cc86cdefb375c60b0d1f26e74
Original PR description
Current behavior: When trying to refund a pos order you had an error saying you can't refund the order. Steps to reproduce: - Create a pos order - Validate the order - Go in the backend without closing the session - Try to refund the order This was happening because here (https://github.com/odoo/odoo/blob/c1b86a946d74ea6fbd1d1932da5221ec770ed3a8/addons/point_of_sale/models/pos_order.py#L1050) we trigger this constrains (https://github.com/odoo/enterprise/blob/cc86cdefb375c60b0d1f26e747bb5c2bc3b7f9e3/l10n_mx_edi_pos/models/pos_order.py#L269) but at this point in the code the lines aren't copied in the refund order and so it is triggering the error. To fix it we make sure to check that the order contains atleast one order line. opw-3750165 Forward-Port-Of: odoo/enterprise#58419 Forward-Port-Of: odoo/enterprise#58291
Issue: ----------- Even if the contract is archived, the contract is still visible in the contract menu. Fixed: -------------- If the contract is archived, then the contract will not be visible task-3522177 Forward-Port-Of: odoo/enterprise#48534
Original PR description
Issue: ----------- Even if the contract is archived, the contract is still visible in the contract menu. Fixed: -------------- If the contract is archived, then the contract will not be visible task-3522177 Forward-Port-Of: odoo/enterprise#48534
* Account 2104 'Prelevamenti extra gestione' was not referenced in the Balance Sheet. This account tracks withdrawals made by an individual entrepreneur during the fiscal year, before determination of profits, and therefore decreases capital. ([source1](https://www.wincoge2.it/Manuale%20Con%20Esempi/Manuale_Contabilita8.html#:~:text=I%20%E2%80%9CPrelevamenti%20extra%20gestione%E2%80%9D%20sono,nell'arco%20dell'anno.&text=Al%2031%2F12%20la%20voce,la%20destinazione%20dell'utile%20stesso.)) ([source
Original PR description
* Account 2104 'Prelevamenti extra gestione' was not referenced in the Balance Sheet. This account tracks withdrawals made by an individual entrepreneur during the fiscal year, before determination of profits, and therefore decreases capital. ([source1](https://www.wincoge2.it/Manuale%20Con%20Esempi/Manuale_Contabilita8.html#:~:text=I%20%E2%80%9CPrelevamenti%20extra%20gestione%E2%80%9D%20sono,nell'arco%20dell'anno.&text=Al%2031%2F12%20la%20voce,la%20destinazione%20dell'utile%20stesso.)) ([source2](https://www.economiaziendale.net/scritture/spese_extragestione.htm)) * The Current Year Earnings line was not showing just the result from the Profit and Loss for the current fiscal year. This has been fixed. Any non-closed results from previous fiscal years now automatically appear under the Previous Years' Earnings line. taskid: 3060790 Forward-Port-Of: odoo/enterprise#58393 Forward-Port-Of: odoo/enterprise#57219
The orm doesn't match monetary amounts using the related currency. It means, -208.73 != 208.730000000000002. Let's match the amount using an sql query instead. ticket_id: 3741689 X-original-commit: ae848e9 Forward-Port-Of: odoo/enterprise#58333
Original PR description
The orm doesn't match monetary amounts using the related currency. It means, -208.73 != 208.730000000000002. Let's match the amount using an sql query instead. ticket_id: 3741689 X-original-commit: ae848e9 Forward-Port-Of: odoo/enterprise#58333
Before this commit: Portal users could access template buttons even though they did not possess any templates, leading to undesired visibility. After this commit: Following this commit, template buttons will no longer be visible to portal users, ensuring appropriate access restrictions. Task-3758669 Forward-Port-Of: odoo/enterprise#58140 Forward-Port-Of: odoo/enterprise#57772
Original PR description
Before this commit: Portal users could access template buttons even though they did not possess any templates, leading to undesired visibility. After this commit: Following this commit, template buttons will no longer be visible to portal users, ensuring appropriate access restrictions. Task-3758669 Forward-Port-Of: odoo/enterprise#58140 Forward-Port-Of: odoo/enterprise#57772