Skip to content

Commit 06567fc

Browse files
author
Omar (OSAH)
committed
[FIX] l10n_pe_reports_stock: ensure payment_reference is always a string
steps to reproduce: 1. install l10n_pe_reports_stock module 2. run the test `test_payment_reference_autocomplete_invoice` This commit ensures that the payment_reference field is always a string, because it returs false when it is None, which causes an assertion error build_error-75601 closes odoo#215873 Signed-off-by: William Henrotin (whe) <[email protected]>
1 parent 847e058 commit 06567fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/purchase/tests/test_purchase_invoice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ def test_payment_reference_autocomplete_invoice(self):
10091009
move_form.ref = '111' if w_bill_ref == 'w_bill_ref' else ''
10101010
move_form.payment_reference = '222' if w_payment_reference == 'w_payment_reference' else ''
10111011
move_form.purchase_vendor_bill_id = self.env['purchase.bill.union'].browse(-purchase_order.id).exists()
1012-
payment_reference = move_form._values['payment_reference']
1012+
payment_reference = move_form._values['payment_reference'] or ''
10131013
self.assertEqual(payment_reference, expected_value, "The payment reference should be %s" % expected_value)
10141014

10151015
def test_invoice_user_id_on_bill(self):

0 commit comments

Comments
 (0)