[IMP] rma: incoming picking type use existing lot by default.

This commit is contained in:
Ernesto Tejeda
2020-09-15 17:33:05 -04:00
parent 618792be6c
commit bd48f905fc
2 changed files with 10 additions and 2 deletions

View File

@@ -72,8 +72,8 @@ class StockWarehouse(models.Model):
'rma_in_type_id': {
'name': _('RMA Receipts'),
'code': 'incoming',
'use_create_lots': True,
'use_existing_lots': False,
'use_create_lots': False,
'use_existing_lots': True,
'default_location_src_id': False,
'default_location_dest_id': self.rma_loc_id.id,
'sequence': max_sequence + 1,

View File

@@ -648,3 +648,11 @@ class TestRma(SavepointCase):
self.assertTrue(rma.can_be_refunded)
self.assertTrue(rma.can_be_returned)
self.assertTrue(rma.can_be_replaced)
def test_rma_picking_type_default_values(self):
warehouse = self.env['stock.warehouse'].create({
'name': 'Stock - RMA Test',
'code': 'SRT',
})
self.assertFalse(warehouse.rma_in_type_id.use_create_lots)
self.assertTrue(warehouse.rma_in_type_id.use_existing_lots)