<commit_before># -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################

from openerp import models


class MrpBom(models.Model):
    _inherit = 'mrp.bom'

    def _get_workorder_operations(self, result2, factor, level=0,
                                  routing_id=False):
        res = super(MrpBom, self)._get_workorder_operations(
            result2, factor, level, routing_id)
        for work_order in res:
            if (work_order['sequence'] < level or
                    work_order.get('routing_wc_line')):
                continue
            seq = work_order['sequence'] - level
            rl = self._get_routing_line_from_workorder(
                routing_id, seq, work_order['workcenter_id'],
                work_order['name'])
            work_order['init_without_material'] = rl.init_without_material
        return res<commit_msg>[FIX] mrp_operations_star_without_material: WO init_without_material field filled from routing line closes #944<commit_after># -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################

from openerp import models


class MrpBom(models.Model):
    _inherit = 'mrp.bom'

    def _get_workorder_operations(self, result2, factor, level=0,
                                  routing_id=False):
        res = super(MrpBom, self)._get_workorder_operations(
            result2, factor, level, routing_id)
        for work_order in res:
            seq = work_order['sequence'] - level
            rl = self._get_routing_line_from_workorder(
                routing_id, seq, work_order['workcenter_id'],
                work_order['name'])
            work_order['init_without_material'] = rl.init_without_material
        return res
{'fraction_non_alphanumeric': 0.22515602496399423, 'fraction_numerical': 0.00528084493518963, 'mean_word_length': 3.0466019417475727, 'pattern_counts': {'":': 0, '<': 4, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6342085', 'n_tokens_mistral': 558, 'n_tokens_neox': 523, 'n_words': 119}