<commit_before># -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from __future__ import division, print_function, unicode_literals

import logging

from odoo import api, fields, models, _
import odoo.addons.decimal_precision as dp
from odoo.exceptions import ValidationError
from odoo.addons.l10n_br_base.constante_tributaria import (
    REGIME_TRIBUTARIO,
    MODELO_FISCAL,
    IE_DESTINATARIO,
    TIPO_EMISSAO,
    ENTRADA_SAIDA,
    TIPO_CONSUMIDOR_FINAL,
    ENTRADA_SAIDA_SAIDA,
)

_logger = logging.getLogger(__name__)

try:
    from pybrasil.valor.decimal import Decimal as D

except (ImportError, IOError) as err:
    _logger.debug(err)


class SaleOrderLine(models.Model):
    _inherit = 'sale.order.line'

    is_brazilian = fields.Boolean(
        string=u'Is a Brazilian Invoice?',
        related='order_id.is_brazilian',
    )


class SaleOrderLineBrazil(models.Model):
    _name = b'sale.order.line.brazil'
    _description = 'Linhas da Venda'
    _inherit = 'sped.calculo.imposto.item'
    _abstract = False


class SaleOrderLineBrazil2(models.Model):
    _inherit = 'sale.order.line.brazil'
    _inherits = {'sale.order.line': 'sale_line_id'}

    sale_line_id = fields.Many2one(
        comodel_name='sale.order.line',
        string='Sale Line original',<commit_msg>[FIX] Correção da implementação do sale<commit_after># -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from __future__ import division, print_function, unicode_literals

import logging

from odoo import api, fields, models, _
import odoo.addons.decimal_precision as dp
from odoo.exceptions import ValidationError
from odoo.addons.l10n_br_base.constante_tributaria import (
    REGIME_TRIBUTARIO,
    MODELO_FISCAL,
    IE_DESTINATARIO,
    TIPO_EMISSAO,
    ENTRADA_SAIDA,
    TIPO_CONSUMIDOR_FINAL,
    ENTRADA_SAIDA_SAIDA,
)

_logger = logging.getLogger(__name__)

try:
    from pybrasil.valor.decimal import Decimal as D

except (ImportError, IOError) as err:
    _logger.debug(err)


class SaleOrderLine(models.Model):
    _inherit = 'sale.order.line'

    is_brazilian = fields.Boolean(
        string=u'Is a Brazilian Invoice?',
        related='order_id.is_brazilian',
    )


class SaleOrderLineBrazil(models.Model):
    _name = b'sale.order.line.brazil'
    _description = 'Linhas da Venda'
    _inherit = 'sped.calculo.imposto.item'
    _inherits = {'sale.order.line': 'sale_line_id'}
    _abstract = False

    sale_line_id = fields.Many2one(
        comodel_name='sale.order.line',
        string='Sale Line original',
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.007954545454545454, 'mean_word_length': 3.8281535648994516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5386714', 'n_tokens_mistral': 1014, 'n_tokens_neox': 942, 'n_words': 188}