9e63f90527
With this option, you can select which fields do you want to compare for updating. Use case: you have specific accounts in taxes, and you don't want to lose them, but you want to update their groups through the wizard. Before this, the update was all or nothing. Now, you have total control!
21 lines
649 B
Python
21 lines
649 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2018 Tecnativa - Pedro M. Baeza
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import models
|
|
|
|
|
|
class IrModelFields(models.Model):
|
|
_inherit = 'ir.model.fields'
|
|
|
|
def name_get(self):
|
|
"""Return special label when showing fields in chart update wizard."""
|
|
if self.env.context.get('account_chart_update'):
|
|
res = []
|
|
for record in self:
|
|
res.append((record.id, "%s (%s)" % (
|
|
record.field_description, record.name,
|
|
)))
|
|
return res
|
|
return super(IrModelFields, self).name_get()
|