@@ -307,7 +307,14 @@ def test_invoice_communication_01(self):
307307 def test_invoice_communication_02 (self ):
308308 self .invoice .payment_reference = "R1234"
309309 self .assertEqual (
310- "F1242" , self .invoice ._get_payment_order_communication_direct ()
310+ "R1234" , self .invoice ._get_payment_order_communication_direct ()
311+ )
312+
313+ def test_supplier_invoice_payment_reference (self ):
314+ self .invoice .payment_reference = "+++F1234+++"
315+ self .invoice .action_post ()
316+ self .assertEqual (
317+ "+++F1234+++" , self .invoice ._get_payment_order_communication_full ()
311318 )
312319
313320 @mute_logger ("odoo.models.unlink" )
@@ -437,7 +444,7 @@ def test_supplier_refund_reference(self):
437444 self .invoice .payment_reference = "F/1234"
438445 self .invoice .action_post ()
439446 self .assertEqual (
440- "F1242 " , self .invoice ._get_payment_order_communication_direct ()
447+ "F/1234 " , self .invoice ._get_payment_order_communication_direct ()
441448 )
442449 self .refund = self ._create_supplier_refund (self .invoice )
443450 with Form (self .refund ) as refund_form :
@@ -447,7 +454,9 @@ def test_supplier_refund_reference(self):
447454 line_form .price_unit = 75.0
448455
449456 self .refund .action_post ()
450- self .assertEqual ("R1234" , self .refund ._get_payment_order_communication_direct ())
457+ self .assertEqual (
458+ "FR/1234" , self .refund ._get_payment_order_communication_direct ()
459+ )
451460
452461 self .env ["account.invoice.payment.line.multi" ].with_context (
453462 active_model = "account.move" , active_ids = self .invoice .ids
@@ -460,8 +469,7 @@ def test_supplier_refund_reference(self):
460469
461470 self .assertEqual (len (payment_order .payment_line_ids ), 1 )
462471
463- self .assertEqual ("F1242 R1234" , payment_order .payment_line_ids .communication )
464- self .assertNotIn ("FR/1234" , payment_order .payment_line_ids .communication )
472+ self .assertEqual ("F/1234 FR/1234" , payment_order .payment_line_ids .communication )
465473
466474 def test_supplier_manual_refund (self ):
467475 """
0 commit comments