addons14/account_financial_report/report/abstract_report_xlsx.py
def write_ending_balance_from_dict(self, my_object, name, label):
        """Write a specific ending balance line on current line
        using defined columns field_final_balance name.
        Columns are defined with `_get_report_columns` method.
        """
        for i in range(0, len(self.columns)):
            self.sheet.write(self.row_pos, i, "", self.format_header_right)
        row_count_name = self._get_col_count_final_balance_name()
        col_pos_label = self._get_col_pos_final_balance_label()
        self.sheet.merge_range(
            self.row_pos,
            0,
            self.row_pos,
            row_count_name - 1,
            name,
            self.format_header_left,
        )
        self.sheet.write(self.row_pos, col_pos_label, label, self.format_header_right)
        for col_pos, column in self.columns.items():
            if column.get("field_final_balance"):
                value = my_object.get(column["field_final_balance"], False)
                cell_type = column.get("type", "string")
                if cell_type == "string":
                    self.sheet.write_string(
                        self.row_pos, col_pos, value or "", self.format_header_right
                    )
                elif cell_type == "amount":
                    self.sheet.write_number(
                        self.row_pos, col_pos, float(value), self.format_header_amount
                    )
                elif cell_type == "amount_currency":
                    if my_object["currency_id"] and value:
                        format_amt = self._get_currency_amt_format_dict(my_object)
                        self.sheet.write_number(
                            self.row_pos, col_pos, float(value), format_amt
                        )
            elif column.get("field_currency_balance"):
                value = my_object.get(column["field_currency_balance"], False)
                cell_type = column.get("type", "string")
                if cell_type == "many2one":
                    if my_object["currency_id"]:
                        self.sheet.write_string(
                            self.row_pos, col_pos, value or "", self.format_header_right
                        )
                elif cell_type == "currency_name":
                    self.sheet.write_string(
                        self.row_pos, col_pos, value or "", self.format_header_right
                    )
        self.row_pos += 1
Write a specific ending balance line on current line
        using defined columns field_final_balance name.
        Columns are defined with `_get_report_columns` method.
        
Write a specific ending balance line on current line
using defined columns field_final_balance name.
Columns are defined with `_get_report_columns` method.
Write a specific ending balance line on current line using defined columns field_final_balance name . Columns are defined with ` _get_report_columns ` method .
def write_ending_balance_from_dict(self, my_object, name, label):
        for i in range(0, len(self.columns)):
            self.sheet.write(self.row_pos, i, "", self.format_header_right)
        row_count_name = self._get_col_count_final_balance_name()
        col_pos_label = self._get_col_pos_final_balance_label()
        self.sheet.merge_range(
            self.row_pos,
            0,
            self.row_pos,
            row_count_name - 1,
            name,
            self.format_header_left,
        )
        self.sheet.write(self.row_pos, col_pos_label, label, self.format_header_right)
        for col_pos, column in self.columns.items():
            if column.get("field_final_balance"):
                value = my_object.get(column["field_final_balance"], False)
                cell_type = column.get("type", "string")
                if cell_type == "string":
                    self.sheet.write_string(
                        self.row_pos, col_pos, value or "", self.format_header_right
                    )
                elif cell_type == "amount":
                    self.sheet.write_number(
                        self.row_pos, col_pos, float(value), self.format_header_amount
                    )
                elif cell_type == "amount_currency":
                    if my_object["currency_id"] and value:
                        format_amt = self._get_currency_amt_format_dict(my_object)
                        self.sheet.write_number(
                            self.row_pos, col_pos, float(value), format_amt
                        )
            elif column.get("field_currency_balance"):
                value = my_object.get(column["field_currency_balance"], False)
                cell_type = column.get("type", "string")
                if cell_type == "many2one":
                    if my_object["currency_id"]:
                        self.sheet.write_string(
                            self.row_pos, col_pos, value or "", self.format_header_right
                        )
                elif cell_type == "currency_name":
                    self.sheet.write_string(
                        self.row_pos, col_pos, value or "", self.format_header_right
                    )
        self.row_pos += 1
def write_ending_balance_from_dict ( self , my_object , name , label ) : for i in range ( 0 , len ( self . columns ) ) : self . sheet . write ( self . row_pos , i , "" , self . format_header_right ) row_count_name = self . _get_col_count_final_balance_name ( ) col_pos_label = self . _get_col_pos_final_balance_label ( ) self . sheet . merge_range ( self . row_pos , 0 , self . row_pos , row_count_name - 1 , name , self . format_header_left , ) self . sheet . write ( self . row_pos , col_pos_label , label , self . format_header_right ) for col_pos , column in self . columns . items ( ) : if column . get ( "field_final_balance" ) : value = my_object . get ( column [ "field_final_balance" ] , False ) cell_type = column . get ( "type" , "string" ) if cell_type == "string" : self . sheet . write_string ( self . row_pos , col_pos , value or "" , self . format_header_right ) elif cell_type == "amount" : self . sheet . write_number ( self . row_pos , col_pos , float ( value ) , self . format_header_amount ) elif cell_type == "amount_currency" : if my_object [ "currency_id" ] and value : format_amt = self . _get_currency_amt_format_dict ( my_object ) self . sheet . write_number ( self . row_pos , col_pos , float ( value ) , format_amt ) elif column . get ( "field_currency_balance" ) : value = my_object . get ( column [ "field_currency_balance" ] , False ) cell_type = column . get ( "type" , "string" ) if cell_type == "many2one" : if my_object [ "currency_id" ] : self . sheet . write_string ( self . row_pos , col_pos , value or "" , self . format_header_right ) elif cell_type == "currency_name" : self . sheet . write_string ( self . row_pos , col_pos , value or "" , self . format_header_right ) self . row_pos += 1
Write a specific ending balance line on current line
using defined columns field_final_balance name.
Write a specific ending balance line on current line using defined columns field_final_balance name .
"""Write a specific ending balance line on current line
        using defined columns field_final_balance name.
        Columns are defined with `_get_report_columns` method.
        """
self
my_object
name
label