purchase_advance_payment: use partner_ref as default payment reference

Payment ref now falls back to purchase.partner_ref (e.g. "završni-2025")
before purchase.name. Bump version to 16.0.1.2.2.

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2026-02-11 11:27:30 +01:00
parent 138bd5ffee
commit 1a11d6c503
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
{
"name": "Purchase Advance Payment",
"version": "16.0.1.2.1",
"version": "16.0.1.2.2",
"author": "Forgeflow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purchase-workflow",
"category": "Purchase",

View file

@ -149,7 +149,7 @@ class AccountVoucherWizardPurchase(models.TransientModel):
"amount": self.amount_advance,
"payment_type": "outbound",
"partner_type": "supplier",
"ref": self.payment_ref or purchase.name,
"ref": self.payment_ref or purchase.partner_ref or purchase.name,
"journal_id": self.journal_id.id,
"currency_id": self.journal_currency_id.id,
"partner_id": partner_id,