diff --git a/account_payment_order/models/account_payment_order.py b/account_payment_order/models/account_payment_order.py index 35772e95162..3c79e524c62 100644 --- a/account_payment_order/models/account_payment_order.py +++ b/account_payment_order/models/account_payment_order.py @@ -219,7 +219,7 @@ def _compute_move_count(self): @api.model_create_multi def create(self, vals_list): for vals in vals_list: - if vals.get("name", "New") == "New": + if vals.get("name") in ("New", None, False): vals["name"] = ( self.env["ir.sequence"].next_by_code("account.payment.order") or "New"