From TO line/sale line

This commit is contained in:
2026-04-28 20:07:55 +02:00
parent 1d6f3158c0
commit b5b554bad0
3 changed files with 23 additions and 7 deletions

View File

@@ -595,6 +595,14 @@ class PurchaseTradeTestCase(ModuleTestCase):
SaleLine._check_delivery_period_values([valid], {
'to_del': datetime.date(2026, 3, 31),
})
with self.assertRaises(UserError):
PurchaseLine._check_delivery_period_values([invalid], {
'quantity': Decimal('1'),
})
with self.assertRaises(UserError):
SaleLine._check_delivery_period_values([invalid], {
'quantity': Decimal('1'),
})
def test_pricing_eod_uses_weighted_average_for_manual_rows(self):
'manual pricing eod uses the weighted average of fixed and unfixed legs'