addons14/contract/models/contract.py
def _get_computed_currency(self):
        """Helper method for returning the theoretical computed currency."""
        self.ensure_one()
        currency = self.env["res.currency"]
        if any(self.contract_line_ids.mapped("automatic_price")):
            # Use pricelist currency
            currency = (
                self.pricelist_id.currency_id
                or self.partner_id.with_company(
                    self.company_id
                ).property_product_pricelist.currency_id
            )
        return currency or self.journal_id.currency_id or self.company_id.currency_id
Helper method for returning the theoretical computed currency.
Helper method for returning the theoretical computed currency.
Helper method for returning the theoretical computed currency .
def _get_computed_currency(self):
        self.ensure_one()
        currency = self.env["res.currency"]
        if any(self.contract_line_ids.mapped("automatic_price")):
            currency = (
                self.pricelist_id.currency_id
                or self.partner_id.with_company(
                    self.company_id
                ).property_product_pricelist.currency_id
            )
        return currency or self.journal_id.currency_id or self.company_id.currency_id
def _get_computed_currency ( self ) : self . ensure_one ( ) currency = self . env [ "res.currency" ] if any ( self . contract_line_ids . mapped ( "automatic_price" ) ) : currency = ( self . pricelist_id . currency_id or self . partner_id . with_company ( self . company_id ) . property_product_pricelist . currency_id ) return currency or self . journal_id . currency_id or self . company_id . currency_id
Helper method for returning the theoretical computed currency.
Helper method for returning the theoretical computed currency .
"""Helper method for returning the theoretical computed currency.""" # Use pricelist currency
self