Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Purchase
Entity: purchase.order.line
Compute Method: _compute_amount
| Inputs | Method | Outputs |
|---|---|---|
|
AccountTax = self.env['account.tax']
for line in self:
company = line.company_id or self.env.company
base_line = line._prepare_base_line_for_taxes_computation()
AccountTax._add_tax_details_in_base_line(base_line, company)
AccountTax._round_base_lines_tax_details([base_line], company)
line.price_subtotal = base_line['tax_details']['total_excluded_currency']
line.price_total = base_line['tax_details']['total_included_currency']
line.price_tax = line.price_total - line.price_subtotal
+ line.non_deductible_tax = sum(
+ tax_data['tax_amount_currency'] * tax_data['tax'].non_deductible_amount
+ for tax_data in base_line['tax_details']['taxes_data']
+ )
|
|
