Daily updates from Odoo
Navigate
Branch
Wednesday, October 13, 2021
7 changes
Code cleanup and technical improvements
This change reorganizes internal test setup so shared preparation runs once per test class instead of before every individual test. It reduces repeated database work and should make installation test runs faster without changing business features.
Original PR description
In a lot of test class, we use `setUp` instead of `setUpClass`. `setUp` is execute for each test method and `setUpClass` will be execute only once by Class (and use savepoint + rollback). Then change setUp into setUpClass reduce the time to make all tests and avoid to repeat this error for the future. 1507670 SQL request -> 1446903 SQL request for at install tests https://github.com/odoo/odoo/pull/78082
Miscellaneous changes
This commit fixes the matching for the wrong database name during authentification from the mobile app to use the same pattern as the app's codebase in the error message, instead of verifying the equality of the whole message. Note: this was spotted on the runbot after an upgrade of the `pq` library which prefixed this kind of error messages. Before: > psql: error: FATAL: database "mydatabase" does not exist After: > psql: error: connection to server on socket "/var/run/postgresq
Original PR description
This commit fixes the matching for the wrong database name during authentification from the mobile app to use the same pattern as the app's codebase in the error message, instead of verifying the equality of the whole message. Note: this was spotted on the runbot after an upgrade of the `pq` library which prefixed this kind of error messages. Before: > psql: error: FATAL: database "mydatabase" does not exist After: > psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "mydatabase" does not exist Thanks MOC for the report. Forward-Port-Of: odoo/enterprise#21631
Issue : When creating and starting a revision for a BoM that contains the same product on more than one line, the lines in BoM changes for the revision are wrong and mixed up. This use case happens if you have multiple mrp.routing.workcenter for that bom with the same component Steps to reproduce: 1) Enable work order/center, configure 2 operations for a product B 2) Create BoM for product A using 1 product B with operation A 2 product B with operation B 3) Create a PLM Engi
Original PR description
Issue : When creating and starting a revision for a BoM that contains the same product on more than one line, the lines in BoM changes for the revision are wrong and mixed up. This use case happens if you have multiple mrp.routing.workcenter for that bom with the same component Steps to reproduce: 1) Enable work order/center, configure 2 operations for a product B 2) Create BoM for product A using 1 product B with operation A 2 product B with operation B 3) Create a PLM Engineering Change Order for that BoM 4) Start the revision (For 12.0, do a change in the BoM for example 2 units to 3 to see the tab) -> Bug in BoM Changes of that tab Why is that a bug: We are using a dict to aggregate the lines but we identify them with their product id and their bom product template, which means if it's the same product, they get hashed to the same value opw-2567921 Forward-Port-Of: odoo/enterprise#21658 Forward-Port-Of: odoo/enterprise#20490
Before this commit, the spreadsheet preview was not correctly rendered after go back from the spreadsheet to the document kanban view from the breadcrumb. It was caused by the save of data spreadsheet which was executed after the load of the kanban view. Task-id 2581393 Forward-Port-Of: odoo/enterprise#20726
Original PR description
Before this commit, the spreadsheet preview was not correctly rendered after go back from the spreadsheet to the document kanban view from the breadcrumb. It was caused by the save of data spreadsheet which was executed after the load of the kanban view. Task-id 2581393 Forward-Port-Of: odoo/enterprise#20726
Since f3e163c9653e34769cc0860fa45e62756c2820f3, the lines are sorted in the hierarchy. The issue is that for the sorting to work, the account's code need to part of the name string. We can now specify the code in models where it isn't part of the displayed string so that the sorting can be made. Forward-Port-Of: odoo/enterprise#21588 Forward-Port-Of: odoo/enterprise#21583
Original PR description
Since f3e163c9653e34769cc0860fa45e62756c2820f3, the lines are sorted in the hierarchy. The issue is that for the sorting to work, the account's code need to part of the name string. We can now specify the code in models where it isn't part of the displayed string so that the sorting can be made. Forward-Port-Of: odoo/enterprise#21588 Forward-Port-Of: odoo/enterprise#21583
Forward-Port-Of: odoo/enterprise#21622
Original PR description
Forward-Port-Of: odoo/enterprise#21622
The generate serial number button uses the stock.lot.serial sequence by default (default value for name of stock.production.lot) Serial Mass Produce (and other parts) allow to generate serial numbers starting from a user supplied initial value. This fix makes the button generate the next serial number according to the last generated. task 2647238 Forward-Port-Of: odoo/enterprise#21164
Original PR description
The generate serial number button uses the stock.lot.serial sequence by default (default value for name of stock.production.lot) Serial Mass Produce (and other parts) allow to generate serial numbers starting from a user supplied initial value. This fix makes the button generate the next serial number according to the last generated. task 2647238 Forward-Port-Of: odoo/enterprise#21164