add COO
This commit is contained in:
@@ -1077,12 +1077,14 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
'shipment report paths are resolved from purchase_trade configuration'
|
||||
shipping_report = Pool().get('stock.shipment.in.shipping', type='report')
|
||||
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')
|
||||
config_model = Mock()
|
||||
config_model.search.return_value = [
|
||||
Mock(
|
||||
shipment_shipping_report_template='si_custom.fodt',
|
||||
shipment_insurance_report_template='insurance_custom.fodt',
|
||||
shipment_coo_report_template='coo_custom.fodt',
|
||||
shipment_packing_list_report_template='packing_list_custom.fodt',
|
||||
)
|
||||
]
|
||||
@@ -1104,6 +1106,12 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
'report': 'stock/insurance.fodt',
|
||||
}),
|
||||
'stock/insurance_custom.fodt')
|
||||
self.assertEqual(
|
||||
coo_report._resolve_configured_report_path({
|
||||
'name': 'COO',
|
||||
'report': 'stock/coo.fodt',
|
||||
}),
|
||||
'stock/coo_custom.fodt')
|
||||
self.assertEqual(
|
||||
packing_report._resolve_configured_report_path({
|
||||
'name': 'Packing List',
|
||||
@@ -1125,6 +1133,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
purchase_report_label='',
|
||||
shipment_shipping_report_label='',
|
||||
shipment_insurance_report_label='',
|
||||
shipment_coo_report_label='Certificate of Origin',
|
||||
shipment_packing_list_report_label='',
|
||||
)
|
||||
action_sale = Mock(spec=['name'])
|
||||
@@ -1147,6 +1156,8 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
action_shipping.name = 'Shipping instructions'
|
||||
action_insurance = Mock(spec=['name'])
|
||||
action_insurance.name = 'Insurance'
|
||||
action_coo = Mock(spec=['name'])
|
||||
action_coo.name = 'COO'
|
||||
action_packing = Mock(spec=['name'])
|
||||
action_packing.name = 'Packing List'
|
||||
actions = {
|
||||
@@ -1160,7 +1171,8 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
8: action_purchase,
|
||||
9: action_shipping,
|
||||
10: action_insurance,
|
||||
11: action_packing,
|
||||
11: action_coo,
|
||||
12: action_packing,
|
||||
}
|
||||
|
||||
model_data = Mock()
|
||||
@@ -1188,6 +1200,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
[actions[2]], {'name': 'Draft'},
|
||||
[actions[7]], {'name': 'Packing Slip'},
|
||||
[actions[6]], {'name': 'Wire Order'},
|
||||
[actions[11]], {'name': 'Certificate of Origin'},
|
||||
))
|
||||
|
||||
def test_shipment_insurance_helpers_use_fee_and_controller(self):
|
||||
|
||||
Reference in New Issue
Block a user