Skip to content

Commit

Permalink
[FIX] account_payment_order: fix create name
Browse files Browse the repository at this point in the history
The ir.sequence based naming doesn't work when creating a Payment Order
from the list view.
  • Loading branch information
luc-demeyer committed Dec 26, 2024
1 parent 061c286 commit ec9fd0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account_payment_order/models/account_payment_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ec9fd0d

Please sign in to comment.