Daily updates from Odoo
Tuesday, March 12, 2024
5 changes
Resolved issues and error corrections
This update fixes a critical bug in analytic accounting that was causing errors when viewing project updates after recent changes to how accounting IDs are stored. The system was not properly handling the new format for storing multiple analytic accounts, which prevented users from accessing project financial information. This fix ensures all accounting modules correctly process analytic data in the new format.
Original PR description
### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill…
### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill 5. Add a Product Line and put both accounts in the Analytic Distribution 6. Add an account in another column to one of the existing Analytic Distribution Lines 7. Go to Projects and open the Project Updates of the Project whose account was alone in the Analytic Distribution Line 8. You get the error: > invalid literal for int() with base 10: '[int],[int]' ### Explanation: With commit odoo@dc696c8ed4850a83b6af721002a90f2944891923, the way IDs are stored changed. They are now computed in a csv string. A part of the Analytic Accounting pipeline didn't get updated after that change, making a lot of the features not working properly. ### Suggested fix: - We must take into account the multiple analytic plans in any order possible in the ID search. - Because the amount of `account.move.line` can increase rapidly, the new ID search must be indexable. - We reworked the counting query to avoid `account.move` being counted multiple times. opw-3626619
This fix prevents inventory quantity records from being incorrectly deleted during system upgrades. When demo data is loaded after initial setup, certain inventory records were marked as temporary and would be removed during upgrades, causing inventory counts to become inaccurate. The fix marks these records as permanent so they are preserved during upgrades.
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']
```Fixed two critical issues in Italian financial reporting: added missing account 2104 (owner withdrawals) to the Balance Sheet so it properly reflects capital changes, and corrected the Current Year Earnings line to show only the current year's profit/loss results while automatically moving prior year earnings to the appropriate section. These fixes ensure Italian companies' financial statements now balance correctly and comply with accounting standards.
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
This fix corrects how products are packaged when using batch picking with the "Put in Pack" feature. Previously, products from multiple pickings could be incorrectly placed in the same package, causing inventory and shipping issues. The update ensures each picking's products are packaged separately and prevents invalid packaging scenarios that could result in double charges or incorrect shipping documents.
Original PR description
Previous fix: odoo/odoo#139013 added in the ability to handle a use case specific avoided due to its complexity and it being an edge case. I.e. the ability to do a Put in Pack in a batch picking…
Previous fix: odoo/odoo#139013 added in the ability to handle a use case specific avoided due to its complexity and it being an edge case. I.e. the ability to do a Put in Pack in a batch picking where there is a shipping connector involved (i.e. when the `choose_delivery_package` wizard is opened). Because the ability to handle this situation is now added to stable, we have to sort of support it now and handle it not breaking other flows. Here are the flows that need to be handled (and were broken by the previous PR): [In all cases, "Packages" setting needs to be activated and each picking needs at least 1 move of a consumable/storable product] Flow 1: batch picking + put in pack for single picking - Create 2 pickings of any operation type - Create a new batch picking with these 2 pickings - Open 1 of those pickings directly (i.e. not in the batch) - Click on "Put in Pack" Expected result: Only the move from the open picking is put into a package Result before this commit: Both pickings have their moves put into the same package Additional notes: Because this is not an obvious bug, users may already had this bug occur in their DBs without realizing it === Flow 2: batch picking (or multi-record calling of `action_put_in_pack`) [different in v17 onwards due to removal of immediate_transfer boolean] - Create 2 pickings (of different picking types) - Select both pickings (through direct call in shell or rpc) and call `action_put_in_pack` Expected result: Moves are blocked from being put into same package since this situation doesn't make sense (i.e. the products are moved to different locations but the package can only be in 1 location) Result before this commit: The moves will all be put into the same package Additional notes: In theory batch picking creation has checks to avoid batches where there are pickings with more than 1 picking type or have different `show_reserved` values, but because `_package_move_lines` is a method that can be called in different use cases (including multi-record pickings) via customizations/future code changes, we add in checks to prevent put in pack from finishing in those cases to avoid unexpected behavior/stack traces. I.e. remember to respect existing `self.ensure_one` checks since they're probably there for a reason. === Flow 3: batch picking w/pickings w/more than 1 delivery carriers (where none = a different carrier than having 1) - Create 2 delivery pickings with different `carrier_id` values (i.e. different shipping methods assigned to them) - Add both pickings to a batch - Click "Put in Pack" in the batch picking Expected result: None, we should not handle this case because if the products are in the same package then the same package info will be sent to both carriers and the user will be double charged for every move (or charged(/potentially create the wrong shipping documents) when it shouldn't be in case of no carrier for one of the pickings) Result before this commit: All moves are put in the same package and the double charging/potentially incorrect shipping documents will occur Additional notes: This is the use case that was intended to be avoided when flow was originally decided to not be handled --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157093 Forward-Port-Of: odoo/odoo#156068
This fix resolves a critical bug in the manufacturing module where starting a workorder was incorrectly unplanning all subsequent workorders in the production order. The issue was introduced in recent updates and affected versions 16.4 and later. This fix ensures that starting one workorder no longer disrupts the scheduling of other workorders in the same production order.
Original PR description
Commit https://github.com/odoo/odoo/pull/110550/commits/b347675c36cc5c3f54bf64f2e295d0afe9196be8 merges mo/wo scheduled & effective dates. Later commit https://github.com/odoo/odoo/pull/128043/commits/62590fa7d742267421a42cbf654352cd5b7e048c for 15.0 fixes the mo start date. Unfortunately, forward ports breaks 16.4 & later: starting a workorder unplan the subsequent ones. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157345