From e632e6c5e22e6e9673538fe32023ef00bd076ec7 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 19 Feb 2019 12:09:35 +0000 Subject: [PATCH] [FIX] account: do not copy alias When duplicating a journal, the alias is kept. Therefore, when the user tries to change it, it updates the value on both records. opw-1941717 closes odoo/odoo#31242 --- addons/account/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index ec97bafd1c6..f42268edd70 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -481,7 +481,7 @@ class AccountJournal(models.Model): post_at_bank_rec = fields.Boolean(string="Post At Bank Reconciliation", help="Whether or not the payments made in this journal should be generated in draft state, so that the related journal entries are only posted when performing bank reconciliation.") # alias configuration for 'purchase' type journals - alias_id = fields.Many2one('mail.alias', string='Alias') + alias_id = fields.Many2one('mail.alias', string='Alias', copy=False) alias_domain = fields.Char('Alias domain', compute='_compute_alias_domain', default=lambda self: self.env["ir.config_parameter"].sudo().get_param("mail.catchall.domain")) alias_name = fields.Char('Alias Name for Vendor Bills', related='alias_id.alias_name', help="It creates draft vendor bill by sending an email.", readonly=False)