-
- Downloads
[FIX] mrp: `qty_available` computation of a nested bom kits asked together
This revision has a similar goal than the previous revision 62c5b8d9 but this times, it's a kit/phantom bom which is nested in another kit/phantom bom, and their computation is asked in the same time. ``` 2021-08-20 11:29:54,835 1689 ERROR db_22687 odoo.upgrade.stock.tests.test_on_hand_quantity: FAIL: TestOnHandQuantityUnchanged.test_check Traceback (most recent call last): File "/tmp/tmpv3ujv2vr/migrations/testing.py", line 208, in test_check self.check(value) File "/tmp/tmpv3ujv2vr/migrations/stock/tests/test_on_hand_quantity.py", line 20, in check self.assertEqual(before_results, self.convert_check(after_results), self.message) AssertionError: Lists differ: [[551[14585 chars] [8988, '137'], [8989, '137'], [8990, '20'], [[1793 chars]91']] != [[551[14585 chars] [8989, '137'], [8990, '20'], [8991, '126'], [[1778 chars]91']] First differing element 1007: [8988, '137'] [8989, '137' ``` ``` SELECT b.id, b.type, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as kit_product_name FROM mrp_bom b JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product p ON p.pr oduct_tmpl_id = pt.id WHERE p.id = 8988; -[ RECORD 1 ]-------+----------------- id | 2208 type | phantom kit_product_id | 8988 kit_product_tmpl_id | 9049 kit_product_name | KIT Poulie AR G4 ``` ``` SELECT b.id, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as kit_product_name, l.product_id as component_product_id, component_t.name as component_name FROM mrp_bom_line l JOIN mrp_bom b ON l.bom_id = b.id JOIN product_product p ON p.product_tmpl_id = b.product_tmpl_id JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product component ON component.id = l.product_id JOIN product_template component_t ON component_t.id = component.product_tmpl_id WHERE l.product_id = 8988; -[ RECORD 1 ]--------+--------------------- id | 2213 kit_product_id | 8761 kit_product_tmpl_id | 8879 kit_product_name | VEL BP KIT direction component_product_id | 8988 component_name | KIT Poulie AR G4 ``` upg-22687 closes odoo/odoo#75654 Signed-off-by:Denis Ledoux (dle) <dle@odoo.com>
Please register or sign in to comment