OdooMindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
for account in self:
if account.account_type:
account.internal_group = 'off_balance' if account.account_type == 'off_balance' else account.account_type.split('_')[0]