addons14/account_financial_report/report/abstract_report_xlsx.py
def _get_currency_amt_format_dict(self, line_dict):
        """ Return amount format specific for each currency. """
        if line_dict.get("account_group_id", False) and line_dict["account_group_id"]:
            format_amt = self.format_amount_bold
            field_prefix = "format_amount_bold"
        else:
            format_amt = self.format_amount
            field_prefix = "format_amount"
        if line_dict.get("currency_id", False) and line_dict["currency_id"]:
            if isinstance(line_dict["currency_id"], int):
                currency = self.env["res.currency"].browse(line_dict["currency_id"])
            else:
                currency = line_dict["currency_id"]
            field_name = "{}_{}".format(field_prefix, currency.name)
            if hasattr(self, field_name):
                format_amt = getattr(self, field_name)
            else:
                format_amt = self.workbook.add_format()
                self.field_name = format_amt
                format_amount = "#,##0." + ("0" * currency.decimal_places)
                format_amt.set_num_format(format_amount)
        return format_amt
 Return amount format specific for each currency. 
Return amount format specific for each currency.
Return amount format specific for each currency .
def _get_currency_amt_format_dict(self, line_dict):
        if line_dict.get("account_group_id", False) and line_dict["account_group_id"]:
            format_amt = self.format_amount_bold
            field_prefix = "format_amount_bold"
        else:
            format_amt = self.format_amount
            field_prefix = "format_amount"
        if line_dict.get("currency_id", False) and line_dict["currency_id"]:
            if isinstance(line_dict["currency_id"], int):
                currency = self.env["res.currency"].browse(line_dict["currency_id"])
            else:
                currency = line_dict["currency_id"]
            field_name = "{}_{}".format(field_prefix, currency.name)
            if hasattr(self, field_name):
                format_amt = getattr(self, field_name)
            else:
                format_amt = self.workbook.add_format()
                self.field_name = format_amt
                format_amount = "#,##0." + ("0" * currency.decimal_places)
                format_amt.set_num_format(format_amount)
        return format_amt
def _get_currency_amt_format_dict ( self , line_dict ) : if line_dict . get ( "account_group_id" , False ) and line_dict [ "account_group_id" ] : format_amt = self . format_amount_bold field_prefix = "format_amount_bold" else : format_amt = self . format_amount field_prefix = "format_amount" if line_dict . get ( "currency_id" , False ) and line_dict [ "currency_id" ] : if isinstance ( line_dict [ "currency_id" ] , int ) : currency = self . env [ "res.currency" ] . browse ( line_dict [ "currency_id" ] ) else : currency = line_dict [ "currency_id" ] field_name = "{}_{}" . format ( field_prefix , currency . name ) if hasattr ( self , field_name ) : format_amt = getattr ( self , field_name ) else : format_amt = self . workbook . add_format ( ) self . field_name = format_amt format_amount = "#,##0." + ( "0" * currency . decimal_places ) format_amt . set_num_format ( format_amount ) return format_amt
Return amount format specific for each currency.
Return amount format specific for each currency .
""" Return amount format specific for each currency. """
self
line_dict