Fee report
This commit is contained in:
@@ -5537,6 +5537,23 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
|
||||
self.assertEqual(Fee._get_generated_purchases_to_delete([fee]), [])
|
||||
|
||||
def test_fee_report_invoice_delegates_to_fee_invoice(self):
|
||||
'fee report invoice button invoices the underlying fees'
|
||||
FeeReport = Pool().get('fee.report')
|
||||
report = FeeReport()
|
||||
report.id = 10
|
||||
fee_model = Mock()
|
||||
fees = [Mock(id=10)]
|
||||
fee_model.browse.return_value = fees
|
||||
|
||||
with patch('trytond.modules.purchase_trade.fee.Pool') as PoolMock:
|
||||
PoolMock.return_value.get.return_value = fee_model
|
||||
|
||||
FeeReport.invoice([report])
|
||||
|
||||
fee_model.browse.assert_called_once_with([10])
|
||||
fee_model.invoice.assert_called_once_with(fees)
|
||||
|
||||
def test_sale_report_converts_mixed_units_for_total_and_words(self):
|
||||
'sale report totals prefer the virtual lot unit as common unit'
|
||||
Sale = Pool().get('sale.sale')
|
||||
|
||||
Reference in New Issue
Block a user