Melya template
This commit is contained in:
@@ -6318,7 +6318,24 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
)
|
||||
product = Mock(name='COTTON UPLAND', description='RAW WHITE COTTON')
|
||||
line = Mock(product=product, sale=sale)
|
||||
lot = Mock(sale_line=line, line=None)
|
||||
invoice = Mock(number='INV-001')
|
||||
snapshot_unit = Mock(symbol='mt', rec_name='MT')
|
||||
invoice_line = Mock(
|
||||
invoice=invoice,
|
||||
lot_weight_snapshots=[
|
||||
Mock(net_quantity=Decimal('24.0000'), unit=snapshot_unit),
|
||||
],
|
||||
)
|
||||
lot = Mock(
|
||||
id=1,
|
||||
lot_type='physic',
|
||||
sale_line=line,
|
||||
line=None,
|
||||
sale_invoice_line=invoice_line,
|
||||
sale_invoice_line_prov=None,
|
||||
invoice_line=None,
|
||||
invoice_line_prov=None,
|
||||
)
|
||||
move = Mock(lot=lot, product=product)
|
||||
shipment.incoming_moves = [move]
|
||||
shipment.moves = [move]
|
||||
@@ -6343,19 +6360,24 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
shipment.company = Mock(
|
||||
party=Mock(
|
||||
rec_name='MELYA SA',
|
||||
address_get=Mock(return_value=Mock(city='GENEVA')),
|
||||
address_get=Mock(return_value=Mock(
|
||||
city='GENEVA',
|
||||
party_name='MELYA INTERNATIONAL TRADING SA')),
|
||||
)
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
shipment.report_insurance_certificate_number, 'BL-001')
|
||||
self.assertEqual(
|
||||
shipment.report_insurance_account_of, 'SGT FR')
|
||||
shipment.report_insurance_account_of,
|
||||
'MELYA INTERNATIONAL TRADING SA')
|
||||
self.assertEqual(
|
||||
shipment.report_insurance_goods_description,
|
||||
'COTTON UPLAND - RAW WHITE COTTON')
|
||||
'24mt COTTON UPLAND - RAW WHITE COTTON')
|
||||
self.assertEqual(
|
||||
shipment.report_insurance_order_reference, 'P-12 S-34')
|
||||
self.assertEqual(
|
||||
shipment.report_insurance_invoice_number, 'INV-001')
|
||||
self.assertEqual(
|
||||
shipment.report_insurance_amount, 'USD 1234.56')
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user