Lots Management add user and date

This commit is contained in:
2026-06-22 13:15:55 +02:00
parent dfbc006efb
commit 8f676c2396
3 changed files with 27 additions and 0 deletions

View File

@@ -2615,6 +2615,19 @@ class PurchaseTradeTestCase(ModuleTestCase):
self.assertEqual(report.get_shipment_type(None), 'dropship')
def test_lot_report_exposes_purchase_creator_and_date(self):
'lots management exposes the purchase creator and purchase date'
LotReport = Pool().get('lot.report')
report = LotReport()
report.r_purchase = Mock(
create_uid=Mock(id=42),
purchase_date=datetime.date(2026, 6, 22),
)
self.assertEqual(report.get_purchase_creator(), 42)
self.assertEqual(
report.get_purchase_date(), datetime.date(2026, 6, 22))
@with_transaction()
def test_shipment_in_quantity_uses_lotqt_without_physical_moves(self):
'shipment quantity falls back to linked open lots before physical moves'