[FIX] stock: create backorders from operations in new wh

When a new warehouse is created, the receipts of the purchase orders done in
this new warehouse have different behavior than the ones from the inital
warehouse. With the new warehouse the 'Detailed Operations' tab of the
receipt is visible but not the button next to 'Done' in the 'Operations' tab.
Since no elements are inside the 'Detailed Operations', it requires a manual
entry of all elements for every receipt with backorder.
This aligns the behavior of new warehouses with the inital one, not
showing the 'Detailed Operations' tab in the receipts but allowing to use
the button of the 'Operations' tab.

closes odoo/odoo#65501

X-original-commit: 126102b5b4cd9aa32fb3eb9a763d73e4056d3462
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: npi-odoo <npi-odoo@users.noreply.github.com>
This commit is contained in:
Nicolas Pierre
2021-02-04 07:44:30 +00:00
parent a29bb54633
commit bc8a5dc394
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -919,6 +919,7 @@ class Warehouse(models.Model):
'default_location_src_id': False,
'sequence': max_sequence + 1,
'show_reserved': False,
'show_operations': False,
'sequence_code': 'IN',
'company_id': self.company_id.id,
}, 'out_type_id': {
+2
View File
@@ -508,6 +508,7 @@ class TestWarehouse(TestStockCommon):
# Picking Type
self.assertFalse(warehouse.in_type_id.active)
self.assertFalse(warehouse.in_type_id.show_operations)
self.assertFalse(warehouse.out_type_id.active)
self.assertFalse(warehouse.int_type_id.active)
self.assertFalse(warehouse.pick_type_id.active)
@@ -532,6 +533,7 @@ class TestWarehouse(TestStockCommon):
# Picking Type
self.assertTrue(warehouse.in_type_id.active)
self.assertFalse(warehouse.in_type_id.show_operations)
self.assertTrue(warehouse.out_type_id.active)
self.assertTrue(warehouse.int_type_id.active)
self.assertFalse(warehouse.pick_type_id.active)