<commit_before># -*- coding: utf-8 -*-
from . import model
from . import wizard


def fix_inconsistent_initial_types(cr, registry):
    """A post init hook executed when the module is installed."""
    PO = registry['purchase.order']
    approved_ids = registry['purchase.order'].search(cr, 1, [
        ('state', '=', 'approved')
    ])
    PO.write(cr, 1, approved_ids, {'type': 'purchase'})<commit_msg>use SUPERUSER_ID and PO<commit_after># -*- coding: utf-8 -*-
from . import model
from . import wizard

from openerp import SUPERUSER_ID


def fix_inconsistent_initial_types(cr, registry):
    """A post init hook executed when the module is installed."""
    PO = registry['purchase.order']
    approved_ids = PO.search(cr, 1, [
        ('state', '=', 'approved')
    ])
    PO.write(cr, SUPERUSER_ID, approved_ids, {'type': 'purchase'})
{'fraction_non_alphanumeric': 0.15576694411414982, 'fraction_numerical': 0.005945303210463734, 'mean_word_length': 3.784090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7304416', 'n_tokens_mistral': 279, 'n_tokens_neox': 263, 'n_words': 74}