addons14/account_financial_report/report/abstract_report_xlsx.py
def _define_formats(self, workbook):
        """Add cell formats to current workbook.
        Those formats can be used on all cell.
        Available formats are :
         * format_bold
         * format_right
         * format_right_bold_italic
         * format_header_left
         * format_header_center
         * format_header_right
         * format_header_amount
         * format_amount
         * format_percent_bold_italic
        """
        self.format_bold = workbook.add_format({"bold": True})
        self.format_right = workbook.add_format({"align": "right"})
        self.format_left = workbook.add_format({"align": "left"})
        self.format_right_bold_italic = workbook.add_format(
            {"align": "right", "bold": True, "italic": True}
        )
        self.format_header_left = workbook.add_format(
            {"bold": True, "border": True, "bg_color": "#FFFFCC"}
        )
        self.format_header_center = workbook.add_format(
            {"bold": True, "align": "center", "border": True, "bg_color": "#FFFFCC"}
        )
        self.format_header_right = workbook.add_format(
            {"bold": True, "align": "right", "border": True, "bg_color": "#FFFFCC"}
        )
        self.format_header_amount = workbook.add_format(
            {"bold": True, "border": True, "bg_color": "#FFFFCC"}
        )
        currency_id = self.env["res.company"]._get_user_currency()
        self.format_header_amount.set_num_format(
            "#,##0." + "0" * currency_id.decimal_places
        )
        self.format_amount = workbook.add_format()
        self.format_amount.set_num_format("#,##0." + "0" * currency_id.decimal_places)
        self.format_amount_bold = workbook.add_format({"bold": True})
        self.format_amount_bold.set_num_format(
            "#,##0." + "0" * currency_id.decimal_places
        )
        self.format_percent_bold_italic = workbook.add_format(
            {"bold": True, "italic": True}
        )
        self.format_percent_bold_italic.set_num_format("#,##0.00%")
Add cell formats to current workbook.
        Those formats can be used on all cell.
        Available formats are :
         * format_bold
         * format_right
         * format_right_bold_italic
         * format_header_left
         * format_header_center
         * format_header_right
         * format_header_amount
         * format_amount
         * format_percent_bold_italic
        
Add cell formats to current workbook.
Those formats can be used on all cell.
Add cell formats to current workbook . Those formats can be used on all cell .
def _define_formats(self, workbook):
        self.format_bold = workbook.add_format({"bold": True})
        self.format_right = workbook.add_format({"align": "right"})
        self.format_left = workbook.add_format({"align": "left"})
        self.format_right_bold_italic = workbook.add_format(
            {"align": "right", "bold": True, "italic": True}
        )
        self.format_header_left = workbook.add_format(
            {"bold": True, "border": True, "bg_color": "#FFFFCC"}
        )
        self.format_header_center = workbook.add_format(
            {"bold": True, "align": "center", "border": True, "bg_color": "#FFFFCC"}
        )
        self.format_header_right = workbook.add_format(
            {"bold": True, "align": "right", "border": True, "bg_color": "#FFFFCC"}
        )
        self.format_header_amount = workbook.add_format(
            {"bold": True, "border": True, "bg_color": "#FFFFCC"}
        )
        currency_id = self.env["res.company"]._get_user_currency()
        self.format_header_amount.set_num_format(
            "#,##0." + "0" * currency_id.decimal_places
        )
        self.format_amount = workbook.add_format()
        self.format_amount.set_num_format("#,##0." + "0" * currency_id.decimal_places)
        self.format_amount_bold = workbook.add_format({"bold": True})
        self.format_amount_bold.set_num_format(
            "#,##0." + "0" * currency_id.decimal_places
        )
        self.format_percent_bold_italic = workbook.add_format(
            {"bold": True, "italic": True}
        )
        self.format_percent_bold_italic.set_num_format("#,##0.00%")
def _define_formats ( self , workbook ) : self . format_bold = workbook . add_format ( { "bold" : True } ) self . format_right = workbook . add_format ( { "align" : "right" } ) self . format_left = workbook . add_format ( { "align" : "left" } ) self . format_right_bold_italic = workbook . add_format ( { "align" : "right" , "bold" : True , "italic" : True } ) self . format_header_left = workbook . add_format ( { "bold" : True , "border" : True , "bg_color" : "#FFFFCC" } ) self . format_header_center = workbook . add_format ( { "bold" : True , "align" : "center" , "border" : True , "bg_color" : "#FFFFCC" } ) self . format_header_right = workbook . add_format ( { "bold" : True , "align" : "right" , "border" : True , "bg_color" : "#FFFFCC" } ) self . format_header_amount = workbook . add_format ( { "bold" : True , "border" : True , "bg_color" : "#FFFFCC" } ) currency_id = self . env [ "res.company" ] . _get_user_currency ( ) self . format_header_amount . set_num_format ( "#,##0." + "0" * currency_id . decimal_places ) self . format_amount = workbook . add_format ( ) self . format_amount . set_num_format ( "#,##0." + "0" * currency_id . decimal_places ) self . format_amount_bold = workbook . add_format ( { "bold" : True } ) self . format_amount_bold . set_num_format ( "#,##0." + "0" * currency_id . decimal_places ) self . format_percent_bold_italic = workbook . add_format ( { "bold" : True , "italic" : True } ) self . format_percent_bold_italic . set_num_format ( "#,##0.00%" )
Add cell formats to current workbook.
Add cell formats to current workbook .
"""Add cell formats to current workbook.
        Those formats can be used on all cell.
        Available formats are :
         * format_bold
         * format_right
         * format_right_bold_italic
         * format_header_left
         * format_header_center
         * format_header_right
         * format_header_amount
         * format_amount
         * format_percent_bold_italic
        """
self
workbook