Files
bank-payment/account_payment_purchase/models
Atte Isopuro fac1312d0d [FIX] account_payment_purchase: Do not warn if no purchase
If the user set no purchase order on an invoice, it makes no sense
to warn them about details being different.

The onchange for the purchase_id field is not only run when the user
sets a purchase, but also when they open a new, empty form view.
Normally this causes no problems, but in some contexts the user
may want to define defaults for the payment term or bank account.
If these are defined, they will not be False on a new draft invoice,
but there will be no purchase, so the code interpreted the values
as having "changed".

We avoid this by simply not checking for changes if no purchase has
been set on the invoice.
2019-11-12 16:15:30 +02:00
..