Change a constraint that was meant to prevent deletion of an
account.payment.method.line when related provider is in 'enabled'
or 'test' state. The constraint is now handled only on the payment method
lines that are actually modified, and not on everything like previously.
This constraint was failing during upgrades because it was too broad,
its initial purpose was to raise error to user at the moment he tries
to remove payment method lines from its journals.
closesodoo/odoo#128214
X-original-commit: fca76bcc6c8be6e38827641555d62ab2973ab1fe
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>