<commit_before># -*- coding: utf-8 -*-
# Copyright (C) 2014 - Today: GRAP (http://www.grap.coop)
# @author: <NAME> (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import api, models


class ProductPricelist(models.Model):
    _inherit = 'product.pricelist'

    # Overlad Section
    @api.multi
    def _compute_intercompany_trade_prices(
            self, supplier_product, supplier_partner):
        """
        This function Overload the original one, adding tax exclude / incude
        values;
        Sale price is always said as taxes excluded;
        """
        self.ensure_one()
        tax_obj = self.env['account.tax']

        res = super(ProductPricelist, self)._compute_intercompany_trade_prices(
            supplier_product, supplier_partner)

        # Compute Taxes detail
        tax_info = tax_obj.compute_all(
            supplier_product.taxes_id,
            res['supplier_sale_price'], 1.0, supplier_product.id)
        res.update({
            'suppliger_sale_price': tax_info['total'],
            'supplier_sale_price_tax_excluded': tax_info['total'],
            'supplier_sale_price_tax_included': tax_info['total_included'],
            'supplier_tax_name': ', '.join(
                [x.name for x in supplier_product.taxes_id])
        })<commit_msg>[FIX] incorrect call to new api compute_tax<commit_after># -*- coding: utf-8 -*-
# Copyright (C) 2014 - Today: GRAP (http://www.grap.coop)
# @author: <NAME> (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import api, models


class ProductPricelist(models.Model):
    _inherit = 'product.pricelist'

    # Overlad Section
    @api.multi
    def _compute_intercompany_trade_prices(
            self, supplier_product, supplier_partner):
        """
        This function Overload the original one, adding tax exclude / incude
        values;
        Sale price is always said as taxes excluded;
        """
        self.ensure_one()
        res = super(ProductPricelist, self)._compute_intercompany_trade_prices(
            supplier_product, supplier_partner)

        # Compute Taxes detail
        tax_info = supplier_product.taxes_id.compute_all(
            res['supplier_sale_price'], 1.0, supplier_product.id)
        res.update({
            'suppliger_sale_price': tax_info['total'],
            'supplier_sale_price_tax_excluded': tax_info['total'],
            'supplier_sale_price_tax_included': tax_info['total_included'],
            'supplier_tax_name': ', '.join(
                [x.name for x in supplier_product.taxes_id])
        })
{'fraction_non_alphanumeric': 0.11144353029169783, 'fraction_numerical': 0.006731488406881077, 'mean_word_length': 2.7152777777777777, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '412085', 'n_tokens_mistral': 848, 'n_tokens_neox': 806, 'n_words': 171}