Add maturity date
This commit is contained in:
@@ -3293,6 +3293,21 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
'CH36 0021 5215 2487 7461 D')
|
||||
self.assertEqual(invoice.report_melya_bank_swift, 'UBSWCHZH80A')
|
||||
|
||||
def test_invoice_melya_maturity_date_uses_lines_to_pay(self):
|
||||
'invoice_melya maturity date uses the earliest line to pay maturity'
|
||||
Invoice = Pool().get('account.invoice')
|
||||
|
||||
invoice = Invoice()
|
||||
invoice.lines_to_pay = [
|
||||
Mock(maturity_date=datetime.date(2026, 9, 9)),
|
||||
Mock(maturity_date=datetime.date(2026, 8, 9)),
|
||||
Mock(maturity_date=None),
|
||||
]
|
||||
|
||||
self.assertEqual(
|
||||
invoice.report_melya_maturity_date,
|
||||
datetime.date(2026, 8, 9))
|
||||
|
||||
def test_sale_report_deal_uses_purchase_and_sale_numbers(self):
|
||||
'sale deal number includes the linked purchase number'
|
||||
Sale = Pool().get('sale.sale')
|
||||
|
||||
Reference in New Issue
Block a user