From 0491cc61e32aa46aea885c113cb4ff993887e82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Mac=20Rouillon?= Date: Tue, 9 Feb 2021 17:27:54 -0300 Subject: [PATCH] [13.0] [FIX] stock_voucher: Return the value changed if it's not fail. --- stock_voucher/models/stock_picking_voucher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stock_voucher/models/stock_picking_voucher.py b/stock_voucher/models/stock_picking_voucher.py index 31651a9f..ac3b1905 100644 --- a/stock_voucher/models/stock_picking_voucher.py +++ b/stock_voucher/models/stock_picking_voucher.py @@ -69,6 +69,8 @@ def _format_document_number(self, document_number): 'The document number must be entered with a dash (-) and a maximum of 4 characters for the first part' 'and 8 for the second. The following are examples of valid numbers:\n* 1-1\n* 0001-00000001' '\n'))) + else: + return document_number @api.constrains('name', 'picking_id') @api.onchange('name', 'picking_id')