You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
496 B

# -*- coding: utf-8 -*-
import re
from odoo import api, models, fields, _
class PurchaseCurrency(models.Model):
_inherit = 'sale.order'
company_currency_amount = fields.Float(string='Company Currency Total', compute='find_amount')
def find_amount(self):
print("In function")
for this in self:
price = self.env['res.currency']._compute(this.currency_id, this.company_id.currency_id, this.amount_total)
this.company_currency_amount = price