[FIX] base: delete rates when deleting a currency
Also, what the point of a rate without currency? closes odoo/odoo#58327 X-original-commit: bc00059bcd1c6475b00503e9242edd6547dbd93d Signed-off-by: Christophe Simonis <chs@odoo.com>
This commit is contained in:
@@ -236,7 +236,7 @@ class CurrencyRate(models.Model):
|
||||
name = fields.Date(string='Date', required=True, index=True,
|
||||
default=lambda self: fields.Date.today())
|
||||
rate = fields.Float(digits=0, default=1.0, help='The rate of the currency to the currency of rate 1')
|
||||
currency_id = fields.Many2one('res.currency', string='Currency', readonly=True)
|
||||
currency_id = fields.Many2one('res.currency', string='Currency', readonly=True, required=True, ondelete="cascade")
|
||||
company_id = fields.Many2one('res.company', string='Company',
|
||||
default=lambda self: self.env.company)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user