Merge PR #167 into 12.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2020-09-16 14:14:40 +00:00
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)