Default From To

This commit is contained in:
2026-06-07 07:02:18 +02:00
parent 846c2d6a93
commit 24b4e00080
5 changed files with 76 additions and 17 deletions

View File

@@ -206,6 +206,19 @@ class PurchaseTradeTestCase(ModuleTestCase):
self.assertEqual(affected_lines, [purchase_line, sale_line])
def test_lot_shipping_defaults_planned_locations(self):
'link to transport carries planned locations into shipment create'
wizard = lot_module.LotShipping()
wizard.records = [Mock(
r_planned_from_location=Mock(id=10),
r_planned_to_location=Mock(id=20),
)]
self.assertEqual(wizard.default_ship(None), {
'planned_from_location': 10,
'planned_to_location': 20,
})
@with_transaction()
def test_get_mtm_applies_component_ratio_as_percentage(self):
'get_mtm treats component ratio as a percentage'