Linkage report

This commit is contained in:
2026-07-07 15:58:59 +02:00
parent b3b14039e0
commit 4ea701d669
6 changed files with 51 additions and 8 deletions

View File

@@ -6174,6 +6174,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
insurance_report = Pool().get('stock.shipment.in.insurance', type='report')
coo_report = Pool().get('stock.shipment.in.coo', type='report')
packing_report = Pool().get('stock.shipment.in.packing_list', type='report')
linkage_report = Pool().get('stock.shipment.in.linkage', type='report')
config_model = Mock()
config_model.search.return_value = [
Mock(
@@ -6181,6 +6182,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
shipment_insurance_report_template='insurance_custom.fodt',
shipment_coo_report_template='coo_custom.fodt',
shipment_packing_list_report_template='packing_list_custom.fodt',
shipment_linkage_report_template='linkage_custom.fodt',
)
]
@@ -6213,6 +6215,12 @@ class PurchaseTradeTestCase(ModuleTestCase):
'report': 'stock/packing_list.fodt',
}),
'stock/packing_list_custom.fodt')
self.assertEqual(
linkage_report._resolve_configured_report_path({
'name': 'Linkage',
'report': 'stock/linkage.fodt',
}),
'stock/linkage_custom.fodt')
def test_configuration_syncs_report_menu_labels(self):
'document template configuration updates report menu labels'
@@ -6230,6 +6238,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
shipment_insurance_report_label='',
shipment_coo_report_label='Certificate of Origin',
shipment_packing_list_report_label='',
shipment_linkage_report_label='Linkage Summary',
)
action_sale = Mock(spec=['name'])
action_sale.name = 'Proforma'
@@ -6255,6 +6264,8 @@ class PurchaseTradeTestCase(ModuleTestCase):
action_coo.name = 'COO'
action_packing = Mock(spec=['name'])
action_packing.name = 'Packing List'
action_linkage = Mock(spec=['name'])
action_linkage.name = 'Linkage'
actions = {
1: action_sale,
2: action_bill,
@@ -6268,6 +6279,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
10: action_insurance,
11: action_coo,
12: action_packing,
13: action_linkage,
}
model_data = Mock()
@@ -6296,6 +6308,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
[actions[7]], {'name': 'Packing Slip'},
[actions[6]], {'name': 'Wire Order'},
[actions[11]], {'name': 'Certificate of Origin'},
[actions[13]], {'name': 'Linkage Summary'},
))
def test_shipment_insurance_helpers_use_fee_and_controller(self):