TVA Par défaut

for test in records: if not test.property_account_position_id: tva_id = env['account.fiscal.position'].search([('name', '=', 'Régime National')], limit=1) if tva_id: test.write({ 'property_account_position_id': tva_id, })