Merge pull request #4 from acsone/9.0-restrict-move-line-delete-sbi

[IMP] prevent deleting a move-line that is linked to a payment order line
This commit is contained in:
Alexis de Lattre
2016-06-27 10:20:48 +02:00
committed by GitHub

View File

@@ -27,7 +27,8 @@ class AccountPaymentLine(models.Model):
related='order_id.state', string='State',
readonly=True, store=True)
move_line_id = fields.Many2one(
'account.move.line', string='Journal Item')
'account.move.line', string='Journal Item',
ondelete='restrict')
ml_maturity_date = fields.Date(
related='move_line_id.date_maturity', readonly=True)
currency_id = fields.Many2one(