def _compute_dlt(self):
        """Apply Lead Time Adj Factor if existing"""
        res = super()._compute_dlt()
        for rec in self:
            ltaf_to_apply = self.env['ddmrp.adjustment'].search(
                rec._ltaf_to_apply_domain())
            if ltaf_to_apply:
                ltaf = 1
                values = ltaf_to_apply.mapped('value')
                for val in values:
                    ltaf *= val
                prev = rec.dlt
                rec.dlt *= ltaf
                _logger.debug(
                    "LTAF=%s applied to %s. DLT: %s -> %s" %
                    (ltaf, rec.name, prev, rec.dlt))
        return res
def _compute_dlt ( self ) : res = super ( ) . _compute_dlt ( ) for rec in self : ltaf_to_apply = self . env [ 'ddmrp.adjustment' ] . search ( rec . _ltaf_to_apply_domain ( ) ) if ltaf_to_apply : ltaf = 1 values = ltaf_to_apply . mapped ( 'value' ) for val in values : ltaf *= val prev = rec . dlt rec . dlt *= ltaf _logger . debug ( "LTAF=%s applied to %s. DLT: %s -> %s" % ( ltaf , rec . name , prev , rec . dlt ) ) return res
Apply Lead Time Adj Factor if existing