Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Company Currency in Sale Orders

Entity: sale.order

Compute Method: _compute_amount_company

View 18.0
Inputs Method Outputs
  • currency_id
  • currency_id.id
  • company_id
  • company_id.currency_id
  • company_id.currency_id.id
  • amount_total
  • currency_rate
- for order in self:
-             if order.currency_id.id == order.company_id.currency_id.id:
-                 to_amount = order.amount_total
-             else:
-                 to_amount = order.amount_total * order.currency_rate
-             order.amount_total_curr = to_amount
  • amount_total_curr

Back to entity