addons14/account_financial_report/report/trial_balance_xlsx.py
def write_account_footer(self, account, name_value):
        """Specific function to write account footer for Trial Balance"""
        format_amt = self._get_currency_amt_header_format_dict(account)
        for col_pos, column in self.columns.items():
            if column["field"] == "name":
                value = name_value
            else:
                value = account[column["field"]]
            cell_type = column.get("type", "string")
            if cell_type == "string":
                self.sheet.write_string(
                    self.row_pos, col_pos, value or "", self.format_header_left
                )
            elif cell_type == "amount":
                self.sheet.write_number(
                    self.row_pos, col_pos, float(value), self.format_header_amount
                )
            elif cell_type == "many2one" and account["currency_id"]:
                self.sheet.write_string(
                    self.row_pos, col_pos, value.name or "", self.format_header_right
                )
            elif cell_type == "amount_currency" and account["currency_id"]:
                self.sheet.write_number(self.row_pos, col_pos, float(value), format_amt)
            else:
                self.sheet.write_string(
                    self.row_pos, col_pos, "", self.format_header_right
                )
        self.row_pos += 1
Specific function to write account footer for Trial Balance
Specific function to write account footer for Trial Balance
Specific function to write account footer for Trial Balance
def write_account_footer(self, account, name_value):
        format_amt = self._get_currency_amt_header_format_dict(account)
        for col_pos, column in self.columns.items():
            if column["field"] == "name":
                value = name_value
            else:
                value = account[column["field"]]
            cell_type = column.get("type", "string")
            if cell_type == "string":
                self.sheet.write_string(
                    self.row_pos, col_pos, value or "", self.format_header_left
                )
            elif cell_type == "amount":
                self.sheet.write_number(
                    self.row_pos, col_pos, float(value), self.format_header_amount
                )
            elif cell_type == "many2one" and account["currency_id"]:
                self.sheet.write_string(
                    self.row_pos, col_pos, value.name or "", self.format_header_right
                )
            elif cell_type == "amount_currency" and account["currency_id"]:
                self.sheet.write_number(self.row_pos, col_pos, float(value), format_amt)
            else:
                self.sheet.write_string(
                    self.row_pos, col_pos, "", self.format_header_right
                )
        self.row_pos += 1
def write_account_footer ( self , account , name_value ) : format_amt = self . _get_currency_amt_header_format_dict ( account ) for col_pos , column in self . columns . items ( ) : if column [ "field" ] == "name" : value = name_value else : value = account [ column [ "field" ] ] cell_type = column . get ( "type" , "string" ) if cell_type == "string" : self . sheet . write_string ( self . row_pos , col_pos , value or "" , self . format_header_left ) elif cell_type == "amount" : self . sheet . write_number ( self . row_pos , col_pos , float ( value ) , self . format_header_amount ) elif cell_type == "many2one" and account [ "currency_id" ] : self . sheet . write_string ( self . row_pos , col_pos , value . name or "" , self . format_header_right ) elif cell_type == "amount_currency" and account [ "currency_id" ] : self . sheet . write_number ( self . row_pos , col_pos , float ( value ) , format_amt ) else : self . sheet . write_string ( self . row_pos , col_pos , "" , self . format_header_right ) self . row_pos += 1
Specific function to write account footer for Trial Balance
Specific function to write account footer for Trial Balance
"""Specific function to write account footer for Trial Balance"""
self
account
name_value