addons14/account_asset_management/models/account_asset.py
def _get_fy_duration_factor(self, entry, firstyear):
        """
        localization: override this method to change the logic used to
        calculate the impact of extended/shortened fiscal years
        """
        duration_factor = 1.0
        fy = entry["fy"]
        if self.prorata:
            if firstyear:
                depreciation_date_start = self.date_start
                fy_date_stop = entry["date_stop"]
                first_fy_asset_days = (fy_date_stop - depreciation_date_start).days + 1
                first_fy_duration = self._get_fy_duration(fy, option="days")
                first_fy_year_factor = self._get_fy_duration(fy, option="years")
                duration_factor = (
                    float(first_fy_asset_days)
                    / first_fy_duration
                    * first_fy_year_factor
                )
            else:
                duration_factor = self._get_fy_duration(fy, option="years")
        else:
            fy_months = self._get_fy_duration(fy, option="months")
            duration_factor = float(fy_months) / 12
        return duration_factor

        localization: override this method to change the logic used to
        calculate the impact of extended/shortened fiscal years
        
override this method to change the logic used to
calculate the impact of extended/shortened fiscal years
override this method to change the logic used to calculate the impact of extended / shortened fiscal years
def _get_fy_duration_factor(self, entry, firstyear):
        duration_factor = 1.0
        fy = entry["fy"]
        if self.prorata:
            if firstyear:
                depreciation_date_start = self.date_start
                fy_date_stop = entry["date_stop"]
                first_fy_asset_days = (fy_date_stop - depreciation_date_start).days + 1
                first_fy_duration = self._get_fy_duration(fy, option="days")
                first_fy_year_factor = self._get_fy_duration(fy, option="years")
                duration_factor = (
                    float(first_fy_asset_days)
                    / first_fy_duration
                    * first_fy_year_factor
                )
            else:
                duration_factor = self._get_fy_duration(fy, option="years")
        else:
            fy_months = self._get_fy_duration(fy, option="months")
            duration_factor = float(fy_months) / 12
        return duration_factor
def _get_fy_duration_factor ( self , entry , firstyear ) : duration_factor = 1.0 fy = entry [ "fy" ] if self . prorata : if firstyear : depreciation_date_start = self . date_start fy_date_stop = entry [ "date_stop" ] first_fy_asset_days = ( fy_date_stop - depreciation_date_start ) . days + 1 first_fy_duration = self . _get_fy_duration ( fy , option = "days" ) first_fy_year_factor = self . _get_fy_duration ( fy , option = "years" ) duration_factor = ( float ( first_fy_asset_days ) / first_fy_duration * first_fy_year_factor ) else : duration_factor = self . _get_fy_duration ( fy , option = "years" ) else : fy_months = self . _get_fy_duration ( fy , option = "months" ) duration_factor = float ( fy_months ) / 12 return duration_factor
localization: override this method to change the logic used to
calculate the impact of extended/shortened fiscal years
localization : override this method to change the logic used to calculate the impact of extended / shortened fiscal years
"""
        localization: override this method to change the logic used to
        calculate the impact of extended/shortened fiscal years
        """
self
entry
firstyear